* [U-Boot] [PATCH] arm926ejs, suen3: fix relocation issues
@ 2010-10-18 6:13 Heiko Schocher
2010-10-19 6:50 ` Prafulla Wadaskar
2010-10-19 8:08 ` [U-Boot] [PATCH v2] " Heiko Schocher
0 siblings, 2 replies; 9+ messages in thread
From: Heiko Schocher @ 2010-10-18 6:13 UTC (permalink / raw)
To: u-boot
- use internal 2k security SRAM as RAM for early stack.
- do early inits in board_init_f()
Signed-off-by: Heiko Schocher <hs@denx.de>
Cc: Prafulla Wadaskar <prafulla@marvell.com>
---
board/keymile/km_arm/km_arm.c | 24 +++++++++++++++---------
include/configs/km_arm.h | 6 ++++--
2 files changed, 19 insertions(+), 11 deletions(-)
diff --git a/board/keymile/km_arm/km_arm.c b/board/keymile/km_arm/km_arm.c
index 7c0b858..a2a8bfe 100644
--- a/board/keymile/km_arm/km_arm.c
+++ b/board/keymile/km_arm/km_arm.c
@@ -143,7 +143,7 @@ int misc_init_r(void)
return 0;
}
-int board_init(void)
+int board_early_init_f(void)
{
u32 tmp;
@@ -160,14 +160,6 @@ int board_init(void)
writel(tmp & (~FLASH_GPIO_PIN) , KW_GPIO0_BASE + 4);
printf("KM: setting NAND mode\n");
- /*
- * arch number of board
- */
- gd->bd->bi_arch_number = MACH_TYPE_SUEN3;
-
- /* address of boot parameters */
- gd->bd->bi_boot_params = kw_sdram_bar(0) + 0x100;
-
#if defined(CONFIG_SOFT_I2C)
/* init the GPIO for I2C Bitbang driver */
kw_gpio_set_valid(SUEN3_SDA_PIN, 1);
@@ -179,6 +171,20 @@ int board_init(void)
kw_gpio_set_valid(SUEN3_ENV_WP, 38);
kw_gpio_direction_output(SUEN3_ENV_WP, 1);
#endif
+
+ return 0;
+}
+
+int board_init(void)
+{
+ /*
+ * arch number of board
+ */
+ gd->bd->bi_arch_number = MACH_TYPE_SUEN3;
+
+ /* address of boot parameters */
+ gd->bd->bi_boot_params = kw_sdram_bar(0) + 0x100;
+
return 0;
}
diff --git a/include/configs/km_arm.h b/include/configs/km_arm.h
index faa0f50..9270296 100644
--- a/include/configs/km_arm.h
+++ b/include/configs/km_arm.h
@@ -182,6 +182,8 @@ int get_scl (void);
/* additions for new relocation code, must be added to all boards */
#define CONFIG_SYS_SDRAM_BASE 0x00000000
-#define CONFIG_SYS_INIT_SP_ADDR (0x00000000 + 0x1000 - /* Fix this */ \
- CONFIG_SYS_GBL_DATA_SIZE)
+/* Kirkwood has 2k of Security SRAM, use it for SP */
+#define CONFIG_SYS_INIT_SP_ADDR 0xC8012000
+/* Do early setups now in board_init_f() */
+#define CONFIG_BOARD_EARLY_INIT_F 1
#endif /* _CONFIG_KM_ARM_H */
--
1.7.2.3
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [U-Boot] [PATCH] arm926ejs, suen3: fix relocation issues
2010-10-18 6:13 [U-Boot] [PATCH] arm926ejs, suen3: fix relocation issues Heiko Schocher
@ 2010-10-19 6:50 ` Prafulla Wadaskar
2010-10-19 8:06 ` Heiko Schocher
2010-10-19 8:08 ` [U-Boot] [PATCH v2] " Heiko Schocher
1 sibling, 1 reply; 9+ messages in thread
From: Prafulla Wadaskar @ 2010-10-19 6:50 UTC (permalink / raw)
To: u-boot
> -----Original Message-----
> From: Heiko Schocher [mailto:hs at denx.de]
> Sent: Monday, October 18, 2010 11:43 AM
> To: u-boot at lists.denx.de
> Cc: Heiko Schocher; Prafulla Wadaskar
> Subject: [PATCH] arm926ejs, suen3: fix relocation issues
>
...snip...
> diff --git a/include/configs/km_arm.h b/include/configs/km_arm.h
> index faa0f50..9270296 100644
> --- a/include/configs/km_arm.h
> +++ b/include/configs/km_arm.h
> @@ -182,6 +182,8 @@ int get_scl (void);
>
> /* additions for new relocation code, must be added to all boards */
> #define CONFIG_SYS_SDRAM_BASE 0x00000000
> -#define CONFIG_SYS_INIT_SP_ADDR (0x00000000 +
> 0x1000 - /* Fix this */ \
> - CONFIG_SYS_GBL_DATA_SIZE)
> +/* Kirkwood has 2k of Security SRAM, use it for SP */
> +#define CONFIG_SYS_INIT_SP_ADDR 0xC8012000
> +/* Do early setups now in board_init_f() */
> +#define CONFIG_BOARD_EARLY_INIT_F 1
Do you really need to 1 here ?
Also can you pls confirm that you are getting early console message as pointed by Eric Cooper
http://lists.denx.de/pipermail/u-boot/2010-October/079545.html
Regards..
Prafulla . .
^ permalink raw reply [flat|nested] 9+ messages in thread
* [U-Boot] [PATCH] arm926ejs, suen3: fix relocation issues
2010-10-19 6:50 ` Prafulla Wadaskar
@ 2010-10-19 8:06 ` Heiko Schocher
2010-10-19 10:43 ` Eric Cooper
0 siblings, 1 reply; 9+ messages in thread
From: Heiko Schocher @ 2010-10-19 8:06 UTC (permalink / raw)
To: u-boot
Helo Prafulla,
Prafulla Wadaskar wrote:
>> -----Original Message-----
>> From: Heiko Schocher [mailto:hs at denx.de]
>> Sent: Monday, October 18, 2010 11:43 AM
>> To: u-boot at lists.denx.de
>> Cc: Heiko Schocher; Prafulla Wadaskar
>> Subject: [PATCH] arm926ejs, suen3: fix relocation issues
>>
> ...snip...
>
>> diff --git a/include/configs/km_arm.h b/include/configs/km_arm.h
>> index faa0f50..9270296 100644
>> --- a/include/configs/km_arm.h
>> +++ b/include/configs/km_arm.h
>> @@ -182,6 +182,8 @@ int get_scl (void);
>>
>> /* additions for new relocation code, must be added to all boards */
>> #define CONFIG_SYS_SDRAM_BASE 0x00000000
>> -#define CONFIG_SYS_INIT_SP_ADDR (0x00000000 +
>> 0x1000 - /* Fix this */ \
>> - CONFIG_SYS_GBL_DATA_SIZE)
>> +/* Kirkwood has 2k of Security SRAM, use it for SP */
>> +#define CONFIG_SYS_INIT_SP_ADDR 0xC8012000
>> +/* Do early setups now in board_init_f() */
>> +#define CONFIG_BOARD_EARLY_INIT_F 1
>
> Do you really need to 1 here ?
No, I fix this in v2.
> Also can you pls confirm that you are getting early console message as pointed by Eric Cooper
> http://lists.denx.de/pipermail/u-boot/2010-October/079545.html
Hmm.. don;t know if we can compare this, because the suen3 starts
from spi flash ... and I see this messages on the suen3 ... Maybe,
Eric (added to cc: ) should also try to do early things
(like kirkwood_mpp_conf()) in board_early_init_f() as I on the
suen3?
bye,
Heiko
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
^ permalink raw reply [flat|nested] 9+ messages in thread
* [U-Boot] [PATCH v2] arm926ejs, suen3: fix relocation issues
2010-10-18 6:13 [U-Boot] [PATCH] arm926ejs, suen3: fix relocation issues Heiko Schocher
2010-10-19 6:50 ` Prafulla Wadaskar
@ 2010-10-19 8:08 ` Heiko Schocher
2010-10-20 5:37 ` Prafulla Wadaskar
2010-10-20 9:51 ` Prafulla Wadaskar
1 sibling, 2 replies; 9+ messages in thread
From: Heiko Schocher @ 2010-10-19 8:08 UTC (permalink / raw)
To: u-boot
- use internal 2k security SRAM as RAM for early stack.
- do early inits in board_init_f()
Signed-off-by: Heiko Schocher <hs@denx.de>
Cc: Prafulla Wadaskar <prafulla@marvell.com>
---
changes since v1:
- Add comment from Prafulla Wadaskar, no "1" needed if defining
CONFIG_BOARD_EARLY_INIT_F
board/keymile/km_arm/km_arm.c | 24 +++++++++++++++---------
include/configs/km_arm.h | 6 ++++--
2 files changed, 19 insertions(+), 11 deletions(-)
diff --git a/board/keymile/km_arm/km_arm.c b/board/keymile/km_arm/km_arm.c
index 7c0b858..a2a8bfe 100644
--- a/board/keymile/km_arm/km_arm.c
+++ b/board/keymile/km_arm/km_arm.c
@@ -143,7 +143,7 @@ int misc_init_r(void)
return 0;
}
-int board_init(void)
+int board_early_init_f(void)
{
u32 tmp;
@@ -160,14 +160,6 @@ int board_init(void)
writel(tmp & (~FLASH_GPIO_PIN) , KW_GPIO0_BASE + 4);
printf("KM: setting NAND mode\n");
- /*
- * arch number of board
- */
- gd->bd->bi_arch_number = MACH_TYPE_SUEN3;
-
- /* address of boot parameters */
- gd->bd->bi_boot_params = kw_sdram_bar(0) + 0x100;
-
#if defined(CONFIG_SOFT_I2C)
/* init the GPIO for I2C Bitbang driver */
kw_gpio_set_valid(SUEN3_SDA_PIN, 1);
@@ -179,6 +171,20 @@ int board_init(void)
kw_gpio_set_valid(SUEN3_ENV_WP, 38);
kw_gpio_direction_output(SUEN3_ENV_WP, 1);
#endif
+
+ return 0;
+}
+
+int board_init(void)
+{
+ /*
+ * arch number of board
+ */
+ gd->bd->bi_arch_number = MACH_TYPE_SUEN3;
+
+ /* address of boot parameters */
+ gd->bd->bi_boot_params = kw_sdram_bar(0) + 0x100;
+
return 0;
}
diff --git a/include/configs/km_arm.h b/include/configs/km_arm.h
index faa0f50..4b706f1 100644
--- a/include/configs/km_arm.h
+++ b/include/configs/km_arm.h
@@ -182,6 +182,8 @@ int get_scl (void);
/* additions for new relocation code, must be added to all boards */
#define CONFIG_SYS_SDRAM_BASE 0x00000000
-#define CONFIG_SYS_INIT_SP_ADDR (0x00000000 + 0x1000 - /* Fix this */ \
- CONFIG_SYS_GBL_DATA_SIZE)
+/* Kirkwood has 2k of Security SRAM, use it for SP */
+#define CONFIG_SYS_INIT_SP_ADDR 0xC8012000
+/* Do early setups now in board_init_f() */
+#define CONFIG_BOARD_EARLY_INIT_F
#endif /* _CONFIG_KM_ARM_H */
--
1.7.2.3
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [U-Boot] [PATCH] arm926ejs, suen3: fix relocation issues
2010-10-19 8:06 ` Heiko Schocher
@ 2010-10-19 10:43 ` Eric Cooper
2010-10-19 11:04 ` Prafulla Wadaskar
2010-10-20 10:21 ` Prafulla Wadaskar
0 siblings, 2 replies; 9+ messages in thread
From: Eric Cooper @ 2010-10-19 10:43 UTC (permalink / raw)
To: u-boot
> Maybe, Eric (added to cc: ) should also try to do early things (like
> kirkwood_mpp_conf()) in board_early_init_f() as I on the suen3?
I will try this and let you know. But the most helpful data point for
me would be whether display_banner etc. currently works on a
SheevaPlug, which is almost identical to the DockStar.
--
Eric Cooper e c c @ c m u . e d u
^ permalink raw reply [flat|nested] 9+ messages in thread
* [U-Boot] [PATCH] arm926ejs, suen3: fix relocation issues
2010-10-19 10:43 ` Eric Cooper
@ 2010-10-19 11:04 ` Prafulla Wadaskar
2010-10-20 10:21 ` Prafulla Wadaskar
1 sibling, 0 replies; 9+ messages in thread
From: Prafulla Wadaskar @ 2010-10-19 11:04 UTC (permalink / raw)
To: u-boot
> -----Original Message-----
> From: Eric Cooper [mailto:ecc at cmu.edu]
> Sent: Tuesday, October 19, 2010 4:14 PM
> To: Heiko Schocher
> Cc: Prafulla Wadaskar; u-boot at lists.denx.de
> Subject: Re: [PATCH] arm926ejs, suen3: fix relocation issues
>
> > Maybe, Eric (added to cc: ) should also try to do early things (like
> > kirkwood_mpp_conf()) in board_early_init_f() as I on the suen3?
>
> I will try this and let you know. But the most helpful data point for
> me would be whether display_banner etc. currently works on a
> SheevaPlug, which is almost identical to the DockStar.
Hi Eric
I checked on Sheevaplug, but sheevaplug has usb-UART interface, that does not help to test this.
Since by the time UART is up board is in booted state.
There is anther way to test this, erase native u-boot and check from boot from DRAM, I have not tested this yet.
But I think this must be problem on sheevaplug too ?
Regards..
Prafulla . .
>
> --
> Eric Cooper e c c @ c m u . e d u
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* [U-Boot] [PATCH v2] arm926ejs, suen3: fix relocation issues
2010-10-19 8:08 ` [U-Boot] [PATCH v2] " Heiko Schocher
@ 2010-10-20 5:37 ` Prafulla Wadaskar
2010-10-20 9:51 ` Prafulla Wadaskar
1 sibling, 0 replies; 9+ messages in thread
From: Prafulla Wadaskar @ 2010-10-20 5:37 UTC (permalink / raw)
To: u-boot
> -----Original Message-----
> From: Heiko Schocher [mailto:hs at denx.de]
> Sent: Tuesday, October 19, 2010 1:39 PM
> To: u-boot at lists.denx.de
> Cc: Heiko Schocher; Prafulla Wadaskar
> Subject: [PATCH v2] arm926ejs, suen3: fix relocation issues
>
> - use internal 2k security SRAM as RAM for early stack.
> - do early inits in board_init_f()
>
> Signed-off-by: Heiko Schocher <hs@denx.de>
> Cc: Prafulla Wadaskar <prafulla@marvell.com>
>
> ---
> changes since v1:
> - Add comment from Prafulla Wadaskar, no "1" needed if defining
> CONFIG_BOARD_EARLY_INIT_F
>
> board/keymile/km_arm/km_arm.c | 24 +++++++++++++++---------
> include/configs/km_arm.h | 6 ++++--
> 2 files changed, 19 insertions(+), 11 deletions(-)
Ack
Regards..
Prafulla . .
^ permalink raw reply [flat|nested] 9+ messages in thread
* [U-Boot] [PATCH v2] arm926ejs, suen3: fix relocation issues
2010-10-19 8:08 ` [U-Boot] [PATCH v2] " Heiko Schocher
2010-10-20 5:37 ` Prafulla Wadaskar
@ 2010-10-20 9:51 ` Prafulla Wadaskar
1 sibling, 0 replies; 9+ messages in thread
From: Prafulla Wadaskar @ 2010-10-20 9:51 UTC (permalink / raw)
To: u-boot
> -----Original Message-----
> From: Heiko Schocher [mailto:hs at denx.de]
> Sent: Tuesday, October 19, 2010 1:39 PM
> To: u-boot at lists.denx.de
> Cc: Heiko Schocher; Prafulla Wadaskar
> Subject: [PATCH v2] arm926ejs, suen3: fix relocation issues
>
> - use internal 2k security SRAM as RAM for early stack.
> - do early inits in board_init_f()
>
> Signed-off-by: Heiko Schocher <hs@denx.de>
> Cc: Prafulla Wadaskar <prafulla@marvell.com>
>
> ---
> changes since v1:
> - Add comment from Prafulla Wadaskar, no "1" needed if defining
> CONFIG_BOARD_EARLY_INIT_F
>
> board/keymile/km_arm/km_arm.c | 24 +++++++++++++++---------
> include/configs/km_arm.h | 6 ++++--
> 2 files changed, 19 insertions(+), 11 deletions(-)
>
Applied to u-boot-marvell.git master branch
Regards..
Prafulla . .
^ permalink raw reply [flat|nested] 9+ messages in thread
* [U-Boot] [PATCH] arm926ejs, suen3: fix relocation issues
2010-10-19 10:43 ` Eric Cooper
2010-10-19 11:04 ` Prafulla Wadaskar
@ 2010-10-20 10:21 ` Prafulla Wadaskar
1 sibling, 0 replies; 9+ messages in thread
From: Prafulla Wadaskar @ 2010-10-20 10:21 UTC (permalink / raw)
To: u-boot
> -----Original Message-----
> From: Prafulla Wadaskar
> Sent: Tuesday, October 19, 2010 4:35 PM
> To: 'Eric Cooper'; Heiko Schocher
> Cc: u-boot at lists.denx.de
> Subject: RE: [PATCH] arm926ejs, suen3: fix relocation issues
>
>
>
> > -----Original Message-----
> > From: Eric Cooper [mailto:ecc at cmu.edu]
> > Sent: Tuesday, October 19, 2010 4:14 PM
> > To: Heiko Schocher
> > Cc: Prafulla Wadaskar; u-boot at lists.denx.de
> > Subject: Re: [PATCH] arm926ejs, suen3: fix relocation issues
> >
> > > Maybe, Eric (added to cc: ) should also try to do early
> things (like
> > > kirkwood_mpp_conf()) in board_early_init_f() as I on the suen3?
> >
> > I will try this and let you know. But the most helpful
> data point for
> > me would be whether display_banner etc. currently works on a
> > SheevaPlug, which is almost identical to the DockStar.
>
> Hi Eric
> I checked on Sheevaplug, but sheevaplug has usb-UART
> interface, that does not help to test this.
> Since by the time UART is up board is in booted state.
>
> There is anther way to test this, erase native u-boot and
> check from boot from DRAM, I have not tested this yet.
>
> But I think this must be problem on sheevaplug too ?
Crosschecked, This problem is on all the Kirkwood boards,
I am posting fix up patch for all Marvell boards.
Regards..
Prafulla . .
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2010-10-20 10:21 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-18 6:13 [U-Boot] [PATCH] arm926ejs, suen3: fix relocation issues Heiko Schocher
2010-10-19 6:50 ` Prafulla Wadaskar
2010-10-19 8:06 ` Heiko Schocher
2010-10-19 10:43 ` Eric Cooper
2010-10-19 11:04 ` Prafulla Wadaskar
2010-10-20 10:21 ` Prafulla Wadaskar
2010-10-19 8:08 ` [U-Boot] [PATCH v2] " Heiko Schocher
2010-10-20 5:37 ` Prafulla Wadaskar
2010-10-20 9:51 ` Prafulla Wadaskar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox