Hi Allen, On Fri, Jun 8, 2012 at 2:16 PM, Allen Martin <amar...@nvidia.com> wrote:
> Add SPL options to tegra20 config files and enable SPL build for > tegra20 boards in boards.cfg > > Signed-off-by: Allen Martin <amar...@nvidia.com> > --- > boards.cfg | 18 ++++----- > include/configs/tegra20-common-post.h | 65 > +++++++++++++++++++++++++++++++++ > include/configs/tegra20-common.h | 18 ++++++++- > 3 files changed, 91 insertions(+), 10 deletions(-) > diff --git a/boards.cfg b/boards.cfg > index 8958ba2..de59585 100644 > --- a/boards.cfg > +++ b/boards.cfg > @@ -233,10 +233,10 @@ s5pc210_universal arm armv7 > universal_c210 samsung > smdk5250 arm armv7 smdk5250 > samsung exynos > smdkv310 arm armv7 smdkv310 > samsung exynos > trats arm armv7 trats > samsung exynos > -harmony arm armv7 harmony > nvidia tegra20 > -seaboard arm armv7 seaboard > nvidia tegra20 > -ventana arm armv7 ventana > nvidia tegra20 > -whistler arm armv7 whistler > nvidia tegra20 > +harmony arm armv7:arm720t harmony > nvidia tegra20 > +seaboard arm armv7:arm720t seaboard > nvidia tegra20 > +ventana arm armv7:arm720t ventana > nvidia tegra20 > +whistler arm armv7:arm720t whistler > nvidia tegra20 > u8500_href arm armv7 u8500 > st-ericsson u8500 > actux1_4_16 arm ixp actux1 > - - actux1:FLASH2X2 > actux1_4_32 arm ixp actux1 > - - actux1:FLASH2X2,RAM_32MB > @@ -262,11 +262,11 @@ xaeniax arm pxa > zipitz2 arm pxa > colibri_pxa270 arm pxa - > toradex > jornada arm sa1100 > -plutux arm armv7 plutux > avionic-design tegra20 > -medcom arm armv7 medcom > avionic-design tegra20 > -tec arm armv7 tec > avionic-design tegra20 > -paz00 arm armv7 paz00 > compal tegra20 > -trimslice arm armv7 trimslice > compulab tegra20 > +plutux arm armv7:arm720t plutux > avionic-design tegra20 > +medcom arm armv7:arm720t medcom > avionic-design tegra20 > +tec arm armv7:arm720t tec > avionic-design tegra20 > +paz00 arm armv7:arm720t paz00 > compal tegra20 > +trimslice arm armv7:arm720t trimslice > compulab tegra20 > atngw100 avr32 at32ap - > atmel at32ap700x > atstk1002 avr32 at32ap atstk1000 > atmel at32ap700x > atstk1003 avr32 at32ap atstk1000 > atmel at32ap700x > diff --git a/include/configs/tegra20-common-post.h > b/include/configs/tegra20-common-post.h > index b535934..6b046bd 100644 > --- a/include/configs/tegra20-common-post.h > +++ b/include/configs/tegra20-common-post.h > @@ -144,4 +144,69 @@ > TEGRA20_DEVICE_SETTINGS \ > BOOTCMDS_COMMON > > +/* overrides for SPL build here */ > +#ifdef CONFIG_SPL_BUILD > + > +/* remove devicetree support */ > +#ifdef CONFIG_OF_CONTROL > +#undef CONFIG_OF_CONTROL > +#endif > + > +/* remove SERIAL_MULTI */ > +#ifdef CONFIG_SERIAL_MULTI > +#undef CONFIG_SERIAL_MULTI > +#endif > + > +/* remove I2C support */ > +#ifdef CONFIG_TEGRA_I2C > +#undef CONFIG_TEGRA_I2C > +#endif > +#ifdef CONFIG_CMD_I2C > +#undef CONFIG_CMD_I2C > +#endif > This stuff is pretty ugly - would it not be better to make boards not define this in the CONFIG_SPL_BUILD case in the first place, rather than overriding them? As an example, I2C might be useful in SPL, but here it would be hard (or even uglier) to add. > + > +/* remove MMC support */ > +#ifdef CONFIG_MMC > +#undef CONFIG_MMC > +#endif > +#ifdef CONFIG_GENERIC_MMC > +#undef CONFIG_GENERIC_MMC > +#endif > +#ifdef CONFIG_TEGRA20_MMC > +#undef CONFIG_TEGRA20_MMC > +#endif > +#ifdef CONFIG_CMD_MMC > +#undef CONFIG_CMD_MMC > +#endif > + > +/* remove partitions/filesystems */ > +#ifdef CONFIG_DOS_PARTITION > +#undef CONFIG_DOS_PARTITION > +#endif > +#ifdef CONFIG_EFI_PARTITION > +#undef CONFIG_EFI_PARTITION > +#endif > +#ifdef CONFIG_CMD_EXT2 > +#undef CONFIG_CMD_EXT2 > +#endif > +#ifdef CONFIG_CMD_FAT > +#undef CONFIG_CMD_FAT > +#endif > + > +/* remove USB */ > +#ifdef CONFIG_USB_EHCI > +#undef CONFIG_USB_EHCI > +#endif > +#ifdef CONFIG_USB_EHCI_TEGRA > +#undef CONFIG_USB_EHCI_TEGRA > +#endif > +#ifdef CONFIG_USB_STORAGE > +#undef CONFIG_USB_STORAGE > +#endif > +#ifdef CONFIG_CMD_USB > +#undef CONFIG_CMD_USB > +#endif > + > +#endif /* CONFIG_SPL_BUILD */ > + > #endif /* __TEGRA20_COMMON_POST_H */ > diff --git a/include/configs/tegra20-common.h > b/include/configs/tegra20-common.h > index 731ab52..17c710e 100644 > --- a/include/configs/tegra20-common.h > +++ b/include/configs/tegra20-common.h > @@ -183,7 +183,7 @@ > #define PHYS_SDRAM_1 TEGRA20_SDRC_CS0 > #define PHYS_SDRAM_1_SIZE 0x20000000 /* 512M */ > > -#define CONFIG_SYS_TEXT_BASE 0x00108000 > +#define CONFIG_SYS_TEXT_BASE 0x00208000 > Just a question: can/should SPL be loaded to the internal SRAM instead of DRAM? > #define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM_1 > > #define CONFIG_SYS_INIT_RAM_ADDR CONFIG_STACKBASE > @@ -195,4 +195,20 @@ > #define CONFIG_TEGRA_GPIO > #define CONFIG_CMD_GPIO > #define CONFIG_CMD_ENTERRCM > + > +/* Defines for SPL */ > +#define CONFIG_SPL > +#define CONFIG_SPL_NAND_SIMPLE > +#define CONFIG_SPL_TEXT_BASE 0x00108000 > +#define CONFIG_SPL_MAX_SIZE 0x00078000 > +#define CONFIG_SYS_SPL_MALLOC_START 0x00180000 > +#define CONFIG_SYS_SPL_MALLOC_SIZE 0x00010000 > +#define CONFIG_SPL_STACK 0x0019fffc > + > +#define CONFIG_SPL_LIBCOMMON_SUPPORT > +#define CONFIG_SPL_LIBGENERIC_SUPPORT > +#define CONFIG_SPL_SERIAL_SUPPORT > +#define CONFIG_SPL_GPIO_SUPPORT > +#define CONFIG_SPL_LDSCRIPT "$(CPUDIR)/tegra20/u-boot-spl.lds" > + > #endif /* __TEGRA20_COMMON_H */ > -- > 1.7.9.5 > > Regards, Simon
_______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot