[oe-commits] org.oe.dev u-boot-mkimage-gta01-native: add a static git tag and put patches in OE to stop breakage

koen commit openembedded-commits at lists.openembedded.org
Wed Jun 13 10:41:47 UTC 2007


u-boot-mkimage-gta01-native: add a static git tag and put patches in OE to stop breakage

Author: koen at openembedded.org
Branch: org.openembedded.dev
Revision: df4c815de2b1a6e7b275ed3aa47c0dd906e8001d
ViewMTN: http://monotone.openembedded.org/revision.psp?id=df4c815de2b1a6e7b275ed3aa47c0dd906e8001d
Files:
1
packages/uboot/u-boot-mkimage-gta01-native
packages/uboot/u-boot-mkimage-gta01-native/bbt-create-optional.patch
packages/uboot/u-boot-mkimage-gta01-native/bbt-scan-second.patch
packages/uboot/u-boot-mkimage-gta01-native/boot-from-ram-and-nand.patch
packages/uboot/u-boot-mkimage-gta01-native/boot-from-ram-reloc.patch
packages/uboot/u-boot-mkimage-gta01-native/boot-menu.patch
packages/uboot/u-boot-mkimage-gta01-native/cmd-unzip.patch
packages/uboot/u-boot-mkimage-gta01-native/console-ansi.patch
packages/uboot/u-boot-mkimage-gta01-native/default-env.patch
packages/uboot/u-boot-mkimage-gta01-native/dontask.patch
packages/uboot/u-boot-mkimage-gta01-native/dynenv-harden.patch
packages/uboot/u-boot-mkimage-gta01-native/early-powerdown.patch
packages/uboot/u-boot-mkimage-gta01-native/enable-splash-bmp.patch
packages/uboot/u-boot-mkimage-gta01-native/env_nand_oob.patch
packages/uboot/u-boot-mkimage-gta01-native/ext2load_hex.patch
packages/uboot/u-boot-mkimage-gta01-native/lowlevel_foo.patch
packages/uboot/u-boot-mkimage-gta01-native/mmcinit-power-up.patch
packages/uboot/u-boot-mkimage-gta01-native/nand-badisbad.patch
packages/uboot/u-boot-mkimage-gta01-native/nand-createbbt.patch
packages/uboot/u-boot-mkimage-gta01-native/nand-dynamic_partitions.patch
packages/uboot/u-boot-mkimage-gta01-native/nand-otp.patch
packages/uboot/u-boot-mkimage-gta01-native/nand-read_write_oob.patch
packages/uboot/u-boot-mkimage-gta01-native/neo1973-chargefast.patch
packages/uboot/u-boot-mkimage-gta01-native/preboot-override.patch
packages/uboot/u-boot-mkimage-gta01-native/raise-limits.patch
packages/uboot/u-boot-mkimage-gta01-native/series
packages/uboot/u-boot-mkimage-gta01-native/splashimage-command.patch
packages/uboot/u-boot-mkimage-gta01-native/uboot-20061030-neo1973.patch
packages/uboot/u-boot-mkimage-gta01-native/uboot-20061030-qt2410.patch
packages/uboot/u-boot-mkimage-gta01-native/uboot-arm920_s3c2410_irq_demux.patch
packages/uboot/u-boot-mkimage-gta01-native/uboot-arm920t-gd_in_irq.patch
packages/uboot/u-boot-mkimage-gta01-native/uboot-bbt-quiet.patch
packages/uboot/u-boot-mkimage-gta01-native/uboot-cmd_s3c2410.patch
packages/uboot/u-boot-mkimage-gta01-native/uboot-cramfs_but_no_jffs2.patch
packages/uboot/u-boot-mkimage-gta01-native/uboot-dfu.patch
packages/uboot/u-boot-mkimage-gta01-native/uboot-gta02.patch
packages/uboot/u-boot-mkimage-gta01-native/uboot-hxd8.patch
packages/uboot/u-boot-mkimage-gta01-native/uboot-license.patch
packages/uboot/u-boot-mkimage-gta01-native/uboot-machtypes.patch
packages/uboot/u-boot-mkimage-gta01-native/uboot-mokoversion.patch
packages/uboot/u-boot-mkimage-gta01-native/uboot-nand-markbad-reallybad.patch
packages/uboot/u-boot-mkimage-gta01-native/uboot-neo1973-defaultenv.patch
packages/uboot/u-boot-mkimage-gta01-native/uboot-neo1973-resume.patch
packages/uboot/u-boot-mkimage-gta01-native/uboot-s3c2410-misccr-definitions.patch
packages/uboot/u-boot-mkimage-gta01-native/uboot-s3c2410-mmc.patch
packages/uboot/u-boot-mkimage-gta01-native/uboot-s3c2410-nand.patch
packages/uboot/u-boot-mkimage-gta01-native/uboot-s3c2410-norelocate_irqvec_cpy.patch
packages/uboot/u-boot-mkimage-gta01-native/uboot-s3c2410-warnings-fix.patch
packages/uboot/u-boot-mkimage-gta01-native/uboot-s3c2410_fb.patch
packages/uboot/u-boot-mkimage-gta01-native/uboot-s3c2410_udc.patch
packages/uboot/u-boot-mkimage-gta01-native/uboot-s3c2440.patch
packages/uboot/u-boot-mkimage-gta01-native/uboot-s3c2443.patch
packages/uboot/u-boot-mkimage-gta01-native/uboot-smdk2440.patch
packages/uboot/u-boot-mkimage-gta01-native/uboot-smdk2443.patch
packages/uboot/u-boot-mkimage-gta01-native/uboot-strtoul.patch
packages/uboot/u-boot-mkimage-gta01-native/uboot-usbtty-acm.patch
packages/uboot/u-boot-mkimage-gta01-native/unbusy-i2c.patch
packages/uboot/u-boot-mkimage-gta01-native/usbdcore-multiple_configs.patch
packages/uboot/u-boot-mkimage-gta01-native/wakeup-reason-nand-only.patch
packages/uboot/u-boot-mkimage-gta01-native_oe.bb
packages/uboot/u-boot-mkimage-gta01-native_svn.bb
Diffs:

#
# mt diff -ra8b6843ff12dec925a0b52c51573cc06087a2d7b -rdf4c815de2b1a6e7b275ed3aa47c0dd906e8001d
#
# 
# 
# add_dir "packages/uboot/u-boot-mkimage-gta01-native"
# 
# add_file "packages/uboot/u-boot-mkimage-gta01-native/bbt-create-optional.patch"
#  content [ad5922d4d738fb81728c5b86cc7d4c8e7f7f7239]
# 
# add_file "packages/uboot/u-boot-mkimage-gta01-native/bbt-scan-second.patch"
#  content [76390186da12b7398bace1fe2b5b86721f784eb4]
# 
# add_file "packages/uboot/u-boot-mkimage-gta01-native/boot-from-ram-and-nand.patch"
#  content [0b6a1fff91e043e3bbc328b3bd7582445a8b174f]
# 
# add_file "packages/uboot/u-boot-mkimage-gta01-native/boot-from-ram-reloc.patch"
#  content [4ba21a5df4adf65a1e898dd96fff1c2be1ffb687]
# 
# add_file "packages/uboot/u-boot-mkimage-gta01-native/boot-menu.patch"
#  content [1b61a717eecd3d8fd913f83a74a193d2ac9044fa]
# 
# add_file "packages/uboot/u-boot-mkimage-gta01-native/cmd-unzip.patch"
#  content [9822d112e46950849fe9c351fe57a4b6a8d95da3]
# 
# add_file "packages/uboot/u-boot-mkimage-gta01-native/console-ansi.patch"
#  content [4bcc7e5b18ed4d801252259a85c196ef9ad02609]
# 
# add_file "packages/uboot/u-boot-mkimage-gta01-native/default-env.patch"
#  content [ae6b78ade5dd64760137777fc3916912462715a8]
# 
# add_file "packages/uboot/u-boot-mkimage-gta01-native/dontask.patch"
#  content [e5bc8bcff635d6ed04af4bae5ca0fc6ed9f3d56a]
# 
# add_file "packages/uboot/u-boot-mkimage-gta01-native/dynenv-harden.patch"
#  content [897a149e7c16c53f964dfeb3d6ffd453e4f66637]
# 
# add_file "packages/uboot/u-boot-mkimage-gta01-native/early-powerdown.patch"
#  content [bce4a3f30ba47409823fee9758abd665995ad158]
# 
# add_file "packages/uboot/u-boot-mkimage-gta01-native/enable-splash-bmp.patch"
#  content [0898df730ba5691d9dff830ec368cc89af1919be]
# 
# add_file "packages/uboot/u-boot-mkimage-gta01-native/env_nand_oob.patch"
#  content [74b51a0b8a3a9b84bb3de866cbba21d4b4e7ac8b]
# 
# add_file "packages/uboot/u-boot-mkimage-gta01-native/ext2load_hex.patch"
#  content [ea40a6e145e137ec12ce60f6ecc889f25ff1bd34]
# 
# add_file "packages/uboot/u-boot-mkimage-gta01-native/lowlevel_foo.patch"
#  content [d113ab5dcf8754fca59bb95897b9ee745798c290]
# 
# add_file "packages/uboot/u-boot-mkimage-gta01-native/mmcinit-power-up.patch"
#  content [2b8cf52406889edc63384694d97653bc509cd00c]
# 
# add_file "packages/uboot/u-boot-mkimage-gta01-native/nand-badisbad.patch"
#  content [25143e48653df5e68cd3163820cbcce8663ce4e3]
# 
# add_file "packages/uboot/u-boot-mkimage-gta01-native/nand-createbbt.patch"
#  content [827d1d8ab3ada79571839d1ad7aa5fafc79ec2ae]
# 
# add_file "packages/uboot/u-boot-mkimage-gta01-native/nand-dynamic_partitions.patch"
#  content [fd2bc2c802d1511af606f6617e88c5a4e0914e02]
# 
# add_file "packages/uboot/u-boot-mkimage-gta01-native/nand-otp.patch"
#  content [016d02c0741a2a68a2c4effcedbe2819f6dc2b50]
# 
# add_file "packages/uboot/u-boot-mkimage-gta01-native/nand-read_write_oob.patch"
#  content [d522886df5a20b716f53ae6622b5325a309443f1]
# 
# add_file "packages/uboot/u-boot-mkimage-gta01-native/neo1973-chargefast.patch"
#  content [87aec55a2dd2a9d95ef45c1dd665b4ca31aa0568]
# 
# add_file "packages/uboot/u-boot-mkimage-gta01-native/preboot-override.patch"
#  content [c63810c8ebfec8ac9f202bba9e412759178aca80]
# 
# add_file "packages/uboot/u-boot-mkimage-gta01-native/raise-limits.patch"
#  content [46b12453b3544a7a2fe3ed44a8df2d5a41baa640]
# 
# add_file "packages/uboot/u-boot-mkimage-gta01-native/series"
#  content [db1cab5360a6a42e21a14787cb1984fba14cc541]
# 
# add_file "packages/uboot/u-boot-mkimage-gta01-native/splashimage-command.patch"
#  content [8242495b125ee0da4cbf7b41d1316691c92e75bd]
# 
# add_file "packages/uboot/u-boot-mkimage-gta01-native/uboot-20061030-neo1973.patch"
#  content [70932a2d57b5fc8e67b3445724356272548e169c]
# 
# add_file "packages/uboot/u-boot-mkimage-gta01-native/uboot-20061030-qt2410.patch"
#  content [4df4202a3462a2de4deb380645b69982ada51ae2]
# 
# add_file "packages/uboot/u-boot-mkimage-gta01-native/uboot-arm920_s3c2410_irq_demux.patch"
#  content [57c90fdd13becaaa5f7e55bb7e711b373074ec83]
# 
# add_file "packages/uboot/u-boot-mkimage-gta01-native/uboot-arm920t-gd_in_irq.patch"
#  content [a91227595226da6d19eb4f6bfff6e8cd8c09b787]
# 
# add_file "packages/uboot/u-boot-mkimage-gta01-native/uboot-bbt-quiet.patch"
#  content [f10275ff1870a0bbc0359479bbc877c0f7859e88]
# 
# add_file "packages/uboot/u-boot-mkimage-gta01-native/uboot-cmd_s3c2410.patch"
#  content [3884a7a705b4d0e1a62e15b597b8f721c8dbb2dd]
# 
# add_file "packages/uboot/u-boot-mkimage-gta01-native/uboot-cramfs_but_no_jffs2.patch"
#  content [75c8aec647bc10e42d4e499d3424d065996eccd5]
# 
# add_file "packages/uboot/u-boot-mkimage-gta01-native/uboot-dfu.patch"
#  content [1dc4a6f21006f9daebc589e9118aa9f34e6f9583]
# 
# add_file "packages/uboot/u-boot-mkimage-gta01-native/uboot-gta02.patch"
#  content [58931aced7ee6c58ad7cc2343d77c665505c9335]
# 
# add_file "packages/uboot/u-boot-mkimage-gta01-native/uboot-hxd8.patch"
#  content [2fa03683d1fade893ceeab126690d274ac826092]
# 
# add_file "packages/uboot/u-boot-mkimage-gta01-native/uboot-license.patch"
#  content [59fc1450a775e4974707427aae0427725d994ea9]
# 
# add_file "packages/uboot/u-boot-mkimage-gta01-native/uboot-machtypes.patch"
#  content [4d0f5df71a03854f9170a5920d906e5fafb9457a]
# 
# add_file "packages/uboot/u-boot-mkimage-gta01-native/uboot-mokoversion.patch"
#  content [5e9b39629f370bff51d7b645d6ccf1bce46aab1c]
# 
# add_file "packages/uboot/u-boot-mkimage-gta01-native/uboot-nand-markbad-reallybad.patch"
#  content [efdd344d67b6549217508b37c9274079a7b1cd79]
# 
# add_file "packages/uboot/u-boot-mkimage-gta01-native/uboot-neo1973-defaultenv.patch"
#  content [f1a322ccd985ff626a197d5f975a007f48fc8d53]
# 
# add_file "packages/uboot/u-boot-mkimage-gta01-native/uboot-neo1973-resume.patch"
#  content [a22e85fcb4928f8dd74f6adb2db73014c78f6589]
# 
# add_file "packages/uboot/u-boot-mkimage-gta01-native/uboot-s3c2410-misccr-definitions.patch"
#  content [e35e2a658eb18be5cff17ed9ecbd0886f730f08f]
# 
# add_file "packages/uboot/u-boot-mkimage-gta01-native/uboot-s3c2410-mmc.patch"
#  content [c387c5ade4f99d446d8653f038b04fea5f104f9e]
# 
# add_file "packages/uboot/u-boot-mkimage-gta01-native/uboot-s3c2410-nand.patch"
#  content [67e8dd1dfef3fa31d1d2baddfd30e9d99db9b6ca]
# 
# add_file "packages/uboot/u-boot-mkimage-gta01-native/uboot-s3c2410-norelocate_irqvec_cpy.patch"
#  content [34e36afe2549cc641410508b635fc8ef3ea255df]
# 
# add_file "packages/uboot/u-boot-mkimage-gta01-native/uboot-s3c2410-warnings-fix.patch"
#  content [2275d396be6c47a6408baa5af76a809530a6ea61]
# 
# add_file "packages/uboot/u-boot-mkimage-gta01-native/uboot-s3c2410_fb.patch"
#  content [3e06a447c25abaaffea7577f7c5fd5ec14677e03]
# 
# add_file "packages/uboot/u-boot-mkimage-gta01-native/uboot-s3c2410_udc.patch"
#  content [1f2ca245141666401699f59fbfaacb5ce7e3e67d]
# 
# add_file "packages/uboot/u-boot-mkimage-gta01-native/uboot-s3c2440.patch"
#  content [f307923ae41b6501682d7389218e8de3238049df]
# 
# add_file "packages/uboot/u-boot-mkimage-gta01-native/uboot-s3c2443.patch"
#  content [6c3a532e3de0efe072e56d28992bfc5df60d4062]
# 
# add_file "packages/uboot/u-boot-mkimage-gta01-native/uboot-smdk2440.patch"
#  content [30d5fcab40bf9820dd2eefe6040549dce88b2f4a]
# 
# add_file "packages/uboot/u-boot-mkimage-gta01-native/uboot-smdk2443.patch"
#  content [2e406a4367c7021bfe141fd640e6ea1a069677c5]
# 
# add_file "packages/uboot/u-boot-mkimage-gta01-native/uboot-strtoul.patch"
#  content [f994f7a8b90403796371521ea7266e8c7c24684d]
# 
# add_file "packages/uboot/u-boot-mkimage-gta01-native/uboot-usbtty-acm.patch"
#  content [0bdb46f2ed64eb6f33abf57ce9ddeb99c89b6b47]
# 
# add_file "packages/uboot/u-boot-mkimage-gta01-native/unbusy-i2c.patch"
#  content [19b62a4d7bd024859034cf6692b1d6f4f8d1b222]
# 
# add_file "packages/uboot/u-boot-mkimage-gta01-native/usbdcore-multiple_configs.patch"
#  content [87dd128f4cd1b2661127dbf37f0f6d2a76cbc15c]
# 
# add_file "packages/uboot/u-boot-mkimage-gta01-native/wakeup-reason-nand-only.patch"
#  content [c6dee2e9f47657eaf6e8b020845a22f60d77a6c6]
# 
# add_file "packages/uboot/u-boot-mkimage-gta01-native_oe.bb"
#  content [c72f80d0dbe219b996e1395136fdc0ea52afb60f]
# 
# patch "packages/uboot/u-boot-mkimage-gta01-native_svn.bb"
#  from [8ac5146e975da327998578392674fbd940282e2f]
#    to [9e6498809f6c1b53af900e9daa85fc7bcffb6bb5]
# 
============================================================
--- packages/uboot/u-boot-mkimage-gta01-native/bbt-create-optional.patch	ad5922d4d738fb81728c5b86cc7d4c8e7f7f7239
+++ packages/uboot/u-boot-mkimage-gta01-native/bbt-create-optional.patch	ad5922d4d738fb81728c5b86cc7d4c8e7f7f7239
@@ -0,0 +1,52 @@
+This patch makes creation of the BBT optional for the s3c24x0 platform.
+It adds:
+
+- a new platform-independent NAND-wide flag NAND_DONT_CREATE_BBT
+- one user of this flag, namely s3c24x0
+
+Experimental.
+
+- Werner Almesberger <werner at openmoko.org>
+
+
+Index: u-boot/cpu/arm920t/s3c24x0/nand.c
+===================================================================
+--- u-boot.orig/cpu/arm920t/s3c24x0/nand.c	2007-02-16 23:53:29.000000000 +0100
++++ u-boot/cpu/arm920t/s3c24x0/nand.c	2007-02-16 23:53:54.000000000 +0100
+@@ -169,7 +169,7 @@
+ 
+ 	nand->eccmode = NAND_ECC_SOFT;
+ #ifdef CONFIG_S3C2410_NAND_BBT
+-	nand->options = NAND_USE_FLASH_BBT;
++	nand->options = NAND_USE_FLASH_BBT | NAND_DONT_CREATE_BBT;
+ #else
+ 	nand->options = 0;
+ #endif
+Index: u-boot/drivers/nand/nand_bbt.c
+===================================================================
+--- u-boot.orig/drivers/nand/nand_bbt.c	2007-02-16 23:53:36.000000000 +0100
++++ u-boot/drivers/nand/nand_bbt.c	2007-02-16 23:53:54.000000000 +0100
+@@ -678,7 +678,8 @@
+ 		}
+ create:
+ 		/* Create the bad block table by scanning the device ? */
+-		if (!(td->options & NAND_BBT_CREATE))
++		if (!(td->options & NAND_BBT_CREATE) ||
++		  (this->options & NAND_DONT_CREATE_BBT))
+ 			continue;
+ 
+ 		/* Create the table in memory by scanning the chip(s) */
+Index: u-boot/include/linux/mtd/nand.h
+===================================================================
+--- u-boot.orig/include/linux/mtd/nand.h	2007-02-16 23:53:08.000000000 +0100
++++ u-boot/include/linux/mtd/nand.h	2007-02-16 23:53:54.000000000 +0100
+@@ -187,7 +187,8 @@
+  * This can only work if we have the ecc bytes directly behind the
+  * data bytes. Applies for DOC and AG-AND Renesas HW Reed Solomon generators */
+ #define NAND_HWECC_SYNDROME	0x00020000
+-
++/* Do not create an BBT if none is found. Overrides NAND_BBT_CREATE. */
++#define NAND_DONT_CREATE_BBT	0x00040000
+ 
+ /* Options set by nand scan */
+ /* Nand scan has allocated oob_buf */
============================================================
--- packages/uboot/u-boot-mkimage-gta01-native/bbt-scan-second.patch	76390186da12b7398bace1fe2b5b86721f784eb4
+++ packages/uboot/u-boot-mkimage-gta01-native/bbt-scan-second.patch	76390186da12b7398bace1fe2b5b86721f784eb4
@@ -0,0 +1,69 @@
+Scan also the second OOB page for bad block information.
+
+board/neo1973/gta01/nand.c (board_nand_init): added board-specific badblock
+  pattern which sets NAND_BBT_SCAN2NDPAGE
+drivers/nand/nand_base.c (nand_block_bad): also consider the second page in a
+  block if NAND_BBT_SCAN2NDPAGE is set
+
+- Werner Almesberger <werner at openmoko.org>
+
+Index: u-boot/board/neo1973/gta01/nand.c
+===================================================================
+--- u-boot.orig/board/neo1973/gta01/nand.c
++++ u-boot/board/neo1973/gta01/nand.c
+@@ -113,9 +113,23 @@
+ }
+ 
+ 
++/* Derived from drivers/nand/nand_bbt.c:smallpage_flashbased */
++
++static uint8_t scan_ff_pattern[] = { 0xff, 0xff };
++
++static struct nand_bbt_descr badblock_pattern = {
++	.options =
++	    NAND_BBT_SCANEMPTY | NAND_BBT_SCANALLPAGES | NAND_BBT_SCAN2NDPAGE,
++	.offs = 5,
++	.len = 1,
++	.pattern = scan_ff_pattern
++};
++
++
+ int board_nand_init(struct nand_chip *nand)
+ {
+ 	nand->read_otp = samsung_nand_read_otp;
+ 	nand->write_otp = samsung_nand_write_otp;
++	nand->badblock_pattern = &badblock_pattern;
+ 	return s3c24x0_nand_init(nand);
+ }
+Index: u-boot/drivers/nand/nand_base.c
+===================================================================
+--- u-boot.orig/drivers/nand/nand_base.c
++++ u-boot/drivers/nand/nand_base.c
+@@ -421,7 +421,7 @@
+  *
+  * Check, if the block is bad.
+  */
+-static int nand_block_bad(struct mtd_info *mtd, loff_t ofs, int getchip)
++static int nand_block_bad_page(struct mtd_info *mtd, loff_t ofs, int getchip)
+ {
+ 	int page, chipnr, res = 0;
+ 	struct nand_chip *this = mtd->priv;
+@@ -460,6 +460,18 @@
+ 	return res;
+ }
+ 
++static int nand_block_bad(struct mtd_info *mtd, loff_t ofs, int getchip)
++{
++	struct nand_chip *this = mtd->priv;
++
++	if (nand_block_bad_page(mtd, ofs, getchip))
++		return 1;
++	if (this->badblock_pattern->options & NAND_BBT_SCAN2NDPAGE &&
++	    nand_block_bad_page(mtd, ofs+(1 << this->page_shift), getchip))
++		return 1;
++	return 0;
++}
++
+ /**
+  * nand_default_block_markbad - [DEFAULT] mark a block bad
+  * @mtd:	MTD device structure
============================================================
--- packages/uboot/u-boot-mkimage-gta01-native/boot-from-ram-and-nand.patch	0b6a1fff91e043e3bbc328b3bd7582445a8b174f
+++ packages/uboot/u-boot-mkimage-gta01-native/boot-from-ram-and-nand.patch	0b6a1fff91e043e3bbc328b3bd7582445a8b174f
@@ -0,0 +1,98 @@
+Auto-detect whether we're booting from RAM or NAND, and act accordingly. This
+allows us to use the same u-boot binary for all boot modes.
+
+include/configs/neo1973.h: introduced new config option
+  CONFIG_LL_INIT_NAND_ONLY to perform low-level initialization only when
+  booting from NAND
+include/configs/neo1973.h: got rid of BUILD_FOR_RAM
+cpu/arm920t/start.S: detect if we need to boot from NAND at run time (i.e., if
+  we're running at address 0)
+
+- Werner Almesberger <werner at openmoko.org>
+
+Index: u-boot/cpu/arm920t/start.S
+===================================================================
+--- u-boot.orig/cpu/arm920t/start.S
++++ u-boot/cpu/arm920t/start.S
+@@ -157,18 +157,26 @@
+ 	str	r1, [r0]
+ #endif	/* CONFIG_S3C2400 || CONFIG_S3C2410 */
+ 
+-	/*
+-	 * we do sys-critical inits only at reboot,
+-	 * not when booting from ram!
+-	 */
+ #ifndef CONFIG_SKIP_LOWLEVEL_INIT
++#ifndef CONFIG_LL_INIT_NAND_ONLY
+ 	bl	cpu_init_crit
+ #endif
++#endif
+ 
+ #ifndef CONFIG_SKIP_RELOCATE_UBOOT
+-#ifndef CONFIG_S3C2410_NAND_BOOT
+-relocate:				/* relocate U-Boot to RAM	    */
+ 	adr	r0, _start		/* r0 <- current position of code   */
++
++#ifdef CONFIG_S3C2410_NAND_BOOT
++					/* are we running from NAND ?	    */
++#define	BWSCON	0x48000000
++	ldr	r1, =BWSCON		/* Z = CPU booted from NAND	    */
++	ldr	r1, [r1]
++	tst	r1, #6			/* BWSCON[2:1] = OM[1:0]	    */
++	teqeq	r0, #0			/* Z &= running at address 0	    */
++	beq	nand_load
++#endif /* CONFIG_S3C2410_NAND_BOOT */
++
++relocate:				/* relocate U-Boot to RAM	    */
+ 	ldr	r1, _TEXT_BASE		/* test if we run from flash or RAM */
+ 	cmp     r0, r1                  /* don't reloc during debug         */
+ 	beq     done_relocate
+@@ -188,10 +196,13 @@
+ 	ldr	pc, _done_relocate	/* jump to relocated code */
+ _done_relocate:
+ 	.word	done_relocate
+-done_relocate:
+-#else /* NAND_BOOT */
+-relocate:
+-copy_myself:
++
++#ifdef CONFIG_S3C2410_NAND_BOOT
++nand_load:
++#if !defined(CONFIG_SKIP_LOWLEVEL_INIT) && defined(CONFIG_LL_INIT_NAND_ONLY)
++	bl	cpu_init_crit
++#endif
++
+ 	/* mov	r10, lr */
+ 
+ 	@ reset NAND
+@@ -275,7 +286,8 @@
+ #endif
+ 1:	b	1b
+ done_nand_read:
+-#endif /* NAND_BOOT */
++#endif /* CONFIG_S3C2410_NAND_BOOT */
++done_relocate:
+ #endif /* CONFIG_SKIP_RELOCATE_UBOOT */
+ 
+ 	/* Set up the stack						    */
+Index: u-boot/include/configs/neo1973_gta01.h
+===================================================================
+--- u-boot.orig/include/configs/neo1973_gta01.h
++++ u-boot/include/configs/neo1973_gta01.h
+@@ -26,14 +26,10 @@
+ #ifndef __CONFIG_H
+ #define __CONFIG_H
+ 
+-#if defined(BUILD_FOR_RAM)
+-/* If we want to start u-boot from inside RAM */
+-#define CONFIG_SKIP_LOWLEVEL_INIT	1
+-#else
+-/* we want to start u-boot directly from within NAND flash */
++/* we want to be able to start u-boot directly from within NAND flash */
++#define CONFIG_LL_INIT_NAND_ONLY
+ #define CONFIG_S3C2410_NAND_BOOT	1
+ #define CONFIG_S3C2410_NAND_SKIP_BAD	1
+-#endif
+ 
+ #define CFG_UBOOT_SIZE		0x40000 /* size of u-boot, for NAND loading */
+ 
===============================================%s
>>> DIFF TRUNCATED @ 16K






More information about the Openembedded-commits mailing list