summaryrefslogtreecommitdiff
path: root/recipes/x-load/x-load-1.41
diff options
context:
space:
mode:
authorKoen Kooi <k-kooi@ti.com>2009-09-09 12:27:50 +0200
committerOpenEmbedded User <oe@OE-builder.(none)>2009-09-11 10:13:18 +0200
commit7937ed35de6218a955a63d9ce61d992532fdc5e0 (patch)
tree1aae913d4ff3ab475416ba12fe190fddf6e08360 /recipes/x-load/x-load-1.41
parentede46c7614fd6baaac513d36abb011c5a63772ff (diff)
x-load: add omap3517-evm support
* 1.41 still has the volatile bugs when compiled with non CSL stuff
Diffstat (limited to 'recipes/x-load/x-load-1.41')
-rw-r--r--recipes/x-load/x-load-1.41/0013-board.c-print-boot-method-mmc-onenand-nand.patch52
-rw-r--r--recipes/x-load/x-load-1.41/0014-board.c-check-for-u-boot-on-mmc-on-all-configurati.patch95
-rw-r--r--recipes/x-load/x-load-1.41/0015-OMAP3EVM-Build-issue-fixed.patch77
-rw-r--r--recipes/x-load/x-load-1.41/0016-mmc-fix-infinite-loop-in-mmc_init_stream.patch41
-rw-r--r--recipes/x-load/x-load-1.41/0017-lib-board.c-add-missing-call-to-misc_init_r.patch25
-rw-r--r--recipes/x-load/x-load-1.41/0018-omap3evm-provide-missing-udelay-function.patch27
-rw-r--r--recipes/x-load/x-load-1.41/0019-lib-board.c-Specify-where-u-boot-is-being-loaded-fr.patch45
-rw-r--r--recipes/x-load/x-load-1.41/streen-fix.diff39
8 files changed, 401 insertions, 0 deletions
diff --git a/recipes/x-load/x-load-1.41/0013-board.c-print-boot-method-mmc-onenand-nand.patch b/recipes/x-load/x-load-1.41/0013-board.c-print-boot-method-mmc-onenand-nand.patch
new file mode 100644
index 0000000000..8223cb9dcf
--- /dev/null
+++ b/recipes/x-load/x-load-1.41/0013-board.c-print-boot-method-mmc-onenand-nand.patch
@@ -0,0 +1,52 @@
+From 8433611ac9fe90093f57e2a3e5968d9c61de5e28 Mon Sep 17 00:00:00 2001
+From: Vaibhav Hiremath <hvaibhav@ti.com>
+Date: Mon, 20 Jul 2009 17:54:48 +0530
+Subject: [PATCH] board.c: print boot method (mmc, onenand, nand)
+
+Pulled from 4e1a4e8d4d670ab7a4c281317a8b440f4ee4581a commit
+of sakoman's tree
+---
+ lib/board.c | 5 +++++
+ 1 files changed, 5 insertions(+), 0 deletions(-)
+
+diff --git a/lib/board.c b/lib/board.c
+index bc7d3d1..9dcc31a 100644
+--- a/lib/board.c
++++ b/lib/board.c
+@@ -70,10 +70,12 @@ void start_armboot (void)
+
+ #if defined (CONFIG_OMAP34XX)
+ if ((get_mem_type() == MMC_ONENAND) || (get_mem_type() == MMC_NAND)){
++ printf("Booting from mmc . . .\n");
+ buf += mmc_boot(buf);
+ }
+
+ if (get_mem_type() == GPMC_ONENAND){
++ printf("Booting from onenand . . .\n");
+ for (i = ONENAND_START_BLOCK; i < ONENAND_END_BLOCK; i++){
+ if (!onenand_read_block(buf, i))
+ buf += ONENAND_BLOCK_SIZE;
+@@ -81,6 +83,7 @@ void start_armboot (void)
+ }
+
+ if (get_mem_type() == GPMC_NAND){
++ printf("Booting from nand . . .\n");
+ for (i = NAND_UBOOT_START; i < NAND_UBOOT_END; i+= NAND_BLOCK_SIZE){
+ if (!nand_read_block(buf, i))
+ buf += NAND_BLOCK_SIZE; /* advance buf ptr */
+@@ -88,10 +91,12 @@ void start_armboot (void)
+ }
+ #elif defined (CONFIG_OMAP3517EVM)
+ if (get_mem_type() == GPMC_NAND){
++ printf("Booting from mmc . . .\n");
+ buf += mmc_boot(buf);
+ }
+
+ if (buf == (uchar *)CFG_LOADADDR){
++ printf("Booting from nand . . .\n");
+ for (i = NAND_UBOOT_START; i < NAND_UBOOT_END; i+= NAND_BLOCK_SIZE){
+ if (!nand_read_block(buf, i))
+ buf += NAND_BLOCK_SIZE; /* advance buf ptr */
+--
+1.5.4.3
+
diff --git a/recipes/x-load/x-load-1.41/0014-board.c-check-for-u-boot-on-mmc-on-all-configurati.patch b/recipes/x-load/x-load-1.41/0014-board.c-check-for-u-boot-on-mmc-on-all-configurati.patch
new file mode 100644
index 0000000000..c195a03349
--- /dev/null
+++ b/recipes/x-load/x-load-1.41/0014-board.c-check-for-u-boot-on-mmc-on-all-configurati.patch
@@ -0,0 +1,95 @@
+From fc8eccdf0b7b131fb0c51892dfc19fc977f77276 Mon Sep 17 00:00:00 2001
+From: Vaibhav Hiremath <hvaibhav@ti.com>
+Date: Mon, 20 Jul 2009 22:14:59 +0530
+Subject: [PATCH] board.c: check for u-boot on mmc on all configurations, not just those with managed nand
+
+Pulled from 9fc86b52c5770575b9b02c0049446fa8e266e714 commit
+of sakoman's tree
+---
+ lib/board.c | 60 +++++++++++++++++++++++++---------------------------------
+ 1 files changed, 26 insertions(+), 34 deletions(-)
+
+diff --git a/lib/board.c b/lib/board.c
+index 9dcc31a..11e87da 100644
+--- a/lib/board.c
++++ b/lib/board.c
+@@ -50,7 +50,7 @@ init_fnc_t *init_sequence[] = {
+ serial_init, /* serial communications setup */
+ print_info,
+ #endif
+- nand_init, /* board specific nand init */
++ nand_init, /* board specific nand init */
+ NULL,
+ };
+
+@@ -68,42 +68,34 @@ void start_armboot (void)
+
+ buf = (uchar*) CFG_LOADADDR;
+
+-#if defined (CONFIG_OMAP34XX)
+- if ((get_mem_type() == MMC_ONENAND) || (get_mem_type() == MMC_NAND)){
+- printf("Booting from mmc . . .\n");
+- buf += mmc_boot(buf);
+- }
+-
+- if (get_mem_type() == GPMC_ONENAND){
+- printf("Booting from onenand . . .\n");
+- for (i = ONENAND_START_BLOCK; i < ONENAND_END_BLOCK; i++){
+- if (!onenand_read_block(buf, i))
+- buf += ONENAND_BLOCK_SIZE;
+- }
+- }
+-
+- if (get_mem_type() == GPMC_NAND){
+- printf("Booting from nand . . .\n");
+- for (i = NAND_UBOOT_START; i < NAND_UBOOT_END; i+= NAND_BLOCK_SIZE){
+- if (!nand_read_block(buf, i))
+- buf += NAND_BLOCK_SIZE; /* advance buf ptr */
+- }
+- }
+-#elif defined (CONFIG_OMAP3517EVM)
+- if (get_mem_type() == GPMC_NAND){
+- printf("Booting from mmc . . .\n");
+- buf += mmc_boot(buf);
+- }
++#ifdef CONFIG_MMC
++ /* first try mmc */
++ buf += mmc_boot(buf);
++#endif
+
+- if (buf == (uchar *)CFG_LOADADDR){
+- printf("Booting from nand . . .\n");
+- for (i = NAND_UBOOT_START; i < NAND_UBOOT_END; i+= NAND_BLOCK_SIZE){
+- if (!nand_read_block(buf, i))
+- buf += NAND_BLOCK_SIZE; /* advance buf ptr */
++ if (buf == (uchar *)CFG_LOADADDR) {
++ /* if no u-boot on mmc, try onenand and nand */
++#if !defined (CONFIG_OMAP3517EVM)
++ if (get_mem_type() == GPMC_ONENAND){
++#ifdef CFG_PRINTF
++ printf("Booting from onenand . . .\n");
++#endif
++ for (i = ONENAND_START_BLOCK; i < ONENAND_END_BLOCK; i++){
++ if (!onenand_read_block(buf, i))
++ buf += ONENAND_BLOCK_SIZE;
++ }
+ }
+- }
+ #endif
+-
++ if (get_mem_type() == GPMC_NAND){
++#ifdef CFG_PRINTF
++ printf("Booting from nand . . .\n");
++#endif
++ for (i = NAND_UBOOT_START; i < NAND_UBOOT_END; i+= NAND_BLOCK_SIZE){
++ if (!nand_read_block(buf, i))
++ buf += NAND_BLOCK_SIZE; /* advance buf ptr */
++ }
++ }
++ }
+
+ if (buf == (uchar *)CFG_LOADADDR)
+ hang();
+--
+1.5.4.3
+
diff --git a/recipes/x-load/x-load-1.41/0015-OMAP3EVM-Build-issue-fixed.patch b/recipes/x-load/x-load-1.41/0015-OMAP3EVM-Build-issue-fixed.patch
new file mode 100644
index 0000000000..46afd51752
--- /dev/null
+++ b/recipes/x-load/x-load-1.41/0015-OMAP3EVM-Build-issue-fixed.patch
@@ -0,0 +1,77 @@
+From c44aac2e3e45f9a3a36ba80704104082e5a71100 Mon Sep 17 00:00:00 2001
+From: Vaibhav Hiremath <hvaibhav@ti.com>
+Date: Mon, 20 Jul 2009 22:17:52 +0530
+Subject: [PATCH] OMAP3EVM: Build issue fixed.
+
+The x-loader changes was broken for OMAP3EVM, fixed -
+
+ - GPMC macros were not under proper board macro
+ - Warning fixed from mmc.c
+---
+ cpu/omap3/mmc.c | 3 ++-
+ include/asm/arch-omap3/mem.h | 6 +++---
+ include/configs/omap3517evm.h | 2 +-
+ 3 files changed, 6 insertions(+), 5 deletions(-)
+
+diff --git a/cpu/omap3/mmc.c b/cpu/omap3/mmc.c
+index b9dd5d0..2453477 100755
+--- a/cpu/omap3/mmc.c
++++ b/cpu/omap3/mmc.c
+@@ -46,8 +46,9 @@ block_dev_desc_t *mmc_get_dev(int dev)
+
+ unsigned char mmc_board_init(void)
+ {
+- unsigned int value = 0;
+ #if defined (CONFIG_OMAP34XX)
++ unsigned int value = 0;
++
+ value = CONTROL_PBIAS_LITE;
+ CONTROL_PBIAS_LITE = value | (1 << 2) | (1 << 1) | (1 << 9);
+
+diff --git a/include/asm/arch-omap3/mem.h b/include/asm/arch-omap3/mem.h
+index 8a92484..ae73a9f 100644
+--- a/include/asm/arch-omap3/mem.h
++++ b/include/asm/arch-omap3/mem.h
+@@ -324,7 +324,7 @@ typedef enum {
+ # define SMNAND_GPMC_CONFIG5 0x010C1414
+ # define SMNAND_GPMC_CONFIG6 0x00000A80
+
+-#if defined (CONFIG_OMAP34xx)
++#if defined (CONFIG_OMAP34XX)
+
+ # define M_NAND_GPMC_CONFIG1 0x00001800
+ # define M_NAND_GPMC_CONFIG2 SMNAND_GPMC_CONFIG2
+@@ -372,7 +372,7 @@ typedef enum {
+ # define SMNAND_GPMC_CONFIG6 0x00000A80
+ # define SMNAND_GPMC_CONFIG7 0x00000C44
+
+-#if defined (CONFIG_OMAP34xx)
++#if defined (CONFIG_OMAP34XX)
+
+ # define M_NAND_GPMC_CONFIG1 0x00001800
+ # define M_NAND_GPMC_CONFIG2 SMNAND_GPMC_CONFIG2
+@@ -445,7 +445,7 @@ typedef enum {
+ # define SMNAND_GPMC_CONFIG6 0x1F0F0A80
+ # define SMNAND_GPMC_CONFIG7 0x00000C44
+
+-#if defined (CONFIG_OMAP34xx)
++#if defined (CONFIG_OMAP34XX)
+
+ # define M_NAND_GPMC_CONFIG1 0x00001800
+ # define M_NAND_GPMC_CONFIG2 SMNAND_GPMC_CONFIG2
+diff --git a/include/configs/omap3517evm.h b/include/configs/omap3517evm.h
+index 95deacb..16dc8d8 100644
+--- a/include/configs/omap3517evm.h
++++ b/include/configs/omap3517evm.h
+@@ -124,7 +124,7 @@
+
+ #define GPMC_CONFIG (OMAP34XX_GPMC_BASE+0x50)
+
+-#if defined (CONFIG_OMAP34xx) || (CONFIG_OMAP3517EVM)
++#if defined (CONFIG_OMAP3517EVM)
+ #define GPMC_NAND_COMMAND_0 (OMAP34XX_GPMC_BASE+0x7C)
+ #define GPMC_NAND_ADDRESS_0 (OMAP34XX_GPMC_BASE+0x80)
+ #define GPMC_NAND_DATA_0 (OMAP34XX_GPMC_BASE+0x84)
+--
+1.5.4.3
+
diff --git a/recipes/x-load/x-load-1.41/0016-mmc-fix-infinite-loop-in-mmc_init_stream.patch b/recipes/x-load/x-load-1.41/0016-mmc-fix-infinite-loop-in-mmc_init_stream.patch
new file mode 100644
index 0000000000..1f9b069f66
--- /dev/null
+++ b/recipes/x-load/x-load-1.41/0016-mmc-fix-infinite-loop-in-mmc_init_stream.patch
@@ -0,0 +1,41 @@
+From 47f5d8f6f659848e164b6151c1dac36fdd4eb7a1 Mon Sep 17 00:00:00 2001
+From: Steve Sakoman <steve@sakoman.com>
+Date: Fri, 1 Aug 2008 12:55:44 -0700
+Subject: [PATCH] mmc: fix infinite loop in mmc_init_stream
+
+---
+ cpu/omap3/mmc.c | 11 ++++++++---
+ 1 files changed, 8 insertions(+), 3 deletions(-)
+
+diff --git a/cpu/omap3/mmc.c b/cpu/omap3/mmc.c
+index 2453477..279e2a2 100755
+--- a/cpu/omap3/mmc.c
++++ b/cpu/omap3/mmc.c
+@@ -60,16 +60,21 @@ unsigned char mmc_board_init(void)
+
+ void mmc_init_stream(void)
+ {
++ volatile unsigned int mmc_stat;
++
+ OMAP_HSMMC_CON |= INIT_INITSTREAM;
+
+ OMAP_HSMMC_CMD = MMC_CMD0;
+- while (!(OMAP_HSMMC_STAT & CC_MASK));
++ do {
++ mmc_stat = OMAP_HSMMC_STAT;
++ } while (!(mmc_stat & CC_MASK));
+
+ OMAP_HSMMC_STAT = CC_MASK;
+
+ OMAP_HSMMC_CMD = MMC_CMD0;
+- while (!(OMAP_HSMMC_STAT & CC_MASK));
+-
++ do {
++ mmc_stat = OMAP_HSMMC_STAT;
++ } while (!(mmc_stat & CC_MASK));
+
+ OMAP_HSMMC_STAT = OMAP_HSMMC_STAT;
+ OMAP_HSMMC_CON &= ~INIT_INITSTREAM;
+--
+1.5.4.3
+
diff --git a/recipes/x-load/x-load-1.41/0017-lib-board.c-add-missing-call-to-misc_init_r.patch b/recipes/x-load/x-load-1.41/0017-lib-board.c-add-missing-call-to-misc_init_r.patch
new file mode 100644
index 0000000000..a923724d4c
--- /dev/null
+++ b/recipes/x-load/x-load-1.41/0017-lib-board.c-add-missing-call-to-misc_init_r.patch
@@ -0,0 +1,25 @@
+From 47756aa64c39111942cad5774862fc5f6def362d Mon Sep 17 00:00:00 2001
+From: Steve Sakoman <steve@sakoman.com>
+Date: Thu, 7 Aug 2008 17:38:42 -0700
+Subject: [PATCH] lib/board.c: add missing call to misc_init_r
+
+---
+ lib/board.c | 2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+diff --git a/lib/board.c b/lib/board.c
+index 11e87da..5ef7102 100644
+--- a/lib/board.c
++++ b/lib/board.c
+@@ -66,6 +66,8 @@ void start_armboot (void)
+ }
+ }
+
++ misc_init_r();
++
+ buf = (uchar*) CFG_LOADADDR;
+
+ #ifdef CONFIG_MMC
+--
+1.5.4.3
+
diff --git a/recipes/x-load/x-load-1.41/0018-omap3evm-provide-missing-udelay-function.patch b/recipes/x-load/x-load-1.41/0018-omap3evm-provide-missing-udelay-function.patch
new file mode 100644
index 0000000000..54681cbedc
--- /dev/null
+++ b/recipes/x-load/x-load-1.41/0018-omap3evm-provide-missing-udelay-function.patch
@@ -0,0 +1,27 @@
+From 60455ac7f09e4d1c1472eb206e66185d9fd89ef9 Mon Sep 17 00:00:00 2001
+From: Steve Sakoman <steve@sakoman.com>
+Date: Mon, 18 Aug 2008 11:11:57 -0700
+Subject: [PATCH] omap3evm: provide missing udelay function
+
+---
+ board/omap3evm/omap3evm.c | 4 ++++
+ 1 files changed, 4 insertions(+), 0 deletions(-)
+
+diff --git a/board/omap3evm/omap3evm.c b/board/omap3evm/omap3evm.c
+index 857516b..d4ef29b 100755
+--- a/board/omap3evm/omap3evm.c
++++ b/board/omap3evm/omap3evm.c
+@@ -70,6 +70,10 @@ static inline void delay(unsigned long loops)
+ "bne 1b":"=r" (loops):"0"(loops));
+ }
+
++void udelay (unsigned long usecs) {
++ delay(usecs);
++}
++
+ /*****************************************
+ * Routine: board_init
+ * Description: Early hardware init.
+--
+1.5.4.3
+
diff --git a/recipes/x-load/x-load-1.41/0019-lib-board.c-Specify-where-u-boot-is-being-loaded-fr.patch b/recipes/x-load/x-load-1.41/0019-lib-board.c-Specify-where-u-boot-is-being-loaded-fr.patch
new file mode 100644
index 0000000000..d55a53a4ca
--- /dev/null
+++ b/recipes/x-load/x-load-1.41/0019-lib-board.c-Specify-where-u-boot-is-being-loaded-fr.patch
@@ -0,0 +1,45 @@
+From 989f677e807fdfbae2a13ab1444743bfdf2d63f3 Mon Sep 17 00:00:00 2001
+From: Vaibhav Hiremath <hvaibhav@ti.com>
+Date: Mon, 20 Jul 2009 22:35:36 +0530
+Subject: [PATCH] lib/board.c: Specify where u-boot is being loaded from
+
+Pulled from 65ed00323f3807197a83abc75d62ed2a8d3f60de commit
+from Sakoman's tree
+---
+ lib/board.c | 6 ++++--
+ 1 files changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/lib/board.c b/lib/board.c
+index 5ef7102..e573c66 100644
+--- a/lib/board.c
++++ b/lib/board.c
+@@ -73,6 +73,8 @@ void start_armboot (void)
+ #ifdef CONFIG_MMC
+ /* first try mmc */
+ buf += mmc_boot(buf);
++ if (buf != (uchar *)CFG_LOADADDR)
++ printf("Loading u-boot.bin from mmc\n");
+ #endif
+
+ if (buf == (uchar *)CFG_LOADADDR) {
+@@ -80,7 +82,7 @@ void start_armboot (void)
+ #if !defined (CONFIG_OMAP3517EVM)
+ if (get_mem_type() == GPMC_ONENAND){
+ #ifdef CFG_PRINTF
+- printf("Booting from onenand . . .\n");
++ printf("Loading u-boot.bin from onenand\n");
+ #endif
+ for (i = ONENAND_START_BLOCK; i < ONENAND_END_BLOCK; i++){
+ if (!onenand_read_block(buf, i))
+@@ -90,7 +92,7 @@ void start_armboot (void)
+ #endif
+ if (get_mem_type() == GPMC_NAND){
+ #ifdef CFG_PRINTF
+- printf("Booting from nand . . .\n");
++ printf("Loading u-boot.bin from nand\n");
+ #endif
+ for (i = NAND_UBOOT_START; i < NAND_UBOOT_END; i+= NAND_BLOCK_SIZE){
+ if (!nand_read_block(buf, i))
+--
+1.5.4.3
+
diff --git a/recipes/x-load/x-load-1.41/streen-fix.diff b/recipes/x-load/x-load-1.41/streen-fix.diff
new file mode 100644
index 0000000000..e52c9444cf
--- /dev/null
+++ b/recipes/x-load/x-load-1.41/streen-fix.diff
@@ -0,0 +1,39 @@
+diff -Nurd git/board/omap3517evm/omap3517evm.c /OE/angstrom-dev/xload/x-load/board/omap3517evm/omap3517evm.c
+--- git/board/omap3517evm/omap3517evm.c 2009-07-02 04:26:52.000000000 +0200
++++ /OE/angstrom-dev/xload/x-load/board/omap3517evm/omap3517evm.c 2009-09-04 13:08:54.000000000 +0200
+@@ -98,7 +98,7 @@
+ */
+ #define EMIF4_DDR1_RD_LAT 0x6
+ #define EMIF4_DDR1_PWRDN_DIS 0x1
+-#define EMIF4_DDR1_STRBEN_EXT 0x1
++#define EMIF4_DDR1_STRBEN_EXT 0x0
+ #define EMIF4_DDR1_DLL_MODE 0x0
+ #define EMIF4_DDR1_VTP_DYN 0x1
+ #define EMIF4_DDR1_LB_CK_SEL 0x0
+diff -Nurd git/board/omap3evm/omap3evm.c /OE/angstrom-dev/xload/x-load/board/omap3evm/omap3evm.c
+--- git/board/omap3evm/omap3evm.c 2009-07-02 04:26:52.000000000 +0200
++++ /OE/angstrom-dev/xload/x-load/board/omap3evm/omap3evm.c 2009-09-09 16:36:07.000000000 +0200
+@@ -70,6 +70,10 @@
+ "bne 1b":"=r" (loops):"0"(loops));
+ }
+
++void udelay (unsigned long usecs) {
++ delay(usecs);
++}
++
+ /*****************************************
+ * Routine: board_init
+ * Description: Early hardware init.
+@@ -681,6 +685,12 @@
+ sr32(CM_FCLKEN1_CORE, 13, 1, 0x1);
+ sr32(CM_ICLKEN1_CORE, 13, 1, 0x1);
+ #endif
++
++#ifdef CONFIG_MMC
++ /* Enable MMC1 clocks */
++ sr32(CM_FCLKEN1_CORE, 24, 1, 0x1);
++ sr32(CM_ICLKEN1_CORE, 24, 1, 0x1);
++#endif
+ delay(1000);
+ }
+