r3690 - trunk/src/target/u-boot/patches
laforge at sita.openmoko.org
laforge at sita.openmoko.org
Wed Dec 19 14:31:04 CET 2007
Author: laforge
Date: 2007-12-19 14:31:04 +0100 (Wed, 19 Dec 2007)
New Revision: 3690
Modified:
trunk/src/target/u-boot/patches/uboot-s3c2410-nand.patch
Log:
cosmetic cleanup
Modified: trunk/src/target/u-boot/patches/uboot-s3c2410-nand.patch
===================================================================
--- trunk/src/target/u-boot/patches/uboot-s3c2410-nand.patch 2007-12-19 12:29:45 UTC (rev 3689)
+++ trunk/src/target/u-boot/patches/uboot-s3c2410-nand.patch 2007-12-19 13:31:04 UTC (rev 3690)
@@ -20,7 +20,7 @@
===================================================================
--- /dev/null
+++ u-boot/cpu/arm920t/s3c24x0/nand.c
-@@ -0,0 +1,224 @@
+@@ -0,0 +1,227 @@
+/*
+ * (C) Copyright 2006 OpenMoko, Inc.
+ * Author: Harald Welte <laforge at openmoko.org>
@@ -168,17 +168,20 @@
+ NFCONF |= S3C2410_NFCONF_INITECC;
+}
+
-+static int s3c2410_nand_calculate_ecc(struct mtd_info *mtd, const u_char *dat, u_char *ecc_code)
++static int s3c2410_nand_calculate_ecc(struct mtd_info *mtd, const u_char *dat,
++ u_char *ecc_code)
+{
+ ecc_code[0] = NFECC0;
+ ecc_code[1] = NFECC1;
+ ecc_code[2] = NFECC2;
-+ DEBUGN("s3c2410_nand_calculate_hwecc(%p,): 0x%02x 0x%02x 0x%02x\n", mtd , ecc_code[0], ecc_code[1], ecc_code[2]);
++ DEBUGN("s3c2410_nand_calculate_hwecc(%p,): 0x%02x 0x%02x 0x%02x\n",
++ mtd , ecc_code[0], ecc_code[1], ecc_code[2]);
+
+ return 0;
+}
+
-+int s3c2410_nand_correct_data(struct mtd_info *mtd, u_char *dat, u_char *read_ecc, u_char *calc_ecc)
++static int s3c2410_nand_correct_data(struct mtd_info *mtd, u_char *dat,
++ u_char *read_ecc, u_char *calc_ecc)
+{
+ if (read_ecc[0] == calc_ecc[0] &&
+ read_ecc[1] == calc_ecc[1] &&
@@ -383,7 +386,7 @@
relocate: /* relocate U-Boot to RAM */
adr r0, _start /* r0 <- current position of code */
ldr r1, _TEXT_BASE /* test if we run from flash or RAM */
-@@ -197,6 +203,93 @@
+@@ -197,6 +203,87 @@
stmia r1!, {r3-r10} /* copy to target address [r1] */
cmp r0, r2 /* until source end addreee [r2] */
ble copy_loop
@@ -412,11 +415,6 @@
+ orr r2, r2, #0x800 @ disable chip
+ str r2, [r1, #oNFCONF]
+
-+#if 0
-+ @ get ready to call C functions (for nand_read())
-+ ldr sp, DW_STACK_START @ setup stack pointer
-+ mov fp, #0 @ no previous frame, so fp=0
-+#else
+ ldr r0, _TEXT_BASE /* upper 128 KiB: relocated uboot */
+ sub r0, r0, #CFG_MALLOC_LEN /* malloc area */
+ sub r0, r0, #CFG_GBL_DATA_SIZE /* bdinfo */
@@ -424,7 +422,6 @@
+ sub r0, r0, #(CONFIG_STACKSIZE_IRQ+CONFIG_STACKSIZE_FIQ)
+#endif
+ sub sp, r0, #12 /* leave 3 words for abort-stack */
-+#endif
+
+ @ copy u-boot to RAM
+ ldr r0, _TEXT_BASE
More information about the commitlog
mailing list