Message ID | 20171218093425.12235-5-lokeshvutla@ti.com |
---|---|
State | Superseded |
Delegated to: | Tom Rini |
Headers | show |
Series | arm: am57xx: Add support for am574-idk | expand |
On Mon, Dec 18, 2017 at 03:04:16PM +0530, Lokesh Vutla wrote: > Move cmd_ddr3 to board/ti/common/ in order to make > it build for non-keystone TI platforms. > > Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com> [snip] > diff --git a/board/ti/common/Makefile b/board/ti/common/Makefile > index 7170eac81e..66025040bc 100644 > --- a/board/ti/common/Makefile > +++ b/board/ti/common/Makefile > @@ -4,3 +4,6 @@ > # > > obj-${CONFIG_TI_I2C_BOARD_DETECT} += board_detect.o > +ifndef CONFIG_SPL_BUILD > +obj-${CONFIG_CMD_DDR3} += cmd_ddr3.o > +endif We shouldn't need games like that now to have all strings be discarded, now that we're mandating gcc-6 or later. Thanks!
On Tuesday 19 December 2017 01:33 AM, Tom Rini wrote: > On Mon, Dec 18, 2017 at 03:04:16PM +0530, Lokesh Vutla wrote: > >> Move cmd_ddr3 to board/ti/common/ in order to make >> it build for non-keystone TI platforms. >> >> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com> > [snip] >> diff --git a/board/ti/common/Makefile b/board/ti/common/Makefile >> index 7170eac81e..66025040bc 100644 >> --- a/board/ti/common/Makefile >> +++ b/board/ti/common/Makefile >> @@ -4,3 +4,6 @@ >> # >> >> obj-${CONFIG_TI_I2C_BOARD_DETECT} += board_detect.o >> +ifndef CONFIG_SPL_BUILD >> +obj-${CONFIG_CMD_DDR3} += cmd_ddr3.o >> +endif > > We shouldn't need games like that now to have all strings be discarded, > now that we're mandating gcc-6 or later. Thanks! > whithout guarding with !SPL_BUILD, following build erroris seen if SPL_ENV is not enabled: # env/built-in.o:(.data.env_htab+0xc): undefined reference to `env_flags_validate' lib/built-in.o: In function `hsearch_r': /home/lokesh/working/mainline/u-boot/lib/hashtable.c:380: undefined reference to `env_callback_init' /home/lokesh/working/mainline/u-boot/lib/hashtable.c:382: undefined reference to `env_flags_init' scripts/Makefile.spl:343: recipe for target 'spl/u-boot-spl' failed make[1]: *** [spl/u-boot-spl] Error 1 Makefile:1400: recipe for target 'spl/u-boot-spl' failed make: *** [spl/u-boot-spl] Error 2 gcc-6 is being used. Am I missing something? Thanks and regards, Lokesh
On Tue, Dec 19, 2017 at 10:31:19AM +0530, Lokesh Vutla wrote: > > > On Tuesday 19 December 2017 01:33 AM, Tom Rini wrote: > > On Mon, Dec 18, 2017 at 03:04:16PM +0530, Lokesh Vutla wrote: > > > >> Move cmd_ddr3 to board/ti/common/ in order to make > >> it build for non-keystone TI platforms. > >> > >> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com> > > [snip] > >> diff --git a/board/ti/common/Makefile b/board/ti/common/Makefile > >> index 7170eac81e..66025040bc 100644 > >> --- a/board/ti/common/Makefile > >> +++ b/board/ti/common/Makefile > >> @@ -4,3 +4,6 @@ > >> # > >> > >> obj-${CONFIG_TI_I2C_BOARD_DETECT} += board_detect.o > >> +ifndef CONFIG_SPL_BUILD > >> +obj-${CONFIG_CMD_DDR3} += cmd_ddr3.o > >> +endif > > > > We shouldn't need games like that now to have all strings be discarded, > > now that we're mandating gcc-6 or later. Thanks! > > whithout guarding with !SPL_BUILD, following build erroris seen if > SPL_ENV is not enabled: > > # > env/built-in.o:(.data.env_htab+0xc): undefined reference to > `env_flags_validate' > lib/built-in.o: In function `hsearch_r': > /home/lokesh/working/mainline/u-boot/lib/hashtable.c:380: undefined > reference to `env_callback_init' > /home/lokesh/working/mainline/u-boot/lib/hashtable.c:382: undefined > reference to `env_flags_init' > scripts/Makefile.spl:343: recipe for target 'spl/u-boot-spl' failed > make[1]: *** [spl/u-boot-spl] Error 1 > Makefile:1400: recipe for target 'spl/u-boot-spl' failed > make: *** [spl/u-boot-spl] Error 2 > > > gcc-6 is being used. Am I missing something? Hmmm, I would have expected it to be gc'd away. But I guess we're forcing commands to be linked in for some reason, I'll dig more just so I know again but disregard my comment about removing the guard, thanks!
On Tue, Dec 19, 2017 at 10:31:19AM +0530, Lokesh Vutla wrote: > > > On Tuesday 19 December 2017 01:33 AM, Tom Rini wrote: > > On Mon, Dec 18, 2017 at 03:04:16PM +0530, Lokesh Vutla wrote: > > > >> Move cmd_ddr3 to board/ti/common/ in order to make > >> it build for non-keystone TI platforms. > >> > >> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com> > > [snip] > >> diff --git a/board/ti/common/Makefile b/board/ti/common/Makefile > >> index 7170eac81e..66025040bc 100644 > >> --- a/board/ti/common/Makefile > >> +++ b/board/ti/common/Makefile > >> @@ -4,3 +4,6 @@ > >> # > >> > >> obj-${CONFIG_TI_I2C_BOARD_DETECT} += board_detect.o > >> +ifndef CONFIG_SPL_BUILD > >> +obj-${CONFIG_CMD_DDR3} += cmd_ddr3.o > >> +endif While I'm looking at this again, we should probably mirror cmd/mvebu here and move this to cmd/ti/ instead of board/ti/common/, thanks!
diff --git a/arch/arm/mach-keystone/Kconfig b/arch/arm/mach-keystone/Kconfig index cababdba52..d24596eccb 100644 --- a/arch/arm/mach-keystone/Kconfig +++ b/arch/arm/mach-keystone/Kconfig @@ -7,16 +7,19 @@ choice config TARGET_K2HK_EVM bool "TI Keystone 2 Kepler/Hawking EVM" select SPL_BOARD_INIT if SPL + select CMD_DDR3 imply DM_I2C config TARGET_K2E_EVM bool "TI Keystone 2 Edison EVM" select SPL_BOARD_INIT if SPL + select CMD_DDR3 imply DM_I2C config TARGET_K2L_EVM bool "TI Keystone 2 Lamar EVM" select SPL_BOARD_INIT if SPL + select CMD_DDR3 imply DM_I2C config TARGET_K2G_EVM @@ -24,6 +27,7 @@ config TARGET_K2G_EVM select BOARD_LATE_INIT select SPL_BOARD_INIT if SPL select TI_I2C_BOARD_DETECT + select CMD_DDR3 imply DM_I2C endchoice diff --git a/arch/arm/mach-keystone/Makefile b/arch/arm/mach-keystone/Makefile index 8253a3bcc1..3e076e12ec 100644 --- a/arch/arm/mach-keystone/Makefile +++ b/arch/arm/mach-keystone/Makefile @@ -13,7 +13,6 @@ ifndef CONFIG_SPL_BUILD obj-y += cmd_clock.o obj-y += cmd_mon.o obj-y += cmd_poweroff.o -obj-y += cmd_ddr3.o endif obj-y += msmc.o obj-y += ddr3.o diff --git a/board/ti/common/Kconfig b/board/ti/common/Kconfig index c21eb8c2d2..d7c05e2451 100644 --- a/board/ti/common/Kconfig +++ b/board/ti/common/Kconfig @@ -42,3 +42,10 @@ config TI_COMMON_CMD_OPTIONS imply CMD_SPI imply CMD_TIME imply CMD_USB if USB + +config CMD_DDR3 + bool "command for verifying DDR features" + help + Support for testing ddr3 on TI platforms. This command + supports memory verification, memory comapre and ecc + verification if supported. diff --git a/board/ti/common/Makefile b/board/ti/common/Makefile index 7170eac81e..66025040bc 100644 --- a/board/ti/common/Makefile +++ b/board/ti/common/Makefile @@ -4,3 +4,6 @@ # obj-${CONFIG_TI_I2C_BOARD_DETECT} += board_detect.o +ifndef CONFIG_SPL_BUILD +obj-${CONFIG_CMD_DDR3} += cmd_ddr3.o +endif diff --git a/arch/arm/mach-keystone/cmd_ddr3.c b/board/ti/common/cmd_ddr3.c similarity index 98% rename from arch/arm/mach-keystone/cmd_ddr3.c rename to board/ti/common/cmd_ddr3.c index d3eab0711c..b6435a43f4 100644 --- a/arch/arm/mach-keystone/cmd_ddr3.c +++ b/board/ti/common/cmd_ddr3.c @@ -1,8 +1,7 @@ /* - * Keystone2: DDR3 test commands + * EMIF: DDR3 test commands * - * (C) Copyright 2012-2014 - * Texas Instruments Incorporated, <www.ti.com> + * Copyright (C) 2012-2017 Texas Instruments Incorporated, <www.ti.com> * * SPDX-License-Identifier: GPL-2.0+ */
Move cmd_ddr3 to board/ti/common/ in order to make it build for non-keystone TI platforms. Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com> --- arch/arm/mach-keystone/Kconfig | 4 ++++ arch/arm/mach-keystone/Makefile | 1 - board/ti/common/Kconfig | 7 +++++++ board/ti/common/Makefile | 3 +++ {arch/arm/mach-keystone => board/ti/common}/cmd_ddr3.c | 5 ++--- 5 files changed, 16 insertions(+), 4 deletions(-) rename {arch/arm/mach-keystone => board/ti/common}/cmd_ddr3.c (98%)