Changes to move hawkboard to the new infrastructure.
Subsystems (2)
PATCH 2/2 Changes to move hawkboard to the new infrastructure.
This patch moves hawkboard to the new spl infrastructure from the older nand_spl one. Making this change required some code refactoring with a couple of davinci based platforms which use spl.
Removed the hawkboard_nand_config build option -- The spl code now gets compiled with hawkboard_config, after building the main u-boot image, using the CONFIG_SPL_TEXT_BASE. Modified the README.hawkboard to reflect the same.
---
arch/arm/cpu/arm926ejs/davinci/Makefile | 7 +-
.../cpu/arm926ejs/davinci/{spl.c => da850_spl.c} | 46 +------
.../cpu/arm926ejs/davinci/{spl.c => dm365_spl.c} | 60 +--------
.../cpu/arm926ejs/davinci}/hawkboard_nand_spl.c | 34 ++---
arch/arm/cpu/arm926ejs/davinci/spl.c | 49 +------
.../{u-boot-spl.lds => u-boot-spl-da850evm.lds} | 0
.../davinci/da8xxevm/u-boot-spl-hawk.lds | 22 ++-
boards.cfg | 1 -
doc/README.hawkboard | 43 +++---
include/configs/cam_enc_4xx.h | 1 +
include/configs/da850evm.h | 3 +-
include/configs/hawkboard.h | 17 ++-
nand_spl/board/davinci/da8xxevm/Makefile | 155 --------------------
13 files changed, 71 insertions(+), 367 deletions(-)
copy arch/arm/cpu/arm926ejs/davinci/{spl.c => da850_spl.c} (68%)
copy arch/arm/cpu/arm926ejs/davinci/{spl.c => dm365_spl.c} (50%)
rename {board/davinci/da8xxevm => arch/arm/cpu/arm926ejs/davinci}/hawkboard_nand_spl.c (90%)
rename board/davinci/da8xxevm/{u-boot-spl.lds => u-boot-spl-da850evm.lds} (100%)
rename nand_spl/board/davinci/da8xxevm/u-boot.lds => board/davinci/da8xxevm/u-boot-spl-hawk.lds (86%)
delete mode 100644 nand_spl/board/davinci/da8xxevm/Makefilearch/arm/cpu/arm926ejs/davinci/Makefile +5 -2
@@ -38,8 +38,11 @@ COBJS-$(CONFIG_DRIVER_TI_EMAC) += lxt972.o dp83848.o et1011c.o ksz8873.o ifdef CONFIG_SPL_BUILD COBJS-y += spl.o -COBJS-$(CONFIG_SOC_DM365) += dm365_lowlevel.o -COBJS-$(CONFIG_SOC_DA8XX) += da850_lowlevel.o +COBJS-$(CONFIG_DM365_SPL) += dm365_lowlevel.o +COBJS-$(CONFIG_DM365_SPL) += dm365_spl.o +COBJS-$(CONFIG_DA850EVM_SPL) += da850_lowlevel.o +COBJS-$(CONFIG_DA850EVM_SPL) += da850_spl.o +COBJS-$(CONFIG_HAWKBOARD_SPL) += hawkboard_nand_spl.o endif SOBJS = reset.o
arch/arm/cpu/arm926ejs/davinci/da850_spl.c renamed from arch/arm/cpu/arm926ejs/davinci/spl.c +2 -44
73 lines not on this page · raw message
arch/arm/cpu/arm926ejs/davinci/dm365_spl.c renamed from arch/arm/cpu/arm926ejs/davinci/spl.c +2 -58
79 lines not on this page · raw message
arch/arm/cpu/arm926ejs/davinci/hawkboard_nand_spl.c renamed from board/davinci/da8xxevm/hawkboard_nand_spl.c +11 -23
@@ -85,31 +85,19 @@ void board_init_f(ulong bootflag)NS16550_init ((NS16550_t)(DAVINCI_UART2_BASE ),CONFIG_SYS_NS16550_CLK /16 /CONFIG_BAUDRATE ); -puts ("Nand boot...\n" ); - -nand_boot (); -} - -void puts (const char *str) -{ -while (*str) -putc (*str++); +/* +* Skip relocation by passing spl's text base as +* the dest address to relocate_code. We really +* call this for clearing the bss before accessing +* the nand functions which need a zero'ed bss. +*/ +relocate_code (CONFIG_SPL_STACK , (gd_t *)gd,CONFIG_SPL_TEXT_BASE ); } -void putc (char c) +void board_init_r (gd_t *id,ulong dest_addr) { -if (gd->flags &GD_FLG_SILENT ) -return ; - -if (c =='\n' ) -NS16550_putc ((NS16550_t)(DAVINCI_UART2_BASE ),'\r' ); - -NS16550_putc ((NS16550_t)(DAVINCI_UART2_BASE ), c); -} +nand_init (); +puts ("Nand boot...\n" ); -void hang (void ) -{ -puts ("### ERROR ### Please RESET the board ###\n" ); -for (;;) - ; +nand_boot (); }
arch/arm/cpu/arm926ejs/davinci/spl.c +1 -48
66 lines not on this page · raw message
board/davinci/da8xxevm/u-boot-spl-da850evm.lds renamed from board/davinci/da8xxevm/u-boot-spl.lds +0 -0
board/davinci/da8xxevm/u-boot-spl-hawk.lds renamed from nand_spl/board/davinci/da8xxevm/u-boot.lds +13 -9
@@ -34,11 +34,11 @@ SECTIONS . = ALIGN(4); .text : { - start.o (.text) - cpu.o (.text) - nand_boot.o (.text) + arch/arm/cpu/arm926ejs/start.o (.text) + arch/arm/cpu/arm926ejs/davinci/libdavinci.o (.text) + drivers/mtd/nand/libnand.o (.text) - *(.text) + *(.text*) } . = ALIGN(4);
@@ -68,10 +68,14 @@ SECTIONS __got_end = .; - _end = .; + .bss : + { + . = ALIGN(4); + __bss_start = .; + *(.bss*) + . = ALIGN(4); + __bss_end__ = .; + } - . = ALIGN(4); - __bss_start = .; - .bss : { *(.bss) } - __bss_end__ = .; + _end = .; }
boards.cfg +0 -1
@@ -133,7 +133,6 @@ davinci_sffsdr arm arm926ejs sffsdr davinci davinci_sonata arm arm926ejs sonata davinci davinci ea20 arm arm926ejs ea20 davinci davinci hawkboard arm arm926ejs da8xxevm davinci davinci -hawkboard_nand arm arm926ejs da8xxevm davinci davinci hawkboard:NAND_U_BOOT hawkboard_uart arm arm926ejs da8xxevm davinci davinci hawkboard:UART_U_BOOT enbw_cmc arm arm926ejs enbw_cmc enbw davinci km_kirkwood arm arm926ejs km_arm keymile kirkwood km_kirkwood:KM_DISABLE_PCI
doc/README.hawkboard +21 -22
80 lines not on this page · raw message
include/configs/cam_enc_4xx.h +1 -0
@@ -205,6 +205,7 @@/* Defines for SPL */ #define CONFIG_SPL +#define CONFIG_DM365_SPL #define CONFIG_SPL_NAND_SUPPORT #define CONFIG_SPL_NAND_SIMPLE #define CONFIG_SPL_NAND_LOAD
include/configs/da850evm.h +2 -1
@@ -311,6 +311,7 @@/* defines for SPL */ #define CONFIG_SPL +#define CONFIG_DA850EVM_SPL #define CONFIG_SPL_SPI_SUPPORT #define CONFIG_SPL_SPI_FLASH_SUPPORT #define CONFIG_SPL_SPI_LOAD
@@ -319,7 +320,7 @@#define CONFIG_SPL_SERIAL_SUPPORT #define CONFIG_SPL_LIBCOMMON_SUPPORT #define CONFIG_SPL_LIBGENERIC_SUPPORT -#define CONFIG_SPL_LDSCRIPT "$(BOARDDIR)/u-boot-spl.lds" +#define CONFIG_SPL_LDSCRIPT "board/$(BOARDDIR)/u-boot-spl-da850evm.lds"#define CONFIG_SPL_STACK 0x8001ff00#define CONFIG_SPL_TEXT_BASE 0x80000000#define CONFIG_SPL_MAX_SIZE 32768
include/configs/hawkboard.h +13 -4
@@ -43,12 +43,23 @@#define CONFIG_SKIP_LOWLEVEL_INIT #define CONFIG_BOARD_EARLY_INIT_F -#if defined(CONFIG_NAND_U_BOOT ) || defined(CONFIG_UART_U_BOOT ) +#if defined(CONFIG_UART_U_BOOT )#define CONFIG_SYS_TEXT_BASE 0xc1080000 -#else +#elif !defined(CONFIG_SPL_BUILD )#define CONFIG_SYS_TEXT_BASE 0xc1180000#endif +/* Spl */ +#define CONFIG_SPL +#define CONFIG_HAWKBOARD_SPL +#define CONFIG_SPL_NAND_SUPPORT +#define CONFIG_SPL_NAND_SIMPLE +#define CONFIG_SPL_NAND_LOAD +#define CONFIG_SPL_SERIAL_SUPPORT +#define CONFIG_SPL_LDSCRIPT "board/$(BOARDDIR)/u-boot-spl-hawk.lds" +#define CONFIG_SPL_TEXT_BASE 0xc1080000 +#define CONFIG_SPL_STACK CONFIG_SYS_INIT_SP_ADDR +/* * Memory Info */
@@ -84,9 +95,7 @@/* * Network & Ethernet Configuration */ -#if !defined(CONFIG_NAND_SPL )#define CONFIG_DRIVER_TI_EMAC -#endif #define CONFIG_MII #define CONFIG_BOOTP_DEFAULT #define CONFIG_BOOTP_DNS
nand_spl/board/davinci/da8xxevm/Makefile deleted +0 -155
155 lines not on this page · raw message
Signature · 1 line
1.7.5.4
PATCH 2/2 Changes to move hawkboard to the new infrastructure.
Quoted 8 lines · Sughosh Ganu
This patch moves hawkboard to the new spl infrastructure from the older
nand_splone. Making this change required some code refactoring with a couple of davinci based platforms which use spl.Removed the
hawkboard_nand_configbuild option -- The spl code now gets compiled withhawkboard_config, after building the main u-boot image, using theCONFIG_SPL_TEXT_BASE. Modified the README.hawkboard to reflect the same.
[snip]
On the whole, I'm happy, but:
[snip]
Quoted 4 lines
arch/arm/cpu/arm926ejs/davinci/Makefile +0
-0@@ -38,8 +38,11 @@ COBJS-$(CONFIG_DRIVER_TI_EMAC) += lxt972.o dp83848.o et1011c.o ksz8873.o
arch/arm/cpu/arm926ejs/davinci/Makefile COBJS-$(CONFIG_DRIVER_TI_EMAC) += lxt972.o dp83848.o et1011c.o ksz8873.o · line 46
Quoted 10 lines
arch/arm/cpu/arm926ejs/davinci/Makefile +5
-2ifdef CONFIG_SPL_BUILD COBJS-y += spl.o -COBJS-$(CONFIG_SOC_DM365) += dm365_lowlevel.o -COBJS-$(CONFIG_SOC_DA8XX) += da850_lowlevel.o +COBJS-$(CONFIG_DM365_SPL) += dm365_lowlevel.o +COBJS-$(CONFIG_DM365_SPL) += dm365_spl.o +COBJS-$(CONFIG_DA850EVM_SPL) += da850_lowlevel.o +COBJS-$(CONFIG_DA850EVM_SPL) += da850_spl.o +COBJS-$(CONFIG_HAWKBOARD_SPL) += hawkboard_nand_spl.o endif
CONFIG_SPL_BUILD means we'll only do this on the SPL build, not the normal build, and we already have symbols for the board and the SoC so we shouldn't need any new CONFIG symbols here, I'm pretty sure.
Signature · 1 line
Tom
PATCH 2/2 Changes to move hawkboard to the new infrastructure.
Quoted 1 line · Tom Rini
On 01/09/2012 11:28 AM, Sughosh Ganu wrote:
<snip>
Quoted 4 lines
Quoted 4 lines
arch/arm/cpu/arm926ejs/davinci/Makefile +0
-0@@ -38,8 +38,11 @@ COBJS-$(CONFIG_DRIVER_TI_EMAC) += lxt972.o dp83848.o et1011c.o ksz8873.o
Quoted 14 lines
arch/arm/cpu/arm926ejs/davinci/Makefile COBJS-$(CONFIG_DRIVER_TI_EMAC) += lxt972.o dp83848.o et1011c.o ksz8873.o · line 46
Quoted 10 lines
arch/arm/cpu/arm926ejs/davinci/Makefile +5
-2ifdef CONFIG_SPL_BUILD COBJS-y += spl.o -COBJS-$(CONFIG_SOC_DM365) += dm365_lowlevel.o -COBJS-$(CONFIG_SOC_DA8XX) += da850_lowlevel.o +COBJS-$(CONFIG_DM365_SPL) += dm365_lowlevel.o +COBJS-$(CONFIG_DM365_SPL) += dm365_spl.o +COBJS-$(CONFIG_DA850EVM_SPL) += da850_lowlevel.o +COBJS-$(CONFIG_DA850EVM_SPL) += da850_spl.o +COBJS-$(CONFIG_HAWKBOARD_SPL) += hawkboard_nand_spl.o endif
CONFIG_SPL_BUILDmeans we'll only do this on the SPL build, not the normal build, and we already have symbols for the board and the SoC so we shouldn't need any new CONFIG symbols here, I'm pretty sure.
The problem here is that both da850evm and hawkboard define the CONFIG_SOC_DA850, and CONFIG_SOC_DA8XX, as the hawkboard shares code like pinmux with the da850.
I see a CONFIG_MACH_DAVINCI_* like define in da850evm.h and hawkboard.h. Should i add a similar define for cam_enc_4xx, and use these instead.
-sughosh
PATCH 2/2 Changes to move hawkboard to the new infrastructure.
Hi Sughosh and Tom,
Quoted 8 lines · Sughosh Ganu
Quoted 1 line · Tom Rini
On 01/09/2012 11:28 AM, Sughosh Ganu wrote:
<snip>
Quoted 3 lines
arch/arm/cpu/arm926ejs/davinci/Makefile COBJS-$(CONFIG_DRIVER_TI_EMAC) += lxt972.o
Quoted 3 lines
arch/arm/cpu/arm926ejs/davinci/Makefile +0
-0@@ -38,8 +38,11 @@ COBJS-$(CONFIG_DRIVER_TI_EMAC) += lxt972.o
dp83848.o et1011c.o ksz8873.o
Quoted 16 lines
Quoted 15 lines
arch/arm/cpu/arm926ejs/davinci/Makefile COBJS-$(CONFIG_DRIVER_TI_EMAC) += lxt972.o dp83848.o et1011c.o ksz8873.o · line 46
Quoted 11 lines
arch/arm/cpu/arm926ejs/davinci/Makefile +5
-2ifdef CONFIG_SPL_BUILD COBJS-y += spl.o -COBJS-$(CONFIG_SOC_DM365) += dm365_lowlevel.o -COBJS-$(CONFIG_SOC_DA8XX) += da850_lowlevel.o +COBJS-$(CONFIG_DM365_SPL) += dm365_lowlevel.o +COBJS-$(CONFIG_DM365_SPL) += dm365_spl.o +COBJS-$(CONFIG_DA850EVM_SPL) += da850_lowlevel.o +COBJS-$(CONFIG_DA850EVM_SPL) += da850_spl.o +COBJS-$(CONFIG_HAWKBOARD_SPL) += hawkboard_nand_spl.o endif
CONFIG_SPL_BUILDmeans we'll only do this on the SPL build, not the normal build, and we already have symbols for the board and the SoC so we shouldn't need any new CONFIG symbols here, I'm pretty sure.
Quoted 7 lines
The problem here is that both da850evm and hawkboard define the
CONFIG_SOC_DA850, andCONFIG_SOC_DA8XX, as the hawkboard shares code like pinmux with the da850.I see a CONFIG_MACH_DAVINCI_* like define in
da850evm.handhawkboard.h. Should i add a similar define forcam_enc_4xx, and use these instead.
Actually the problem is that now we have a board specific file (hawkboard_nand_spl.c) in the arch tree. Hawkboard has a DA850 SoC so if we have a da850_spl.c hawkboard should either use it as well, or we make the *spl.c files board specific and put them into the board tree.
board_init_f() in hawkboard_nand_spl.c is pretty much the same as in da850_spl.c (ok, we don't do PLL and DDR configuration, but we could add an #ifdef to da850_lowlevel.c so that DDR and PLL configuration is only done if the required #defines are present, like it is currently done for CONFIG_SYS_DA850_CS2CFG). And board_init_r() in hawkboard_nand_spl.c is exactly the same as in dm365_spl.c. Therefore I think we could have only a single spl.c that can be used for all davinci SoCs and boards until we have an even more generic solution (see [1]).
Then, spl.c would look like this:
[,,,]
void board_init_f(ulong dummy)
{
#ifdef CONFIG_SOC_DM365
dm36x_lowlevel_init(0);
#endif
#ifdef CONFIG_SOC_DA8XX
arch_cpu_init();
#endif
relocate_code(CONFIG_SPL_STACK, NULL, CONFIG_SPL_TEXT_BASE);
}void board_init_r(gd_t *id, ulong dummy)
{
#ifdef CONFIG_SPL_NAND_LOAD
nand_init();
puts("Nand boot...\n");
nand_boot();
#endif
#ifdef CONFIG_SPL_SPI_LOAD
mem_malloc_init(CONFIG_SYS_TEXT_BASE - CONFIG_SYS_MALLOC_LEN,
CONFIG_SYS_MALLOC_LEN);
gd = &gdata;
gd->bd = &bdata;
gd->flags |= GD_FLG_RELOC;
gd->baudrate = CONFIG_BAUDRATE;
serial_init(); /* serial communications setup */
gd->have_console = 1;
puts("SPI boot...\n");
spi_boot();#endif
}
[...]
Would this work for hawkboard?
Regards, Christian
[1]
http://thread.gmane.org/gmane.comp.boot-loaders.u-boot/118233/focus=118721
PATCH 2/2 Changes to move hawkboard to the new infrastructure.
hi Christian,
Quoted 32 lines · Christian Riesch
Hi Sughosh and Tom,
Quoted 8 lines · Sughosh Ganu
Quoted 1 line · Tom Rini
On 01/09/2012 11:28 AM, Sughosh Ganu wrote:
<snip>
Quoted 3 lines
arch/arm/cpu/arm926ejs/davinci/Makefile COBJS-$(CONFIG_DRIVER_TI_EMAC) += lxt972.o
Quoted 3 lines
arch/arm/cpu/arm926ejs/davinci/Makefile +0
-0@@ -38,8 +38,11 @@ COBJS-$(CONFIG_DRIVER_TI_EMAC) += lxt972.odp83848.o et1011c.o ksz8873.o
Quoted 20 lines
Quoted 15 lines
arch/arm/cpu/arm926ejs/davinci/Makefile COBJS-$(CONFIG_DRIVER_TI_EMAC) += lxt972.o dp83848.o et1011c.o ksz8873.o · line 46
Quoted 11 lines
arch/arm/cpu/arm926ejs/davinci/Makefile +5
-2ifdef CONFIG_SPL_BUILD COBJS-y += spl.o -COBJS-$(CONFIG_SOC_DM365) += dm365_lowlevel.o -COBJS-$(CONFIG_SOC_DA8XX) += da850_lowlevel.o +COBJS-$(CONFIG_DM365_SPL) += dm365_lowlevel.o +COBJS-$(CONFIG_DM365_SPL) += dm365_spl.o +COBJS-$(CONFIG_DA850EVM_SPL) += da850_lowlevel.o +COBJS-$(CONFIG_DA850EVM_SPL) += da850_spl.o +COBJS-$(CONFIG_HAWKBOARD_SPL) += hawkboard_nand_spl.o endif
CONFIG_SPL_BUILDmeans we'll only do this on the SPL build, not the normal build, and we already have symbols for the board and the SoC so we shouldn't need any new CONFIG symbols here, I'm pretty sure.The problem here is that both da850evm and hawkboard define the
CONFIG_SOC_DA850, andCONFIG_SOC_DA8XX, as the hawkboard shares code like pinmux with the da850.
Quoted 8 lines
Quoted 3 lines
I see a CONFIG_MACH_DAVINCI_* like define in
da850evm.handhawkboard.h. Should i add a similar define forcam_enc_4xx, and use these instead.Actually the problem is that now we have a board specific file (
hawkboard_nand_spl.c) in the arch tree. Hawkboard has a DA850 SoC so if we have ada850_spl.chawkboard should either use it as well, or we make the *spl.c files board specific and put them into the board tree.
I'd vote for moving the *spl.c files to their corresponding board directories -- infact hawkboard_nand_spl.c was earlier under it's board directory. This i think keeps the implementation clean, avoids the risk of breakage, and also makes it simpler for any newer board in the same soc family migrating to spl, which i think might increase the ifdeffery.
Maybe Tom and Heiko can comment on how it can be done, and i'll take the route of the majority :).
-sughosh
PATCH 2/2 Changes to move hawkboard to the new infrastructure.
Hello Sughosh, Christian, Tom,
Quoted 38 lines · Sughosh Ganu
hi Christian,
Quoted 28 lines · Christian Riesch
Hi Sughosh and Tom,
Quoted 7 lines · Sughosh Ganu
Quoted 1 line · Tom Rini
On 01/09/2012 11:28 AM, Sughosh Ganu wrote:
<snip>
Quoted 3 lines
arch/arm/cpu/arm926ejs/davinci/Makefile COBJS-$(CONFIG_DRIVER_TI_EMAC) += lxt972.o
Quoted 3 lines
arch/arm/cpu/arm926ejs/davinci/Makefile +0
-0@@ -38,8 +38,11 @@ COBJS-$(CONFIG_DRIVER_TI_EMAC) += lxt972.odp83848.o et1011c.o ksz8873.o
Quoted 17 lines
Quoted 5 lines
Quoted 5 lines
arch/arm/cpu/arm926ejs/davinci/Makefile +1
-2ifdef CONFIG_SPL_BUILD COBJS-y += spl.o -COBJS-$(CONFIG_SOC_DM365) += dm365_lowlevel.o -COBJS-$(CONFIG_SOC_DA8XX) += da850_lowlevel.o +COBJS-$(CONFIG_DM365_SPL) += dm365_lowlevel.oQuoted 8 lines
arch/arm/cpu/arm926ejs/davinci/Makefile COBJS-$(CONFIG_DRIVER_TI_EMAC) += lxt972.o dp83848.o et1011c.o ksz8873.o · line 46
Quoted 5 lines
arch/arm/cpu/arm926ejs/davinci/Makefile +4
-0+COBJS-$(CONFIG_DM365_SPL) += dm365_spl.o +COBJS-$(CONFIG_DA850EVM_SPL) += da850_lowlevel.o +COBJS-$(CONFIG_DA850EVM_SPL) += da850_spl.o +COBJS-$(CONFIG_HAWKBOARD_SPL) += hawkboard_nand_spl.o endif
CONFIG_SPL_BUILDmeans we'll only do this on the SPL build, not the normal build, and we already have symbols for the board and the SoC so we shouldn't need any new CONFIG symbols here, I'm pretty sure.The problem here is that both da850evm and hawkboard define the
CONFIG_SOC_DA850, andCONFIG_SOC_DA8XX, as the hawkboard shares code like pinmux with the da850.Quoted 7 lines
Quoted 3 lines
I see a CONFIG_MACH_DAVINCI_* like define in
da850evm.handhawkboard.h. Should i add a similar define forcam_enc_4xx, and use these instead.Actually the problem is that now we have a board specific file (
hawkboard_nand_spl.c) in the arch tree. Hawkboard has a DA850 SoC so if we have ada850_spl.chawkboard should either use it as well, or we make the *spl.c files board specific and put them into the board tree.
Quoted 6 lines
I'd vote for moving the *spl.c files to their corresponding board directories -- infact
hawkboard_nand_spl.cwas earlier under it's board directory. This i think keeps the implementation clean, avoids the risk of breakage, and also makes it simpler for any newer board in the same soc family migrating to spl, which i think might increase the ifdeffery.
Hmm.. I vote against creating board specific files. I am here in line with Christians proposal, posted here:
http://lists.denx.de/pipermail/u-boot/2012-January/115166.html
Did this work for the hawkboard? If you do not need some inits, maybe we add here defines or better make this functions weak, and you can write board specific functions for this parts. The code in board_init_r() is only a "selection" from where to load u-boot, which I think in the long term could be made more common for other SoCs too ... so I want to prevent to split this in board specific files.
bye,
Heiko
Signature · 2 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
PATCH 2/2 Changes to move hawkboard to the new infrastructure.
hi Heiko,
Quoted 22 lines · Heiko Schocher
Hello Sughosh, Christian, Tom,
Quoted 8 lines · Sughosh Ganu
Quoted 7 lines
Quoted 3 lines
I see a CONFIG_MACH_DAVINCI_* like define in
da850evm.handhawkboard.h. Should i add a similar define forcam_enc_4xx, and use these instead.Actually the problem is that now we have a board specific file (
hawkboard_nand_spl.c) in the arch tree. Hawkboard has a DA850 SoC so if we have ada850_spl.chawkboard should either use it as well, or we make the *spl.c files board specific and put them into the board tree.Quoted 6 lines
I'd vote for moving the *spl.c files to their corresponding board directories -- infact
hawkboard_nand_spl.cwas earlier under it's board directory. This i think keeps the implementation clean, avoids the risk of breakage, and also makes it simpler for any newer board in the same soc family migrating to spl, which i think might increase the ifdeffery.Hmm.. I vote against creating board specific files. I am here in line with Christians proposal, posted here:
Quoted 8 lines
http://lists.denx.de/pipermail/u-boot/2012-January/115166.html
Did this work for the hawkboard? If you do not need some inits, maybe we add here defines or better make this functions weak, and you can write board specific functions for this parts. The code in
board_init_r()is only a "selection" from where to load u-boot, which I think in the long term could be made more common for other SoCs too ... so I want to prevent to split this in board specific files.
I should be able to test these changes in the evening. Will send a modified patch after testing.
-sughosh
PATCH v2 2/2 Changes to move hawkboard to the new spl infrastructure.
In reply to Sughosh GanuThis patch moves hawkboard to the new spl infrastructure from the older nand_spl one.
Removed the hawkboard_nand_config build option -- The spl code now gets compiled with hawkboard_config, after building the main u-boot image, using the CONFIG_SPL_TEXT_BASE. Modified the README.hawkboard to reflect the same.
---
Changes since V1
* Use a common file instead of board specific files for spl, based on review comments from Christian and Heiko.
arch/arm/cpu/arm926ejs/davinci/da850_lowlevel.c | 14 +-
arch/arm/cpu/arm926ejs/davinci/spl.c | 4 +-
arch/arm/include/asm/arch-davinci/da850_lowlevel.h | 9 +
board/davinci/da8xxevm/hawkboard.c | 23 +++
board/davinci/da8xxevm/hawkboard_nand_spl.c | 115 ---------------
.../{u-boot-spl.lds => u-boot-spl-da850evm.lds} | 0
.../davinci/da8xxevm/u-boot-spl-hawk.lds | 22 ++-
boards.cfg | 1 -
doc/README.hawkboard | 43 +++---
include/configs/cam_enc_4xx.h | 1 +
include/configs/da850evm.h | 3 +-
include/configs/hawkboard.h | 24 +++-
nand_spl/board/davinci/da8xxevm/Makefile | 155 --------------------
13 files changed, 100 insertions(+), 314 deletions(-)
delete mode 100644 board/davinci/da8xxevm/hawkboard_nand_spl.c
rename board/davinci/da8xxevm/{u-boot-spl.lds => u-boot-spl-da850evm.lds} (100%)
rename nand_spl/board/davinci/da8xxevm/u-boot.lds => board/davinci/da8xxevm/u-boot-spl-hawk.lds (86%)
delete mode 100644 nand_spl/board/davinci/da8xxevm/Makefilearch/arm/cpu/arm926ejs/davinci/da850_lowlevel.c +9 -5
@@ -32,6 +32,7 @@#include <asm/arch/emif_defs.h> #include <asm/arch/pll_defs.h> +#if !defined(CONFIG_MACH_DAVINCI_HAWK )void da850_waitloop (unsigned long loopcnt) {unsigned long i;
@@ -235,6 +236,7 @@ int da850_ddr_setup(void) return 0; } +#endif /* CONFIG_MACH_DAVINCI_HAWK */ __attribute__((weak))void board_gpio_init (void )
@@ -242,10 +244,6 @@ void board_gpio_init(void)return ; } -/* pinmux_resource[] vector is defined in the board specific file */ -extern const struct pinmux_resource pinmuxes[]; -extern const int pinmuxes_size; -int arch_cpu_init (void ) {/* Unlock kick registers */
@@ -259,6 +257,7 @@ int arch_cpu_init(void)if (davinci_configure_pin_mux_items (pinmuxes, pinmuxes_size))return 1 ; +#if defined(CONFIG_MACH_DAVINCI_DA850_EVM )/* PLL setup */ da850_pll_init (davinci_pllc0_regs,CONFIG_SYS_DA850_PLL0_PLLM );da850_pll_init (davinci_pllc1_regs,CONFIG_SYS_DA850_PLL1_PLLM );
@@ -275,6 +274,12 @@ int arch_cpu_init(void)#endif lpsc_on (CONFIG_SYS_DA850_LPSC_UART ); + +da850_ddr_setup (); +#elif defined(CONFIG_MACH_DAVINCI_HAWK ) +da8xx_configure_lpsc_items (lpsc, lpsc_size); +#endif +NS16550_init ((NS16550_t)(CONFIG_SYS_NS16550_COM1 ),CONFIG_SYS_NS16550_CLK /16 /CONFIG_BAUDRATE );
@@ -286,6 +291,5 @@ int arch_cpu_init(void) DAVINCI_UART_PWREMU_MGMT_UTRST), &davinci_uart2_ctrl_regs->pwremu_mgmt); -da850_ddr_setup ();return 0 ; }
arch/arm/cpu/arm926ejs/davinci/spl.c +2 -2
@@ -74,12 +74,12 @@ void board_init_f(ulong dummy)void board_init_r (gd_t *id,ulong dummy) { -#ifdef CONFIG_SOC_DM365 +#ifdef CONFIG_SPL_NAND_LOAD nand_init ();puts ("Nand boot...\n" );nand_boot ();#endif -#ifdef CONFIG_SOC_DA8XX +#ifdef CONFIG_SPL_SPI_LOAD mem_malloc_init (CONFIG_SYS_TEXT_BASE -CONFIG_SYS_MALLOC_LEN ,CONFIG_SYS_MALLOC_LEN );
arch/arm/include/asm/arch-davinci/da850_lowlevel.h +9 -0
@@ -24,6 +24,15 @@#ifndef __DA850_LOWLEVEL_H#define __DA850_LOWLEVEL_H +#include <asm/arch/pinmux_defs.h> + +/* pinmux_resource[] vector is defined in the board specific file */ +extern const struct pinmux_resource pinmuxes[]; +extern const int pinmuxes_size; + +extern const struct lpsc_resource lpsc[]; +extern const int lpsc_size; +/* NOR Boot Configuration Word Field Descriptions */ #define DA850_NORBOOT_COPY_XK (X ) ((X - 1) << 8)#define DA850_NORBOOT_METHOD_DIRECT (1 << 4)
board/davinci/da8xxevm/hawkboard.c +23 -0
@@ -27,10 +27,33 @@#include <asm/arch/hardware.h> #include <asm/io.h> #include <asm/arch/davinci_misc.h> +#include <asm/arch/pinmux_defs.h> #include <ns16550.h> DECLARE_GLOBAL_DATA_PTR ; +const struct pinmux_resource pinmuxes[] = { +PINMUX_ITEM (emac_pins_mii), +PINMUX_ITEM (emac_pins_mdio), +PINMUX_ITEM (emifa_pins_cs3), +PINMUX_ITEM (emifa_pins_cs4), +PINMUX_ITEM (emifa_pins_nand), +PINMUX_ITEM (uart2_pins_txrx), +PINMUX_ITEM (uart2_pins_rtscts), +}; + +const int pinmuxes_size =ARRAY_SIZE (pinmuxes); + +const struct lpsc_resource lpsc[] = { + {DAVINCI_LPSC_AEMIF },/* NAND, NOR */ + {DAVINCI_LPSC_SPI1 },/* Serial Flash */ + {DAVINCI_LPSC_EMAC },/* image download */ + {DAVINCI_LPSC_UART2 },/* console */ + {DAVINCI_LPSC_GPIO }, +}; + +const int lpsc_size =ARRAY_SIZE (lpsc); +int board_init (void ) {/* arch number of the board */
board/davinci/da8xxevm/hawkboard_nand_spl.c deleted +0 -115
115 lines not on this page · raw message
board/davinci/da8xxevm/u-boot-spl-da850evm.lds renamed from board/davinci/da8xxevm/u-boot-spl.lds +0 -0
board/davinci/da8xxevm/u-boot-spl-hawk.lds renamed from nand_spl/board/davinci/da8xxevm/u-boot.lds +13 -9
@@ -34,11 +34,11 @@ SECTIONS . = ALIGN(4); .text : { - start.o (.text) - cpu.o (.text) - nand_boot.o (.text) + arch/arm/cpu/arm926ejs/start.o (.text) + arch/arm/cpu/arm926ejs/davinci/libdavinci.o (.text) + drivers/mtd/nand/libnand.o (.text) - *(.text) + *(.text*) } . = ALIGN(4);
@@ -68,10 +68,14 @@ SECTIONS __got_end = .; - _end = .; + .bss : + { + . = ALIGN(4); + __bss_start = .; + *(.bss*) + . = ALIGN(4); + __bss_end__ = .; + } - . = ALIGN(4); - __bss_start = .; - .bss : { *(.bss) } - __bss_end__ = .; + _end = .; }
boards.cfg +0 -1
@@ -133,7 +133,6 @@ davinci_sffsdr arm arm926ejs sffsdr davinci davinci_sonata arm arm926ejs sonata davinci davinci ea20 arm arm926ejs ea20 davinci davinci hawkboard arm arm926ejs da8xxevm davinci davinci -hawkboard_nand arm arm926ejs da8xxevm davinci davinci hawkboard:NAND_U_BOOT hawkboard_uart arm arm926ejs da8xxevm davinci davinci hawkboard:UART_U_BOOT enbw_cmc arm arm926ejs enbw_cmc enbw davinci km_kirkwood arm arm926ejs km_arm keymile kirkwood km_kirkwood:KM_DISABLE_PCI
doc/README.hawkboard +21 -22
80 lines not on this page · raw message
include/configs/cam_enc_4xx.h +1 -0
@@ -205,6 +205,7 @@/* Defines for SPL */ #define CONFIG_SPL +#define CONFIG_DM365_SPL #define CONFIG_SPL_NAND_SUPPORT #define CONFIG_SPL_NAND_SIMPLE #define CONFIG_SPL_NAND_LOAD
include/configs/da850evm.h +2 -1
@@ -311,6 +311,7 @@/* defines for SPL */ #define CONFIG_SPL +#define CONFIG_DA850EVM_SPL #define CONFIG_SPL_SPI_SUPPORT #define CONFIG_SPL_SPI_FLASH_SUPPORT #define CONFIG_SPL_SPI_LOAD
@@ -319,7 +320,7 @@#define CONFIG_SPL_SERIAL_SUPPORT #define CONFIG_SPL_LIBCOMMON_SUPPORT #define CONFIG_SPL_LIBGENERIC_SUPPORT -#define CONFIG_SPL_LDSCRIPT "$(BOARDDIR)/u-boot-spl.lds" +#define CONFIG_SPL_LDSCRIPT "board/$(BOARDDIR)/u-boot-spl-da850evm.lds"#define CONFIG_SPL_STACK 0x8001ff00#define CONFIG_SPL_TEXT_BASE 0x80000000#define CONFIG_SPL_MAX_SIZE 32768
include/configs/hawkboard.h +20 -4
@@ -43,12 +43,30 @@#define CONFIG_SKIP_LOWLEVEL_INIT #define CONFIG_BOARD_EARLY_INIT_F -#if defined(CONFIG_NAND_U_BOOT ) || defined(CONFIG_UART_U_BOOT ) +#define CONFIG_SYS_DA850_SYSCFG_SUSPSRC ( \ + DAVINCI_SYSCFG_SUSPSRC_EMAC | \ + DAVINCI_SYSCFG_SUSPSRC_I2C | \ + DAVINCI_SYSCFG_SUSPSRC_SPI1 | \ + DAVINCI_SYSCFG_SUSPSRC_TIMER0 | \ + DAVINCI_SYSCFG_SUSPSRC_UART2) + +#if defined(CONFIG_UART_U_BOOT )#define CONFIG_SYS_TEXT_BASE 0xc1080000 -#else +#elif !defined(CONFIG_SPL_BUILD )#define CONFIG_SYS_TEXT_BASE 0xc1180000#endif +/* Spl */ +#define CONFIG_SPL +#define CONFIG_HAWKBOARD_SPL +#define CONFIG_SPL_NAND_SUPPORT +#define CONFIG_SPL_NAND_SIMPLE +#define CONFIG_SPL_NAND_LOAD +#define CONFIG_SPL_SERIAL_SUPPORT +#define CONFIG_SPL_LDSCRIPT "board/$(BOARDDIR)/u-boot-spl-hawk.lds" +#define CONFIG_SPL_TEXT_BASE 0xc1080000 +#define CONFIG_SPL_STACK CONFIG_SYS_INIT_SP_ADDR +/* * Memory Info */
@@ -84,9 +102,7 @@/* * Network & Ethernet Configuration */ -#if !defined(CONFIG_NAND_SPL )#define CONFIG_DRIVER_TI_EMAC -#endif #define CONFIG_MII #define CONFIG_BOOTP_DEFAULT #define CONFIG_BOOTP_DNS
nand_spl/board/davinci/da8xxevm/Makefile deleted +0 -155
155 lines not on this page · raw message
Signature · 1 line
1.7.5.4
PATCH v2 2/2 Changes to move hawkboard to the new spl infrastructure.
Hello Sughosh,
Quoted 15 lines · Sughosh Ganu
This patch moves hawkboard to the new spl infrastructure from the older
nand_splone.Removed the
hawkboard_nand_configbuild option -- The spl code now gets compiled withhawkboard_config, after building the main u-boot image, using theCONFIG_SPL_TEXT_BASE. Modified the README.hawkboard to reflect the same.Signed-off-by Sughosh Ganu <[email protected]>Cc Heiko Schocher <[email protected]>Cc Christian Riesch <[email protected]>Cc Sudhakar Rajashekhara <[email protected]>Cc Tom Rini <[email protected]>---
[...]
arch/arm/cpu/arm926ejs/davinci/da850_lowlevel.c line 35
Quoted 9 lines
arch/arm/cpu/arm926ejs/davinci/da850_lowlevel.c +1
-0@@ -32,6 +32,7 @@#include <asm/arch/emif_defs.h> #include <asm/arch/pll_defs.h> +#if !defined(CONFIG_MACH_DAVINCI_HAWK )
Please no board specific defines.
Quoted 23 lines
arch/arm/cpu/arm926ejs/davinci/da850_lowlevel.c +1
-4void da850_waitloop (unsigned long loopcnt) {unsigned long i;@@ -235,6 +236,7 @@ int da850_ddr_setup(void) return 0; } +#endif /* CONFIG_MACH_DAVINCI_HAWK */ __attribute__((weak))void board_gpio_init (void )@@ -242,10 +244,6 @@ void board_gpio_init(void)return ; } -/* pinmux_resource[] vector is defined in the board specific file */ -extern const struct pinmux_resource pinmuxes[]; -extern const int pinmuxes_size; -int arch_cpu_init (void ) {/* Unlock kick registers */
arch/arm/cpu/arm926ejs/davinci/da850_lowlevel.c int arch_cpu_init(void) · line 260
Quoted 4 lines
arch/arm/cpu/arm926ejs/davinci/da850_lowlevel.c +1
-0@@ -259,6 +257,7 @@ int arch_cpu_init(void)if (davinci_configure_pin_mux_items (pinmuxes, pinmuxes_size))return 1 ; +#if defined(CONFIG_MACH_DAVINCI_DA850_EVM )
here too. I propose here a CONFIG_SYS_DA850_PLL_INIT ...
arch/arm/cpu/arm926ejs/davinci/da850_lowlevel.c int arch_cpu_init(void) · line 278
Quoted 9 lines
arch/arm/cpu/arm926ejs/davinci/da850_lowlevel.c +2
-0/* PLL setup */ da850_pll_init (davinci_pllc0_regs,CONFIG_SYS_DA850_PLL0_PLLM );da850_pll_init (davinci_pllc1_regs,CONFIG_SYS_DA850_PLL1_PLLM );@@ -275,6 +274,12 @@ int arch_cpu_init(void)#endif lpsc_on (CONFIG_SYS_DA850_LPSC_UART ); + +da850_ddr_setup ();
and around the ddr_setup a CONFIG_SYS_DA850_DDR_INIT ...
arch/arm/cpu/arm926ejs/davinci/da850_lowlevel.c int arch_cpu_init(void) · line 281
Quoted 3 lines
arch/arm/cpu/arm926ejs/davinci/da850_lowlevel.c +3
-0+#elif defined(CONFIG_MACH_DAVINCI_HAWK ) +da8xx_configure_lpsc_items (lpsc, lpsc_size); +#endif
and we should use da8xx_configure_lpsc_items() for all da850 boards.
This patch breaks current enbw_cmc board compile
[hs at pollux u-boot]$ ./MAKEALL enbw_cmc
Configuring for enbw_cmc board...
enbw_cmc.c:52:35: error: static declaration of 'lpsc' follows non-static declaration /work/hs/u-boot/include/asm/arch/da850_lowlevel.h:33:35: note: previous declaration of 'lpsc' was here make[1]: *** [enbw_cmc.o] Fehler 1
make: *** [board/enbw/enbw_cmc/libenbw_cmc.o] Fehler 2
arm-linux-gnueabi-size: './u-boot': No such file
please remove the da8xx_configure_lpsc_items() in board_gpio_init() in the ./board/enbw/enbw_cmc/enbw_cmc.c() file, and also move ... before I write here a lot of text, here the patch, based on yours, please add it to your patch, and add my
and tested on the enbw_cmc board, so:
to your patch, here the patch:
arch/arm/cpu/arm926ejs/davinci/da850_lowlevel.c +10 -11
@@ -32,7 +32,7 @@#include <asm/arch/emif_defs.h> #include <asm/arch/pll_defs.h> -#if !defined(CONFIG_MACH_DAVINCI_HAWK ) +#if defined(CONFIG_SYS_DA850_DDR_INIT )void da850_waitloop (unsigned long loopcnt) {unsigned long i;
@@ -236,7 +236,7 @@ int da850_ddr_setup(void) return 0; } -#endif /* CONFIG_MACH_DAVINCI_HAWK */ +#endif /* CONFIG_SYS_DA850_DDR_INIT */ __attribute__((weak))void board_gpio_init (void )
@@ -257,14 +257,11 @@ int arch_cpu_init(void)if (davinci_configure_pin_mux_items (pinmuxes, pinmuxes_size))return 1 ; -#if defined(CONFIG_MACH_DAVINCI_DA850_EVM ) +#if defined(CONFIG_SYS_DA850_PLL_INIT )/* PLL setup */ da850_pll_init (davinci_pllc0_regs,CONFIG_SYS_DA850_PLL0_PLLM );da850_pll_init (davinci_pllc1_regs,CONFIG_SYS_DA850_PLL1_PLLM ); - -/* GPIO setup */ -board_gpio_init (); - +#endif /* setup CSn config */ #if defined(CONFIG_SYS_DA850_CS2CFG )writel (CONFIG_SYS_DA850_CS2CFG , &davinci_emif_regs->ab1cr);
@@ -273,13 +270,15 @@ int arch_cpu_init(void)writel (CONFIG_SYS_DA850_CS3CFG , &davinci_emif_regs->ab2cr);#endif -lpsc_on (CONFIG_SYS_DA850_LPSC_UART ); - -da850_ddr_setup (); -#elif defined(CONFIG_MACH_DAVINCI_HAWK )da8xx_configure_lpsc_items (lpsc, lpsc_size); +#if defined(CONFIG_SYS_DA850_DDR_INIT ) +da850_ddr_setup ();#endif +/* GPIO setup */ +board_gpio_init (); + +NS16550_init ((NS16550_t)(CONFIG_SYS_NS16550_COM1 ),CONFIG_SYS_NS16550_CLK /16 /CONFIG_BAUDRATE );
board/davinci/da8xxevm/da850evm.c +3 -1
@@ -137,7 +137,7 @@ const struct pinmux_resource pinmuxes[] = {const int pinmuxes_size =ARRAY_SIZE (pinmuxes); -static const struct lpsc_resource lpsc[] = { +const struct lpsc_resource lpsc[] = { {DAVINCI_LPSC_AEMIF },/* NAND, NOR */ {DAVINCI_LPSC_SPI1 },/* Serial Flash */ {DAVINCI_LPSC_EMAC },/* image download */
@@ -145,6 +145,8 @@ static const struct lpsc_resource lpsc[] = { { DAVINCI_LPSC_GPIO }, }; +const int lpsc_size =ARRAY_SIZE (lpsc); +#ifndef CONFIG_DA850_EVM_MAX_CPU_CLK #define CONFIG_DA850_EVM_MAX_CPU_CLK 300000000#endif
board/enbw/enbw_cmc/enbw_cmc.c +3 -10
@@ -49,7 +49,7 @@DECLARE_GLOBAL_DATA_PTR ; -static const struct lpsc_resource lpsc[] = { +const struct lpsc_resource lpsc[] = { {DAVINCI_LPSC_AEMIF }, {DAVINCI_LPSC_SPI1 }, {DAVINCI_LPSC_ARM_RAM_ROM },
@@ -65,6 +65,8 @@ static const struct lpsc_resource lpsc[] = { { DAVINCI_LPSC_USB11 }, }; +const int lpsc_size =ARRAY_SIZE (lpsc); +static const struct pinmux_config enbw_pins[] = { {pinmux (0 ),8 ,0 }, { pinmux(0), 8, 1 },
@@ -549,15 +551,6 @@ void board_gpio_init(void)struct davinci_gpio *gpio = davinci_gpio_bank01;/* -* Power on required peripherals -* ARM does not have access by default to PSC0 and PSC1 -* assuming here that the DSP bootloader has set the IOPU -* such that PSC access is available to ARM -*/ -if (da8xx_configure_lpsc_items (lpsc,ARRAY_SIZE (lpsc))) -return ; - -/* * set LED (gpio Interface not usable here) * set LED pins to output and state 0 */
include/configs/enbw_cmc.h +2 -0
@@ -48,6 +48,8 @@#define CONFIG_SKIP_LOWLEVEL_INIT #define CONFIG_DA850_LOWLEVEL #define CONFIG_ARCH_CPU_INIT +#define CONFIG_SYS_DA850_PLL_INIT +#define CONFIG_SYS_DA850_DDR_INIT #define CONFIG_DA8XX_GPIO #define CONFIG_HOSTNAME enbw_cmc#define CONFIG_DISPLAY_CPUINFO
Signature · 3 lines
1.7.7.4 [...]
include/configs/cam_enc_4xx.h line 208
Quoted 9 lines
include/configs/cam_enc_4xx.h +1
-0@@ -205,6 +205,7 @@/* Defines for SPL */ #define CONFIG_SPL +#define CONFIG_DM365_SPL
Why we need this define?
[hs at pollux u-boot]$ grep -lr CONFIG_DM365_SPL . ./include/configs/cam_enc_4xx.h
[hs at pollux u-boot]$
include/configs/da850evm.h line 314
Quoted 12 lines
include/configs/cam_enc_4xx.h +0
-0#define CONFIG_SPL_NAND_SUPPORT #define CONFIG_SPL_NAND_SIMPLE #define CONFIG_SPL_NAND_LOAD include/configs/da850evm.h +1
-0@@ -311,6 +311,7 @@/* defines for SPL */ #define CONFIG_SPL +#define CONFIG_DA850EVM_SPL
here too, why you add this define?
[hs at pollux u-boot]$ grep -lr CONFIG_DA850EVM_SPL . ./include/configs/da850evm.h
[hs at pollux u-boot]$
[...]
Quoted 16 lines
include/configs/hawkboard.h +7
-1@@ -43,12 +43,30 @@#define CONFIG_SKIP_LOWLEVEL_INIT #define CONFIG_BOARD_EARLY_INIT_F -#if defined(CONFIG_NAND_U_BOOT ) || defined(CONFIG_UART_U_BOOT ) +#define CONFIG_SYS_DA850_SYSCFG_SUSPSRC ( \ + DAVINCI_SYSCFG_SUSPSRC_EMAC | \ + DAVINCI_SYSCFG_SUSPSRC_I2C | \ + DAVINCI_SYSCFG_SUSPSRC_SPI1 | \ + DAVINCI_SYSCFG_SUSPSRC_TIMER0 | \ + DAVINCI_SYSCFG_SUSPSRC_UART2) +
include/configs/hawkboard.h line 61
Quoted 10 lines
include/configs/hawkboard.h +5
-1+#if defined(CONFIG_UART_U_BOOT )#define CONFIG_SYS_TEXT_BASE 0xc1080000 -#else +#elif !defined(CONFIG_SPL_BUILD )#define CONFIG_SYS_TEXT_BASE 0xc1180000#endif +/* Spl */ +#define CONFIG_SPL +#define CONFIG_HAWKBOARD_SPL
Here too, why this?
[hs at pollux u-boot]$ grep -lr CONFIG_HAWKBOARD_SPL . ./include/configs/hawkboard.h
[hs at pollux u-boot]$
Quoted 12 lines
include/configs/hawkboard.h +8
-0+#define CONFIG_SPL_NAND_SUPPORT +#define CONFIG_SPL_NAND_SIMPLE +#define CONFIG_SPL_NAND_LOAD +#define CONFIG_SPL_SERIAL_SUPPORT +#define CONFIG_SPL_LDSCRIPT "board/$(BOARDDIR)/u-boot-spl-hawk.lds" +#define CONFIG_SPL_TEXT_BASE 0xc1080000 +#define CONFIG_SPL_STACK CONFIG_SYS_INIT_SP_ADDR +/* * Memory Info */
include/configs/hawkboard.h line 108
Quoted 9 lines
include/configs/hawkboard.h +0
-2@@ -84,9 +102,7 @@/* * Network & Ethernet Configuration */ -#if !defined(CONFIG_NAND_SPL )#define CONFIG_DRIVER_TI_EMAC -#endif #define CONFIG_MII #define CONFIG_BOOTP_DEFAULT #define CONFIG_BOOTP_DNS
bye,
Heiko
Signature · 2 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
PATCH v2 2/2 Changes to move hawkboard to the new spl infrastructure.
hi Heiko,
Quoted 27 lines · Heiko Schocher
Hello Sughosh,
Quoted 15 lines · Sughosh Ganu
This patch moves hawkboard to the new spl infrastructure from the older
nand_splone.Removed the
hawkboard_nand_configbuild option -- The spl code now gets compiled withhawkboard_config, after building the main u-boot image, using theCONFIG_SPL_TEXT_BASE. Modified the README.hawkboard to reflect the same.Signed-off-by Sughosh Ganu <[email protected]>Cc Heiko Schocher <[email protected]>Cc Christian Riesch <[email protected]>Cc Sudhakar Rajashekhara <[email protected]>Cc Tom Rini <[email protected]>---
[...]
Quoted 8 lines
arch/arm/cpu/arm926ejs/davinci/da850_lowlevel.c +0
-0@@ -32,6 +32,7 @@#include <asm/arch/emif_defs.h> #include <asm/arch/pll_defs.h>
Quoted 3 lines
arch/arm/cpu/arm926ejs/davinci/da850_lowlevel.c line 35
Quoted 1 line
arch/arm/cpu/arm926ejs/davinci/da850_lowlevel.c +1
-0+#if !defined(CONFIG_MACH_DAVINCI_HAWK )Please no board specific defines.
Ok, will replace with the arch specific define that you suggest.
Quoted 27 lines
Quoted 27 lines
arch/arm/cpu/arm926ejs/davinci/da850_lowlevel.c +1
-4void da850_waitloop (unsigned long loopcnt) {unsigned long i;@@ -235,6 +236,7 @@ int da850_ddr_setup(void) return 0; } +#endif /* CONFIG_MACH_DAVINCI_HAWK */ __attribute__((weak))void board_gpio_init (void )@@ -242,10 +244,6 @@ void board_gpio_init(void)return ; } -/* pinmux_resource[] vector is defined in the board specific file */ -extern const struct pinmux_resource pinmuxes[]; -extern const int pinmuxes_size; -int arch_cpu_init (void ) {/* Unlock kick registers */ @@ -259,6 +257,7 @@ int arch_cpu_init(void)if (davinci_configure_pin_mux_items (pinmuxes, pinmuxes_size))return 1 ;
Quoted 3 lines
arch/arm/cpu/arm926ejs/davinci/da850_lowlevel.c int arch_cpu_init(void) · line 260
Quoted 1 line
arch/arm/cpu/arm926ejs/davinci/da850_lowlevel.c +1
-0+#if defined(CONFIG_MACH_DAVINCI_DA850_EVM )here too. I propose here a
CONFIG_SYS_DA850_PLL_INIT...
Ok.
Quoted 13 lines
arch/arm/cpu/arm926ejs/davinci/da850_lowlevel.c int arch_cpu_init(void) · line 278
Quoted 10 lines
arch/arm/cpu/arm926ejs/davinci/da850_lowlevel.c +2
-0/* PLL setup */ da850_pll_init (davinci_pllc0_regs,CONFIG_SYS_DA850_PLL0_PLLM );da850_pll_init (davinci_pllc1_regs,CONFIG_SYS_DA850_PLL1_PLLM );@@ -275,6 +274,12 @@ int arch_cpu_init(void)#endif lpsc_on (CONFIG_SYS_DA850_LPSC_UART ); + +da850_ddr_setup ();and around the
ddr_setupaCONFIG_SYS_DA850_DDR_INIT...
Quoted 5 lines
arch/arm/cpu/arm926ejs/davinci/da850_lowlevel.c int arch_cpu_init(void) · line 281
Quoted 3 lines
arch/arm/cpu/arm926ejs/davinci/da850_lowlevel.c +3
-0+#elif defined(CONFIG_MACH_DAVINCI_HAWK ) +da8xx_configure_lpsc_items (lpsc, lpsc_size); +#endif and we should use
da8xx_configure_lpsc_items()for all da850 boards.
Ok.
Quoted 10 lines
This patch breaks current
enbw_cmcboard compile[hs at pollux u-boot]$ ./MAKEALL
enbw_cmc
Configuring forenbw_cmcboard...
enbw_cmc.c:52:35: error: static declaration of 'lpsc' follows non-static declaration /work/hs/u-boot/include/asm/arch/da850_lowlevel.h:33:35: note: previous declaration of 'lpsc' was here make[1]: *** [enbw_cmc.o] Fehler 1
make: *** [board/enbw/enbw_cmc/libenbw_cmc.o] Fehler 2
arm-linux-gnueabi-size: './u-boot': No such file
Oops, sorry about that.
<snip>
include/configs/enbw_cmc.h line 52
Quoted 10 lines
include/configs/enbw_cmc.h +2
-0@@ -48,6 +48,8 @@#define CONFIG_SKIP_LOWLEVEL_INIT #define CONFIG_DA850_LOWLEVEL #define CONFIG_ARCH_CPU_INIT +#define CONFIG_SYS_DA850_PLL_INIT +#define CONFIG_SYS_DA850_DDR_INIT
I think we'll need to add this for da850evm.h too.
Quoted 18 lines
include/configs/enbw_cmc.h +0
-0#define CONFIG_DA8XX_GPIO #define CONFIG_HOSTNAME enbw_cmc#define CONFIG_DISPLAY_CPUINFO Signature · 3 lines
1.7.7.4 [...]include/configs/cam_enc_4xx.h line 208
Quoted 9 lines
include/configs/cam_enc_4xx.h +1
-0@@ -205,6 +205,7 @@/* Defines for SPL */ #define CONFIG_SPL +#define CONFIG_DM365_SPL Why we need this define?
Yeah, missed out cleaning these defines that i had used in V1. Will clean up in next version for all the cases.
-sughosh
PATCH v2 2/2 Changes to move hawkboard to the new spl infrastructure.
Hello Sughosh,
I reviewed your patch and I agree with Heiko's comments. I am looking forward to v3 :-)
Regards, Christian
Quoted 145 lines · Sughosh Ganu
hi Heiko,
Quoted 27 lines · Heiko Schocher
Hello Sughosh,
Quoted 15 lines · Sughosh Ganu
This patch moves hawkboard to the new spl infrastructure from the older
nand_splone.Removed the
hawkboard_nand_configbuild option -- The spl code now gets compiled withhawkboard_config, after building the main u-boot image, using theCONFIG_SPL_TEXT_BASE. Modified the README.hawkboard to reflect the same.Signed-off-by Sughosh Ganu <[email protected]>Cc Heiko Schocher <[email protected]>Cc Christian Riesch <[email protected]>Cc Sudhakar Rajashekhara <[email protected]>Cc Tom Rini <[email protected]>---
[...]
Quoted 8 lines
arch/arm/cpu/arm926ejs/davinci/da850_lowlevel.c +0
-0@@ -32,6 +32,7 @@?#include <
asm/arch/emif_defs.h>
?#include <asm/arch/pll_defs.h>Quoted 3 lines
Quoted 1 line
+#if !defined(CONFIG_MACH_DAVINCI_HAWK)
Please no board specific defines.
?Ok, will replace with the arch specific define that you suggest.
Quoted 27 lines
Quoted 27 lines
?void
da850_waitloop(unsigned long loopcnt)
?{
? ? unsigned long ? i;arch/arm/cpu/arm926ejs/davinci/da850_lowlevel.c +1
-4@@ -235,6 +236,7 @@ int da850_ddr_setup(void) ? ? return 0; ?} +#endif /* CONFIG_MACH_DAVINCI_HAWK */ ?__attribute__((weak)) ?void board_gpio_init(void)@@ -242,10 +244,6 @@ void board_gpio_init(void) ? ? return; ?} -/* pinmux_resource[] vector is defined in the board specific file */ -extern const struct pinmux_resource pinmuxes[]; -extern const int pinmuxes_size; - ?int arch_cpu_init(void) ?{? ? /* Unlock kick registers */
arch/arm/cpu/arm926ejs/davinci/da850_lowlevel.c +0
-0@@ -259,6 +257,7 @@ int arch_cpu_init(void) ? ? if (davinci_configure_pin_mux_items(pinmuxes, pinmuxes_size)) ? ? ? ? ? ? return 1;Quoted 3 lines
arch/arm/cpu/arm926ejs/davinci/da850_lowlevel.c int arch_cpu_init(void) · line 260
Quoted 1 line
arch/arm/cpu/arm926ejs/davinci/da850_lowlevel.c +1
-0+#if defined(CONFIG_MACH_DAVINCI_DA850_EVM )here too. I propose here a
CONFIG_SYS_DA850_PLL_INIT...?Ok.
Quoted 13 lines
Quoted 10 lines
? ? /* PLL setup */
? ?da850_pll_init(davinci_pllc0_regs, CONFIG_SYS_DA850_PLL0_PLLM); ? ?da850_pll_init(davinci_pllc1_regs, CONFIG_SYS_DA850_PLL1_PLLM);arch/arm/cpu/arm926ejs/davinci/da850_lowlevel.c +0
-0@@ -275,6 +274,12 @@ int arch_cpu_init(void)?#endif
? ?
lpsc_on(CONFIG_SYS_DA850_LPSC_UART);
+
+ ?da850_ddr_setup();and around the
ddr_setupaCONFIG_SYS_DA850_DDR_INIT...Quoted 5 lines
arch/arm/cpu/arm926ejs/davinci/da850_lowlevel.c
Quoted 3 lines
arch/arm/cpu/arm926ejs/davinci/da850_lowlevel.c +3
-0+#elif defined(CONFIG_MACH_DAVINCI_HAWK ) + ? da8xx_configure_lpsc_items(lpsc, lpsc_size); +#endif and we should use
da8xx_configure_lpsc_items()for all da850 boards.?Ok.
Quoted 10 lines
This patch breaks current
enbw_cmcboard compile[hs at pollux u-boot]$ ./MAKEALL
enbw_cmc
Configuring forenbw_cmcboard...
enbw_cmc.c:52:35: error: static declaration of 'lpsc' follows non-static declaration /work/hs/u-boot/include/asm/arch/da850_lowlevel.h:33:35: note: previous declaration of 'lpsc' was here make[1]: *** [enbw_cmc.o] Fehler 1
make: *** [board/enbw/enbw_cmc/libenbw_cmc.o] Fehler 2
arm-linux-gnueabi-size: './u-boot': No such file?Oops, sorry about that.
<snip>
include/configs/enbw_cmc.h line 52
Quoted 10 lines
include/configs/enbw_cmc.h +0
-0@@ -48,6 +48,8 @@?#define
CONFIG_SKIP_LOWLEVEL_INIT
?#defineCONFIG_DA850_LOWLEVEL
?#defineCONFIG_ARCH_CPU_INITinclude/configs/enbw_cmc.h +2
-0+#define CONFIG_SYS_DA850_PLL_INIT +#define CONFIG_SYS_DA850_DDR_INIT ?I think we'll need to add this for
da850evm.htoo.Quoted 13 lines
?#define
CONFIG_DA8XX_GPIO
?#defineCONFIG_HOSTNAME? ? ? ? ? ? ?enbw_cmc
?#defineCONFIG_DISPLAY_CPUINFO
--
1.7.7.4[...]
Quoted 6 lines
include/configs/cam_enc_4xx.h +0
-0@@ -205,6 +205,7 @@Quoted 5 lines
Quoted 3 lines
?/* Defines for SPL */
?#defineCONFIG_SPL
+#defineCONFIG_DM365_SPLWhy we need this define?
?Yeah, missed out cleaning these defines that i had used in V1. Will ?clean up in next version for all the cases.
-sughosh
_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot
PATCH v2 2/2 Changes to move hawkboard to the new spl infrastructure.
In reply to Heiko SchocherHello Heiko, Sughosh,
Quoted 16 lines · Heiko Schocher
please remove the
da8xx_configure_lpsc_items()inboard_gpio_init()in the ./board/enbw/enbw_cmc/enbw_cmc.c() file, and also move ... before I write here a lot of text, here the patch, based on yours, please add it to your patch, and add mySigned-off-by Heiko Schocher <[email protected]>and tested on the
enbw_cmcboard, so:Tested-by Heiko Schocher <[email protected]>to your patch, here the patch:
arch/arm/cpu/arm926ejs/davinci/da850_lowlevel.c +0
-0
[....]
Quoted 1 line
- ? ? ?
lpsc_on(CONFIG_SYS_DA850_LPSC_UART);
Now we can also remove CONFIG_SYS_DA850_LPSC_UART from include/configs/da850evm.h and include/configs/enbw_cmc.h.
Regards, Christian
PATCH v2 2/2 Changes to move hawkboard to the new spl infrastructure.
Hello Christian,
Quoted 20 lines · Christian Riesch
Hello Heiko, Sughosh,
Quoted 16 lines · Heiko Schocher
please remove the
da8xx_configure_lpsc_items()inboard_gpio_init()in the ./board/enbw/enbw_cmc/enbw_cmc.c() file, and also move ... before I write here a lot of text, here the patch, based on yours, please add it to your patch, and add mySigned-off-by Heiko Schocher <[email protected]>and tested on the
enbw_cmcboard, so:Tested-by Heiko Schocher <[email protected]>to your patch, here the patch:
arch/arm/cpu/arm926ejs/davinci/da850_lowlevel.c +0
-0[....]
Quoted 4 lines
Quoted 1 line
-
lpsc_on(CONFIG_SYS_DA850_LPSC_UART);Now we can also remove
CONFIG_SYS_DA850_LPSC_UARTfrominclude/configs/da850evm.handinclude/configs/enbw_cmc.h.
correct. Good catch!
bye,
Heiko
Signature · 2 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
PATCH v3 2/2 Changes to move hawkboard to the new spl infrastructure.
In reply to Heiko SchocherThis patch moves hawkboard to the new spl infrastructure from the older nand_spl one.
Removed the hawkboard_nand_config build option -- The spl code now gets compiled with hawkboard_config, after building the main u-boot image, using the CONFIG_SPL_TEXT_BASE. Modified the README.hawkboard to reflect the same.
---
Changes since V2
* Made changes to fix build break on enbw_cmc board.
* Replaced defines used for conditionally compiling code in da850_lowlevel.c to the ones suggested by Heiko.
* Removed unwanted defines from the config files which were added in V1.
Changes since V1
* Use a common file instead of board specific files for spl, based on review comments from Christian and Heiko.
arch/arm/cpu/arm926ejs/davinci/da850_lowlevel.c | 23 ++--
arch/arm/cpu/arm926ejs/davinci/spl.c | 4 +-
arch/arm/include/asm/arch-davinci/da850_lowlevel.h | 9 +
board/davinci/da8xxevm/da850evm.c | 4 +-
board/davinci/da8xxevm/hawkboard.c | 23 +++
board/davinci/da8xxevm/hawkboard_nand_spl.c | 115 ---------------
.../{u-boot-spl.lds => u-boot-spl-da850evm.lds} | 0
.../davinci/da8xxevm/u-boot-spl-hawk.lds | 22 ++-
board/enbw/enbw_cmc/enbw_cmc.c | 13 +--
boards.cfg | 1 -
doc/README.hawkboard | 43 +++---
include/configs/da850evm.h | 5 +-
include/configs/enbw_cmc.h | 2 +
include/configs/hawkboard.h | 23 +++-
nand_spl/board/davinci/da8xxevm/Makefile | 155 --------------------
15 files changed, 111 insertions(+), 331 deletions(-)
delete mode 100644 board/davinci/da8xxevm/hawkboard_nand_spl.c
rename board/davinci/da8xxevm/{u-boot-spl.lds => u-boot-spl-da850evm.lds} (100%)
rename nand_spl/board/davinci/da8xxevm/u-boot.lds => board/davinci/da8xxevm/u-boot-spl-hawk.lds (86%)
delete mode 100644 nand_spl/board/davinci/da8xxevm/Makefilearch/arm/cpu/arm926ejs/davinci/da850_lowlevel.c +13 -10
@@ -32,6 +32,7 @@#include <asm/arch/emif_defs.h> #include <asm/arch/pll_defs.h> +#if defined(CONFIG_SYS_DA850_DDR_INIT )void da850_waitloop (unsigned long loopcnt) {unsigned long i;
@@ -235,6 +236,7 @@ int da850_ddr_setup(void) return 0; } +#endif /* CONFIG_SYS_DA850_DDR_INIT */ __attribute__((weak))void board_gpio_init (void )
@@ -242,10 +244,6 @@ void board_gpio_init(void)return ; } -/* pinmux_resource[] vector is defined in the board specific file */ -extern const struct pinmux_resource pinmuxes[]; -extern const int pinmuxes_size; -int arch_cpu_init (void ) {/* Unlock kick registers */
@@ -259,13 +257,11 @@ int arch_cpu_init(void)if (davinci_configure_pin_mux_items (pinmuxes, pinmuxes_size))return 1 ; +#if defined(CONFIG_SYS_DA850_PLL_INIT )/* PLL setup */ da850_pll_init (davinci_pllc0_regs,CONFIG_SYS_DA850_PLL0_PLLM );da850_pll_init (davinci_pllc1_regs,CONFIG_SYS_DA850_PLL1_PLLM ); - -/* GPIO setup */ -board_gpio_init (); - +#endif /* setup CSn config */ #if defined(CONFIG_SYS_DA850_CS2CFG )writel (CONFIG_SYS_DA850_CS2CFG , &davinci_emif_regs->ab1cr);
@@ -274,7 +270,15 @@ int arch_cpu_init(void)writel (CONFIG_SYS_DA850_CS3CFG , &davinci_emif_regs->ab2cr);#endif -lpsc_on (CONFIG_SYS_DA850_LPSC_UART ); +da8xx_configure_lpsc_items (lpsc, lpsc_size); +#if defined(CONFIG_SYS_DA850_DDR_INIT ) +da850_ddr_setup (); +#endif + +/* GPIO setup */ +board_gpio_init (); + +NS16550_init ((NS16550_t)(CONFIG_SYS_NS16550_COM1 ),CONFIG_SYS_NS16550_CLK /16 /CONFIG_BAUDRATE );
@@ -286,6 +290,5 @@ int arch_cpu_init(void) DAVINCI_UART_PWREMU_MGMT_UTRST), &davinci_uart2_ctrl_regs->pwremu_mgmt); -da850_ddr_setup ();return 0 ; }
arch/arm/cpu/arm926ejs/davinci/spl.c +2 -2
@@ -74,12 +74,12 @@ void board_init_f(ulong dummy)void board_init_r (gd_t *id,ulong dummy) { -#ifdef CONFIG_SOC_DM365 +#ifdef CONFIG_SPL_NAND_LOAD nand_init ();puts ("Nand boot...\n" );nand_boot ();#endif -#ifdef CONFIG_SOC_DA8XX +#ifdef CONFIG_SPL_SPI_LOAD mem_malloc_init (CONFIG_SYS_TEXT_BASE -CONFIG_SYS_MALLOC_LEN ,CONFIG_SYS_MALLOC_LEN );
arch/arm/include/asm/arch-davinci/da850_lowlevel.h +9 -0
@@ -24,6 +24,15 @@#ifndef __DA850_LOWLEVEL_H#define __DA850_LOWLEVEL_H +#include <asm/arch/pinmux_defs.h> + +/* pinmux_resource[] vector is defined in the board specific file */ +extern const struct pinmux_resource pinmuxes[]; +extern const int pinmuxes_size; + +extern const struct lpsc_resource lpsc[]; +extern const int lpsc_size; +/* NOR Boot Configuration Word Field Descriptions */ #define DA850_NORBOOT_COPY_XK (X ) ((X - 1) << 8)#define DA850_NORBOOT_METHOD_DIRECT (1 << 4)
board/davinci/da8xxevm/da850evm.c +3 -1
@@ -137,7 +137,7 @@ const struct pinmux_resource pinmuxes[] = {const int pinmuxes_size =ARRAY_SIZE (pinmuxes); -static const struct lpsc_resource lpsc[] = { +const struct lpsc_resource lpsc[] = { {DAVINCI_LPSC_AEMIF },/* NAND, NOR */ {DAVINCI_LPSC_SPI1 },/* Serial Flash */ {DAVINCI_LPSC_EMAC },/* image download */
@@ -145,6 +145,8 @@ static const struct lpsc_resource lpsc[] = { { DAVINCI_LPSC_GPIO }, }; +const int lpsc_size =ARRAY_SIZE (lpsc); +#ifndef CONFIG_DA850_EVM_MAX_CPU_CLK #define CONFIG_DA850_EVM_MAX_CPU_CLK 300000000#endif
board/davinci/da8xxevm/hawkboard.c +23 -0
@@ -27,10 +27,33 @@#include <asm/arch/hardware.h> #include <asm/io.h> #include <asm/arch/davinci_misc.h> +#include <asm/arch/pinmux_defs.h> #include <ns16550.h> DECLARE_GLOBAL_DATA_PTR ; +const struct pinmux_resource pinmuxes[] = { +PINMUX_ITEM (emac_pins_mii), +PINMUX_ITEM (emac_pins_mdio), +PINMUX_ITEM (emifa_pins_cs3), +PINMUX_ITEM (emifa_pins_cs4), +PINMUX_ITEM (emifa_pins_nand), +PINMUX_ITEM (uart2_pins_txrx), +PINMUX_ITEM (uart2_pins_rtscts), +}; + +const int pinmuxes_size =ARRAY_SIZE (pinmuxes); + +const struct lpsc_resource lpsc[] = { + {DAVINCI_LPSC_AEMIF },/* NAND, NOR */ + {DAVINCI_LPSC_SPI1 },/* Serial Flash */ + {DAVINCI_LPSC_EMAC },/* image download */ + {DAVINCI_LPSC_UART2 },/* console */ + {DAVINCI_LPSC_GPIO }, +}; + +const int lpsc_size =ARRAY_SIZE (lpsc); +int board_init (void ) {/* arch number of the board */
board/davinci/da8xxevm/hawkboard_nand_spl.c deleted +0 -115
115 lines not on this page · raw message
board/davinci/da8xxevm/u-boot-spl-da850evm.lds renamed from board/davinci/da8xxevm/u-boot-spl.lds +0 -0
board/davinci/da8xxevm/u-boot-spl-hawk.lds renamed from nand_spl/board/davinci/da8xxevm/u-boot.lds +13 -9
@@ -34,11 +34,11 @@ SECTIONS . = ALIGN(4); .text : { - start.o (.text) - cpu.o (.text) - nand_boot.o (.text) + arch/arm/cpu/arm926ejs/start.o (.text) + arch/arm/cpu/arm926ejs/davinci/libdavinci.o (.text) + drivers/mtd/nand/libnand.o (.text) - *(.text) + *(.text*) } . = ALIGN(4);
@@ -68,10 +68,14 @@ SECTIONS __got_end = .; - _end = .; + .bss : + { + . = ALIGN(4); + __bss_start = .; + *(.bss*) + . = ALIGN(4); + __bss_end__ = .; + } - . = ALIGN(4); - __bss_start = .; - .bss : { *(.bss) } - __bss_end__ = .; + _end = .; }
board/enbw/enbw_cmc/enbw_cmc.c +3 -10
@@ -49,7 +49,7 @@DECLARE_GLOBAL_DATA_PTR ; -static const struct lpsc_resource lpsc[] = { +const struct lpsc_resource lpsc[] = { {DAVINCI_LPSC_AEMIF }, {DAVINCI_LPSC_SPI1 }, {DAVINCI_LPSC_ARM_RAM_ROM },
@@ -65,6 +65,8 @@ static const struct lpsc_resource lpsc[] = { { DAVINCI_LPSC_USB11 }, }; +const int lpsc_size =ARRAY_SIZE (lpsc); +static const struct pinmux_config enbw_pins[] = { {pinmux (0 ),8 ,0 }, { pinmux(0), 8, 1 },
@@ -549,15 +551,6 @@ void board_gpio_init(void)struct davinci_gpio *gpio = davinci_gpio_bank01;/* -* Power on required peripherals -* ARM does not have access by default to PSC0 and PSC1 -* assuming here that the DSP bootloader has set the IOPU -* such that PSC access is available to ARM -*/ -if (da8xx_configure_lpsc_items (lpsc,ARRAY_SIZE (lpsc))) -return ; - -/* * set LED (gpio Interface not usable here) * set LED pins to output and state 0 */
boards.cfg +0 -1
@@ -133,7 +133,6 @@ davinci_sffsdr arm arm926ejs sffsdr davinci davinci_sonata arm arm926ejs sonata davinci davinci ea20 arm arm926ejs ea20 davinci davinci hawkboard arm arm926ejs da8xxevm davinci davinci -hawkboard_nand arm arm926ejs da8xxevm davinci davinci hawkboard:NAND_U_BOOT hawkboard_uart arm arm926ejs da8xxevm davinci davinci hawkboard:UART_U_BOOT enbw_cmc arm arm926ejs enbw_cmc enbw davinci km_kirkwood arm arm926ejs km_arm keymile kirkwood km_kirkwood:KM_DISABLE_PCI
doc/README.hawkboard +21 -22
80 lines not on this page · raw message
include/configs/da850evm.h +3 -2
@@ -44,6 +44,8 @@#define CONFIG_SYS_HZ 1000#define CONFIG_SKIP_LOWLEVEL_INIT #define CONFIG_SYS_TEXT_BASE 0xc1080000 +#define CONFIG_SYS_DA850_PLL_INIT +#define CONFIG_SYS_DA850_DDR_INIT /* * Memory Info
@@ -142,7 +144,6 @@#define CONFIG_CONS_INDEX 1/* use UART0 for console */ #define CONFIG_BAUDRATE 115200/* Default baud rate */ #define CONFIG_SYS_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200 } -#define CONFIG_SYS_DA850_LPSC_UART DAVINCI_LPSC_UART2#define CONFIG_SPI #define CONFIG_SPI_FLASH
@@ -319,7 +320,7 @@#define CONFIG_SPL_SERIAL_SUPPORT #define CONFIG_SPL_LIBCOMMON_SUPPORT #define CONFIG_SPL_LIBGENERIC_SUPPORT -#define CONFIG_SPL_LDSCRIPT "$(BOARDDIR)/u-boot-spl.lds" +#define CONFIG_SPL_LDSCRIPT "board/$(BOARDDIR)/u-boot-spl-da850evm.lds"#define CONFIG_SPL_STACK 0x8001ff00#define CONFIG_SPL_TEXT_BASE 0x80000000#define CONFIG_SPL_MAX_SIZE 32768
include/configs/enbw_cmc.h +2 -0
@@ -48,6 +48,8 @@#define CONFIG_SKIP_LOWLEVEL_INIT #define CONFIG_DA850_LOWLEVEL #define CONFIG_ARCH_CPU_INIT +#define CONFIG_SYS_DA850_PLL_INIT +#define CONFIG_SYS_DA850_DDR_INIT #define CONFIG_DA8XX_GPIO #define CONFIG_HOSTNAME enbw_cmc#define CONFIG_DISPLAY_CPUINFO
include/configs/hawkboard.h +19 -4
@@ -43,12 +43,29 @@#define CONFIG_SKIP_LOWLEVEL_INIT #define CONFIG_BOARD_EARLY_INIT_F -#if defined(CONFIG_NAND_U_BOOT ) || defined(CONFIG_UART_U_BOOT ) +#define CONFIG_SYS_DA850_SYSCFG_SUSPSRC ( \ + DAVINCI_SYSCFG_SUSPSRC_EMAC | \ + DAVINCI_SYSCFG_SUSPSRC_I2C | \ + DAVINCI_SYSCFG_SUSPSRC_SPI1 | \ + DAVINCI_SYSCFG_SUSPSRC_TIMER0 | \ + DAVINCI_SYSCFG_SUSPSRC_UART2) + +#if defined(CONFIG_UART_U_BOOT )#define CONFIG_SYS_TEXT_BASE 0xc1080000 -#else +#elif !defined(CONFIG_SPL_BUILD )#define CONFIG_SYS_TEXT_BASE 0xc1180000#endif +/* Spl */ +#define CONFIG_SPL +#define CONFIG_SPL_NAND_SUPPORT +#define CONFIG_SPL_NAND_SIMPLE +#define CONFIG_SPL_NAND_LOAD +#define CONFIG_SPL_SERIAL_SUPPORT +#define CONFIG_SPL_LDSCRIPT "board/$(BOARDDIR)/u-boot-spl-hawk.lds" +#define CONFIG_SPL_TEXT_BASE 0xc1080000 +#define CONFIG_SPL_STACK CONFIG_SYS_INIT_SP_ADDR +/* * Memory Info */
@@ -84,9 +101,7 @@/* * Network & Ethernet Configuration */ -#if !defined(CONFIG_NAND_SPL )#define CONFIG_DRIVER_TI_EMAC -#endif #define CONFIG_MII #define CONFIG_BOOTP_DEFAULT #define CONFIG_BOOTP_DNS
nand_spl/board/davinci/da8xxevm/Makefile deleted +0 -155
155 lines not on this page · raw message
Signature · 1 line
1.7.5.4
PATCH v3 2/2 Changes to move hawkboard to the new spl infrastructure.
Hello Sughosh,
I did a quick test on the da850evm with the SPL for booting from SPI and it worked. I have a few comments below.
Quoted 56 lines · Sughosh Ganu
This patch moves hawkboard to the new spl infrastructure from the older
nand_splone.Removed the
hawkboard_nand_configbuild option -- The spl code now gets compiled withhawkboard_config, after building the main u-boot image, using theCONFIG_SPL_TEXT_BASE. Modified the README.hawkboard to reflect the same.Signed-off-by Sughosh Ganu <[email protected]>Signed-off-by Heiko Schocher <[email protected]>Cc Heiko Schocher <[email protected]>Cc Christian Riesch <[email protected]>Cc Sudhakar Rajashekhara <[email protected]>Cc Tom Rini <[email protected]>---
Changes since V2
* Made changes to fix build break onenbw_cmcboard.
* Replaced defines used for conditionally compiling code in ?da850_lowlevel.c to the ones suggested by Heiko.
* Removed unwanted defines from the config files which were added in ?V1.Changes since V1
* Use a common file instead of board specific files for spl, based on review comments from Christian and Heiko.?arch/arm/cpu/arm926ejs/davinci/da850_lowlevel.c ? ?| ? 23 ++-- ?arch/arm/cpu/arm926ejs/davinci/spl.c ? ? ? ? ? ? ? | ? ?4 +- ?arch/arm/include/asm/arch-davinci/da850_lowlevel.h | ? ?9 + ?board/davinci/da8xxevm/da850evm.c ? ? ? ? ? ? ? ? ?| ? ?4 +- ?board/davinci/da8xxevm/hawkboard.c ? ? ? ? ? ? ? ? | ? 23 +++ ?board/davinci/da8xxevm/hawkboard_nand_spl.c ? ? ? ?| ?115 --------------- ?.../{u-boot-spl.lds => u-boot-spl-da850evm.lds} ? ?| ? ?0 ?.../davinci/da8xxevm/u-boot-spl-hawk.lds ? ? ? ? ? | ? 22 ++- ?board/enbw/enbw_cmc/enbw_cmc.c ? ? ? ? ? ? ? ? ? ? | ? 13 +-- ?boards.cfg ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? | ? ?1 - ?doc/README.hawkboard ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? | ? 43 +++--- ?include/configs/da850evm.h ? ? ? ? ? ? ? ? ? ? ? ? | ? ?5 +- ?include/configs/enbw_cmc.h ? ? ? ? ? ? ? ? ? ? ? ? | ? ?2 + ?include/configs/hawkboard.h ? ? ? ? ? ? ? ? ? ? ? ?| ? 23 +++- ?nand_spl/board/davinci/da8xxevm/Makefile ? ? ? ? ? | ?155 --------------------?15 files changed, 111 insertions(+), 331 deletions(-)
?delete mode 100644board/davinci/da8xxevm/hawkboard_nand_spl.c
?renameboard/davinci/da8xxevm/{u-boot-spl.lds=>u-boot-spl-da850evm.lds} (100%) ?renamenand_spl/board/davinci/da8xxevm/u-boot.lds=>board/davinci/da8xxevm/u-boot-spl-hawk.lds(86%) ?delete mode 100644 nand_spl/board/davinci/da8xxevm/Makefilearch/arm/cpu/arm926ejs/davinci/da850_lowlevel.c +0
-0@@ -32,6 +32,7 @@?#include <
asm/arch/emif_defs.h>
?#include <asm/arch/pll_defs.h>
Quoted 1 line
+#if
defined(CONFIG_SYS_DA850_DDR_INIT)
When CONFIG_SYS_DA850_DDR_INIT is not defined, you also remove the PLL initialization functions with this ifdef. I think this is not very beautiful since there is a separate CONFIG_SYS_DA850_PLL_INIT. Please put #if defined(CONFIG_SYS_DA850_DDR_INIT) only around DDR initialization functions and #if defined(CONFIG_SYS_DA850_PLL_INIT) around the PLL init functions instead.
Quoted 56 lines
?void
da850_waitloop(unsigned long loopcnt)
?{
? ? ? ?unsigned long ? i;arch/arm/cpu/arm926ejs/davinci/da850_lowlevel.c +1
-4@@ -235,6 +236,7 @@ int da850_ddr_setup(void) ? ? ? ?return 0; ?} +#endif /* CONFIG_SYS_DA850_DDR_INIT */ ?__attribute__((weak)) ?void board_gpio_init(void)@@ -242,10 +244,6 @@ void board_gpio_init(void) ? ? ? ?return; ?} -/* pinmux_resource[] vector is defined in the board specific file */ -extern const struct pinmux_resource pinmuxes[]; -extern const int pinmuxes_size; - ?int arch_cpu_init(void) ?{? ? ? ?/* Unlock kick registers */
arch/arm/cpu/arm926ejs/davinci/da850_lowlevel.c +1
-0@@ -259,13 +257,11 @@ int arch_cpu_init(void) ? ? ? ?if (davinci_configure_pin_mux_items(pinmuxes, pinmuxes_size)) ? ? ? ? ? ? ? ?return 1; +#if defined(CONFIG_SYS_DA850_PLL_INIT )? ? ? ?/* PLL setup */
? ? ? ?da850_pll_init(davinci_pllc0_regs,CONFIG_SYS_DA850_PLL0_PLLM); ? ? ? ?da850_pll_init(davinci_pllc1_regs,CONFIG_SYS_DA850_PLL1_PLLM);arch/arm/cpu/arm926ejs/davinci/da850_lowlevel.c +1
-4- - ? ? ? /* GPIO setup */ - ? ? ? board_gpio_init(); - +#endif ? ? ? ?/* setup CSn config */
?#ifdefined(CONFIG_SYS_DA850_CS2CFG)
? ? ? ?writel(CONFIG_SYS_DA850_CS2CFG,&davinci_emif_regs->ab1cr);arch/arm/cpu/arm926ejs/davinci/da850_lowlevel.c +0
-0@@ -274,7 +270,15 @@ int arch_cpu_init(void) ? ? ? ?writel(CONFIG_SYS_DA850_CS3CFG, &davinci_emif_regs->ab2cr);?#endif
- ? ? ?
lpsc_on(CONFIG_SYS_DA850_LPSC_UART);
+ ? ? ?da8xx_configure_lpsc_items(lpsc, lpsc_size);arch/arm/cpu/arm926ejs/davinci/da850_lowlevel.c +8
-0+#if defined(CONFIG_SYS_DA850_DDR_INIT ) + ? ? ? da850_ddr_setup(); +#endif + + ? ? ? /* GPIO setup */ + ? ? ? board_gpio_init(); + +? ? ? ?NS16550_init((NS16550_t)(CONFIG_SYS_NS16550_COM1),
? ? ? ? ? ? ? ? ? ? ? ?CONFIG_SYS_NS16550_CLK / 16 /CONFIG_BAUDRATE);
arch/arm/cpu/arm926ejs/davinci/da850_lowlevel.c int arch_cpu_init(void) · line 289
Quoted 4 lines
arch/arm/cpu/arm926ejs/davinci/da850_lowlevel.c +0
-1@@ -286,6 +290,5 @@ int arch_cpu_init(void) ? ? ? ? ? ? ? ?DAVINCI_UART_PWREMU_MGMT_UTRST), ? ? ? ? ? ? ? &davinci_uart2_ctrl_regs->pwremu_mgmt); - ? ? ? da850_ddr_setup();
Why are you changing the order of these initializations? It worked on the da850evm but I hope it doesn't break something else.
Quoted 2 lines
arch/arm/cpu/arm926ejs/davinci/da850_lowlevel.c +0
-0? ? ? ?return 0; ?}
[...]
Quoted 14 lines
include/configs/da850evm.h +0
-0@@ -44,6 +44,8 @@?#define
CONFIG_SYS_HZ? ? ? ? ? ? ? ? ?1000 ?#defineCONFIG_SKIP_LOWLEVEL_INIT?#defineCONFIG_SYS_TEXT_BASE? ? ? ? ?0xc1080000include/configs/da850evm.h +2
-0+#define CONFIG_SYS_DA850_PLL_INIT +#define CONFIG_SYS_DA850_DDR_INIT ?/*
?* Memory Infoinclude/configs/da850evm.h +0
-0@@ -142,7 +144,6 @@
Quoted 4 lines
?#define
CONFIG_CONS_INDEX? ? ?1 ? ? ? ? ? ? ? /* use UART0 for console */ ?#defineCONFIG_BAUDRATE? ? ? ? ? ? ? ?115200 ? ? ? ? ?/* Default baud rate */ ?#defineCONFIG_SYS_BAUDRATE_TABLE? ? ?{ 9600, 19200, 38400, 57600, 115200 } -#defineCONFIG_SYS_DA850_LPSC_UARTDAVINCI_LPSC_UART2
Please do this (removing the line above) also for the enbw_cmc board.
Thank you!
Regards, Christian
PATCH v4 2/2 Changes to move hawkboard to the new spl infrastructure
This patch moves hawkboard to the new spl infrastructure from the older nand_spl one.
Removed the hawkboard_nand_config build option -- The spl code now gets compiled with hawkboard_config, after building the main u-boot image, using the CONFIG_SPL_TEXT_BASE. Modified the README.hawkboard to reflect the same.
---
Changes since V3
* Removed CONFIG_SYS_DA850_LPSC_UART from enbw_cmc board.
* Restored the point at which da850_ddr_setup is called in arch_cpu_init
* Put the pll based functions under CONFIG_SYS_DA850_PLL_INIT
Changes since V2
* Made changes to fix build break on enbw_cmc board.
* Replaced defines used for conditionally compiling code in da850_lowlevel.c to the ones suggested by Heiko.
* Removed unwanted defines from the config files which were added in V1.
Changes since V1
* Use a common file instead of board specific files for spl, based on review comments from Christian and Heiko.
arch/arm/cpu/arm926ejs/davinci/da850_lowlevel.c | 24 ++-
arch/arm/cpu/arm926ejs/davinci/spl.c | 4 +-
arch/arm/include/asm/arch-davinci/da850_lowlevel.h | 9 +
board/davinci/da8xxevm/da850evm.c | 4 +-
board/davinci/da8xxevm/hawkboard.c | 23 +++
board/davinci/da8xxevm/hawkboard_nand_spl.c | 115 ---------------
.../{u-boot-spl.lds => u-boot-spl-da850evm.lds} | 0
.../davinci/da8xxevm/u-boot-spl-hawk.lds | 22 ++-
board/enbw/enbw_cmc/enbw_cmc.c | 13 +--
boards.cfg | 1 -
doc/README.hawkboard | 43 +++---
include/configs/da850evm.h | 5 +-
include/configs/enbw_cmc.h | 4 +-
include/configs/hawkboard.h | 23 +++-
nand_spl/board/davinci/da8xxevm/Makefile | 155 --------------------
15 files changed, 114 insertions(+), 331 deletions(-)
delete mode 100644 board/davinci/da8xxevm/hawkboard_nand_spl.c
rename board/davinci/da8xxevm/{u-boot-spl.lds => u-boot-spl-da850evm.lds} (100%)
rename nand_spl/board/davinci/da8xxevm/u-boot.lds => board/davinci/da8xxevm/u-boot-spl-hawk.lds (86%)
delete mode 100644 nand_spl/board/davinci/da8xxevm/Makefilearch/arm/cpu/arm926ejs/davinci/da850_lowlevel.c +15 -9
@@ -32,6 +32,7 @@#include <asm/arch/emif_defs.h> #include <asm/arch/pll_defs.h> +#if defined(CONFIG_SYS_DA850_PLL_INIT )void da850_waitloop (unsigned long loopcnt) {unsigned long i;
@@ -156,7 +157,9 @@ int da850_pll_init(struct davinci_pllc_regs *reg, unsigned long pllmult)return 0 ; } +#endif /* CONFIG_SYS_DA850_PLL_INIT */ +#if defined(CONFIG_SYS_DA850_DDR_INIT )int da850_ddr_setup (void ) {unsigned long tmp;
@@ -235,6 +238,7 @@ int da850_ddr_setup(void) return 0; } +#endif /* CONFIG_SYS_DA850_DDR_INIT */ __attribute__((weak))void board_gpio_init (void )
@@ -242,10 +246,6 @@ void board_gpio_init(void)return ; } -/* pinmux_resource[] vector is defined in the board specific file */ -extern const struct pinmux_resource pinmuxes[]; -extern const int pinmuxes_size; -int arch_cpu_init (void ) {/* Unlock kick registers */
@@ -259,13 +259,11 @@ int arch_cpu_init(void)if (davinci_configure_pin_mux_items (pinmuxes, pinmuxes_size))return 1 ; +#if defined(CONFIG_SYS_DA850_PLL_INIT )/* PLL setup */ da850_pll_init (davinci_pllc0_regs,CONFIG_SYS_DA850_PLL0_PLLM );da850_pll_init (davinci_pllc1_regs,CONFIG_SYS_DA850_PLL1_PLLM ); - -/* GPIO setup */ -board_gpio_init (); - +#endif /* setup CSn config */ #if defined(CONFIG_SYS_DA850_CS2CFG )writel (CONFIG_SYS_DA850_CS2CFG , &davinci_emif_regs->ab1cr);
@@ -274,7 +272,12 @@ int arch_cpu_init(void)writel (CONFIG_SYS_DA850_CS3CFG , &davinci_emif_regs->ab2cr);#endif -lpsc_on (CONFIG_SYS_DA850_LPSC_UART ); +da8xx_configure_lpsc_items (lpsc, lpsc_size); + +/* GPIO setup */ +board_gpio_init (); + +NS16550_init ((NS16550_t)(CONFIG_SYS_NS16550_COM1 ),CONFIG_SYS_NS16550_CLK /16 /CONFIG_BAUDRATE );
@@ -286,6 +289,9 @@ int arch_cpu_init(void) DAVINCI_UART_PWREMU_MGMT_UTRST), &davinci_uart2_ctrl_regs->pwremu_mgmt); +#if defined(CONFIG_SYS_DA850_DDR_INIT )da850_ddr_setup (); +#endif +return 0 ; }
arch/arm/cpu/arm926ejs/davinci/spl.c +2 -2
@@ -74,12 +74,12 @@ void board_init_f(ulong dummy)void board_init_r (gd_t *id,ulong dummy) { -#ifdef CONFIG_SOC_DM365 +#ifdef CONFIG_SPL_NAND_LOAD nand_init ();puts ("Nand boot...\n" );nand_boot ();#endif -#ifdef CONFIG_SOC_DA8XX +#ifdef CONFIG_SPL_SPI_LOAD mem_malloc_init (CONFIG_SYS_TEXT_BASE -CONFIG_SYS_MALLOC_LEN ,CONFIG_SYS_MALLOC_LEN );
arch/arm/include/asm/arch-davinci/da850_lowlevel.h +9 -0
@@ -24,6 +24,15 @@#ifndef __DA850_LOWLEVEL_H#define __DA850_LOWLEVEL_H +#include <asm/arch/pinmux_defs.h> + +/* pinmux_resource[] vector is defined in the board specific file */ +extern const struct pinmux_resource pinmuxes[]; +extern const int pinmuxes_size; + +extern const struct lpsc_resource lpsc[]; +extern const int lpsc_size; +/* NOR Boot Configuration Word Field Descriptions */ #define DA850_NORBOOT_COPY_XK (X ) ((X - 1) << 8)#define DA850_NORBOOT_METHOD_DIRECT (1 << 4)
board/davinci/da8xxevm/da850evm.c +3 -1
@@ -137,7 +137,7 @@ const struct pinmux_resource pinmuxes[] = {const int pinmuxes_size =ARRAY_SIZE (pinmuxes); -static const struct lpsc_resource lpsc[] = { +const struct lpsc_resource lpsc[] = { {DAVINCI_LPSC_AEMIF },/* NAND, NOR */ {DAVINCI_LPSC_SPI1 },/* Serial Flash */ {DAVINCI_LPSC_EMAC },/* image download */
@@ -145,6 +145,8 @@ static const struct lpsc_resource lpsc[] = { { DAVINCI_LPSC_GPIO }, }; +const int lpsc_size =ARRAY_SIZE (lpsc); +#ifndef CONFIG_DA850_EVM_MAX_CPU_CLK #define CONFIG_DA850_EVM_MAX_CPU_CLK 300000000#endif
board/davinci/da8xxevm/hawkboard.c +23 -0
@@ -27,10 +27,33 @@#include <asm/arch/hardware.h> #include <asm/io.h> #include <asm/arch/davinci_misc.h> +#include <asm/arch/pinmux_defs.h> #include <ns16550.h> DECLARE_GLOBAL_DATA_PTR ; +const struct pinmux_resource pinmuxes[] = { +PINMUX_ITEM (emac_pins_mii), +PINMUX_ITEM (emac_pins_mdio), +PINMUX_ITEM (emifa_pins_cs3), +PINMUX_ITEM (emifa_pins_cs4), +PINMUX_ITEM (emifa_pins_nand), +PINMUX_ITEM (uart2_pins_txrx), +PINMUX_ITEM (uart2_pins_rtscts), +}; + +const int pinmuxes_size =ARRAY_SIZE (pinmuxes); + +const struct lpsc_resource lpsc[] = { + {DAVINCI_LPSC_AEMIF },/* NAND, NOR */ + {DAVINCI_LPSC_SPI1 },/* Serial Flash */ + {DAVINCI_LPSC_EMAC },/* image download */ + {DAVINCI_LPSC_UART2 },/* console */ + {DAVINCI_LPSC_GPIO }, +}; + +const int lpsc_size =ARRAY_SIZE (lpsc); +int board_init (void ) {/* arch number of the board */
board/davinci/da8xxevm/hawkboard_nand_spl.c deleted +0 -115
115 lines not on this page · raw message
board/davinci/da8xxevm/u-boot-spl-da850evm.lds renamed from board/davinci/da8xxevm/u-boot-spl.lds +0 -0
board/davinci/da8xxevm/u-boot-spl-hawk.lds renamed from nand_spl/board/davinci/da8xxevm/u-boot.lds +13 -9
@@ -34,11 +34,11 @@ SECTIONS . = ALIGN(4); .text : { - start.o (.text) - cpu.o (.text) - nand_boot.o (.text) + arch/arm/cpu/arm926ejs/start.o (.text) + arch/arm/cpu/arm926ejs/davinci/libdavinci.o (.text) + drivers/mtd/nand/libnand.o (.text) - *(.text) + *(.text*) } . = ALIGN(4);
@@ -68,10 +68,14 @@ SECTIONS __got_end = .; - _end = .; + .bss : + { + . = ALIGN(4); + __bss_start = .; + *(.bss*) + . = ALIGN(4); + __bss_end__ = .; + } - . = ALIGN(4); - __bss_start = .; - .bss : { *(.bss) } - __bss_end__ = .; + _end = .; }
board/enbw/enbw_cmc/enbw_cmc.c +3 -10
@@ -49,7 +49,7 @@DECLARE_GLOBAL_DATA_PTR ; -static const struct lpsc_resource lpsc[] = { +const struct lpsc_resource lpsc[] = { {DAVINCI_LPSC_AEMIF }, {DAVINCI_LPSC_SPI1 }, {DAVINCI_LPSC_ARM_RAM_ROM },
@@ -65,6 +65,8 @@ static const struct lpsc_resource lpsc[] = { { DAVINCI_LPSC_USB11 }, }; +const int lpsc_size =ARRAY_SIZE (lpsc); +static const struct pinmux_config enbw_pins[] = { {pinmux (0 ),8 ,0 }, { pinmux(0), 8, 1 },
@@ -549,15 +551,6 @@ void board_gpio_init(void)struct davinci_gpio *gpio = davinci_gpio_bank01;/* -* Power on required peripherals -* ARM does not have access by default to PSC0 and PSC1 -* assuming here that the DSP bootloader has set the IOPU -* such that PSC access is available to ARM -*/ -if (da8xx_configure_lpsc_items (lpsc,ARRAY_SIZE (lpsc))) -return ; - -/* * set LED (gpio Interface not usable here) * set LED pins to output and state 0 */
boards.cfg +0 -1
@@ -133,7 +133,6 @@ davinci_sffsdr arm arm926ejs sffsdr davinci davinci_sonata arm arm926ejs sonata davinci davinci ea20 arm arm926ejs ea20 davinci davinci hawkboard arm arm926ejs da8xxevm davinci davinci -hawkboard_nand arm arm926ejs da8xxevm davinci davinci hawkboard:NAND_U_BOOT hawkboard_uart arm arm926ejs da8xxevm davinci davinci hawkboard:UART_U_BOOT enbw_cmc arm arm926ejs enbw_cmc enbw davinci km_kirkwood arm arm926ejs km_arm keymile kirkwood km_kirkwood:KM_DISABLE_PCI
doc/README.hawkboard +21 -22
80 lines not on this page · raw message
include/configs/da850evm.h +3 -2
@@ -44,6 +44,8 @@#define CONFIG_SYS_HZ 1000#define CONFIG_SKIP_LOWLEVEL_INIT #define CONFIG_SYS_TEXT_BASE 0xc1080000 +#define CONFIG_SYS_DA850_PLL_INIT +#define CONFIG_SYS_DA850_DDR_INIT /* * Memory Info
@@ -142,7 +144,6 @@#define CONFIG_CONS_INDEX 1/* use UART0 for console */ #define CONFIG_BAUDRATE 115200/* Default baud rate */ #define CONFIG_SYS_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200 } -#define CONFIG_SYS_DA850_LPSC_UART DAVINCI_LPSC_UART2#define CONFIG_SPI #define CONFIG_SPI_FLASH
@@ -319,7 +320,7 @@#define CONFIG_SPL_SERIAL_SUPPORT #define CONFIG_SPL_LIBCOMMON_SUPPORT #define CONFIG_SPL_LIBGENERIC_SUPPORT -#define CONFIG_SPL_LDSCRIPT "$(BOARDDIR)/u-boot-spl.lds" +#define CONFIG_SPL_LDSCRIPT "board/$(BOARDDIR)/u-boot-spl-da850evm.lds"#define CONFIG_SPL_STACK 0x8001ff00#define CONFIG_SPL_TEXT_BASE 0x80000000#define CONFIG_SPL_MAX_SIZE 32768
include/configs/enbw_cmc.h +3 -1
@@ -48,6 +48,8 @@#define CONFIG_SKIP_LOWLEVEL_INIT #define CONFIG_DA850_LOWLEVEL #define CONFIG_ARCH_CPU_INIT +#define CONFIG_SYS_DA850_PLL_INIT +#define CONFIG_SYS_DA850_DDR_INIT #define CONFIG_DA8XX_GPIO #define CONFIG_HOSTNAME enbw_cmc#define CONFIG_DISPLAY_CPUINFO
@@ -83,7 +85,7 @@#define CONFIG_CONS_INDEX 1/* use UART0 for console */ #define CONFIG_BAUDRATE 115200/* Default baud rate */ #define CONFIG_SYS_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200 } -#define CONFIG_SYS_DA850_LPSC_UART DAVINCI_LPSC_UART2 +/* * I2C Configuration */
include/configs/hawkboard.h +19 -4
@@ -43,12 +43,29 @@#define CONFIG_SKIP_LOWLEVEL_INIT #define CONFIG_BOARD_EARLY_INIT_F -#if defined(CONFIG_NAND_U_BOOT ) || defined(CONFIG_UART_U_BOOT ) +#define CONFIG_SYS_DA850_SYSCFG_SUSPSRC ( \ + DAVINCI_SYSCFG_SUSPSRC_EMAC | \ + DAVINCI_SYSCFG_SUSPSRC_I2C | \ + DAVINCI_SYSCFG_SUSPSRC_SPI1 | \ + DAVINCI_SYSCFG_SUSPSRC_TIMER0 | \ + DAVINCI_SYSCFG_SUSPSRC_UART2) + +#if defined(CONFIG_UART_U_BOOT )#define CONFIG_SYS_TEXT_BASE 0xc1080000 -#else +#elif !defined(CONFIG_SPL_BUILD )#define CONFIG_SYS_TEXT_BASE 0xc1180000#endif +/* Spl */ +#define CONFIG_SPL +#define CONFIG_SPL_NAND_SUPPORT +#define CONFIG_SPL_NAND_SIMPLE +#define CONFIG_SPL_NAND_LOAD +#define CONFIG_SPL_SERIAL_SUPPORT +#define CONFIG_SPL_LDSCRIPT "board/$(BOARDDIR)/u-boot-spl-hawk.lds" +#define CONFIG_SPL_TEXT_BASE 0xc1080000 +#define CONFIG_SPL_STACK CONFIG_SYS_INIT_SP_ADDR +/* * Memory Info */
@@ -84,9 +101,7 @@/* * Network & Ethernet Configuration */ -#if !defined(CONFIG_NAND_SPL )#define CONFIG_DRIVER_TI_EMAC -#endif #define CONFIG_MII #define CONFIG_BOOTP_DEFAULT #define CONFIG_BOOTP_DNS
nand_spl/board/davinci/da8xxevm/Makefile deleted +0 -155
155 lines not on this page · raw message
Signature · 1 line
1.7.5.4
PATCH v4 2/2 Changes to move hawkboard to the new spl infrastructure
Hello Sughosh,
Quoted 8 lines · Sughosh Ganu
This patch moves hawkboard to the new spl infrastructure from the older
nand_splone.Removed the
hawkboard_nand_configbuild option -- The spl code now gets compiled withhawkboard_config, after building the main u-boot image, using theCONFIG_SPL_TEXT_BASE. Modified the README.hawkboard to reflect the same.
Quoted 7 lines
Signed-off-by Sughosh Ganu <[email protected]>Signed-off-by Heiko Schocher <[email protected]>Cc Heiko Schocher <[email protected]>Cc Christian Riesch <[email protected]>Cc Sudhakar Rajashekhara <[email protected]>Cc Tom Rini <[email protected]>---
Patch looks good to me, but it doesn't aplly to current TOT
[hs at pollux u-boot]$ git am index.html
Applying: Changes to move hawkboard to the new spl infrastructure
error: patch failed: include/configs/da850evm.h:44
error: include/configs/da850evm.h: patch does not apply
Patch failed at 0001 Changes to move hawkboard to the new spl infrastructure When you have resolved this problem run "git am --resolved".
If you would prefer to skip this patch, instead run "git am --skip". To restore the original branch and stop patching run "git am --abort". [hs at pollux u-boot]$
My tree is
commit 9a420986cccc9bd2c37affd931d627b3c3e72952
Author: Rob Herring <[email protected]> Date: Thu Dec 15 11:15:50 2011 +0000
ARM: highbank: enable networking and pxe
Do I missing something here? (If I remember right, I had no such issue with your v1 patch ...)
bye,
Heiko
Signature · 2 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
PATCH v4 2/2 Changes to move hawkboard to the new spl infrastructure
hi Heiko,
Quoted 21 lines · Heiko Schocher
Hello Sughosh,
Quoted 8 lines · Sughosh Ganu
This patch moves hawkboard to the new spl infrastructure from the older
nand_splone.Removed the
hawkboard_nand_configbuild option -- The spl code now gets compiled withhawkboard_config, after building the main u-boot image, using theCONFIG_SPL_TEXT_BASE. Modified the README.hawkboard to reflect the same.Quoted 7 lines
Signed-off-by Sughosh Ganu <[email protected]>Signed-off-by Heiko Schocher <[email protected]>Cc Heiko Schocher <[email protected]>Cc Christian Riesch <[email protected]>Cc Sudhakar Rajashekhara <[email protected]>Cc Tom Rini <[email protected]>---
Patch looks good to me, but it doesn't aplly to current TOT
Quoted 9 lines
[hs at pollux u-boot]$ git am index.html
Applying: Changes to move hawkboard to the new spl infrastructure
error: patch failed:include/configs/da850evm.h:44
error:include/configs/da850evm.h: patch does not apply
Patch failed at 0001 Changes to move hawkboard to the new spl infrastructure When you have resolved this problem run "git am --resolved".
If you would prefer to skip this patch, instead run "git am --skip". To restore the original branch and stop patching run "git am --abort". [hs at pollux u-boot]$
I have based this on u-boot-ti, as this would be applied to the ti tree.
-sughosh
PATCH v4 2/2 Changes to move hawkboard to the new spl infrastructure
In reply to Heiko SchocherHello Heiko,
Quoted 33 lines · Heiko Schocher
Hello Sughosh,
Quoted 8 lines · Sughosh Ganu
This patch moves hawkboard to the new spl infrastructure from the older
nand_splone.Removed the
hawkboard_nand_configbuild option -- The spl code now gets compiled withhawkboard_config, after building the main u-boot image, using theCONFIG_SPL_TEXT_BASE. Modified the README.hawkboard to reflect the same.Quoted 7 lines
Signed-off-by Sughosh Ganu <[email protected]>Signed-off-by Heiko Schocher <[email protected]>Cc Heiko Schocher <[email protected]>Cc Christian Riesch <[email protected]>Cc Sudhakar Rajashekhara <[email protected]>Cc Tom Rini <[email protected]>---
Patch looks good to me, but it doesn't aplly to current TOT
[hs at pollux u-boot]$ git am index.html
Applying: Changes to move hawkboard to the new spl infrastructure
error: patch failed:include/configs/da850evm.h:44
error:include/configs/da850evm.h: patch does not apply
Patch failed at 0001 Changes to move hawkboard to the new spl infrastructure When you have resolved this problem run "git am --resolved".
If you would prefer to skip this patch, instead run "git am --skip". To restore the original branch and stop patching run "git am --abort". [hs at pollux u-boot]$My tree is
commit9a420986cccc9bd2c37affd931d627b3c3e72952
Quoted 7 lines
Author: Rob Herring <[email protected]> Date: Thu Dec 15 11:15:50 2011 +0000ARM: highbank: enable networking and pxe
Do I missing something here? (If I remember right, I had no such issue with your v1 patch ...)
It applies only to ti/master due to commit1091e5a65ad2710f7e53e49dd44f9613e789f9b9 ingit://git.denx.de/u-boot-ti.git
Regards, Christian
PATCH v4 2/2 Changes to move hawkboard to the new spl infrastructure
In reply to Sughosh GanuHi Sughosh,
Quoted 8 lines · Sughosh Ganu
This patch moves hawkboard to the new spl infrastructure from the older
nand_splone.Removed the
hawkboard_nand_configbuild option -- The spl code now gets compiled withhawkboard_config, after building the main u-boot image, using theCONFIG_SPL_TEXT_BASE. Modified the README.hawkboard to reflect the same.
Quoted 6 lines
Signed-off-by Sughosh Ganu <[email protected]>Signed-off-by Heiko Schocher <[email protected]>Cc Heiko Schocher <[email protected]>Cc Christian Riesch <[email protected]>Cc Sudhakar Rajashekhara <[email protected]>Cc Tom Rini <[email protected]>
I have tested this with both the da850evm and the calimain board (see [1]), and the low level initialization still works :-)
Therefore
Regards, Christian
PATCH v4 2/2 Changes to move hawkboard to the new spl infrastructure
hi Christian,
Quoted 18 lines · Christian Riesch
Hi Sughosh,
Quoted 8 lines · Sughosh Ganu
This patch moves hawkboard to the new spl infrastructure from the older
nand_splone.Removed the
hawkboard_nand_configbuild option -- The spl code now gets compiled withhawkboard_config, after building the main u-boot image, using theCONFIG_SPL_TEXT_BASE. Modified the README.hawkboard to reflect the same.Quoted 6 lines
Signed-off-by Sughosh Ganu <[email protected]>Signed-off-by Heiko Schocher <[email protected]>Cc Heiko Schocher <[email protected]>Cc Christian Riesch <[email protected]>Cc Sudhakar Rajashekhara <[email protected]>Cc Tom Rini <[email protected]>
Quoted 6 lines
I have tested this with both the da850evm and the calimain board (see [1]), and the low level initialization still works :-)
Therefore
Acked-by Christian Riesch <[email protected]>
Thanks for the review and ack :)
Can you also please test out this patch.
http://patchwork.ozlabs.org/patch/135275/
Just wanted to make sure it does not introduce any regressions. This is a generic arm926ejs fix, so you should be able to test this on any arm926ejs based board
-sughosh
PATCH v4 2/2 Changes to move hawkboard to the new spl infrastructure
Quoted 30 lines · Sughosh Ganu
hi Christian,
Quoted 18 lines · Christian Riesch
Hi Sughosh,
Quoted 8 lines · Sughosh Ganu
This patch moves hawkboard to the new spl infrastructure from the older
nand_splone.Removed the
hawkboard_nand_configbuild option -- The spl code now gets compiled withhawkboard_config, after building the main u-boot image, using theCONFIG_SPL_TEXT_BASE. Modified the README.hawkboard to reflect the same.Quoted 6 lines
Signed-off-by Sughosh Ganu <[email protected]>Signed-off-by Heiko Schocher <[email protected]>Cc Heiko Schocher <[email protected]>Cc Christian Riesch <[email protected]>Cc Sudhakar Rajashekhara <[email protected]>Cc Tom Rini <[email protected]>Quoted 6 lines
I have tested this with both the da850evm and the calimain board (see [1]), and the low level initialization still works :-)
Therefore
Acked-by Christian Riesch <[email protected]>?Thanks for the review and ack :)
Quoted 7 lines
?Can you also please test out this patch.
?http://patchwork.ozlabs.org/patch/135275/
?Just wanted to make sure it does not introduce any regressions. This ?is a generic arm926ejs fix, so you should be able to test this on ?any arm926ejs based board
Ok, I'll do a few tests and reply in the other thread. Christian