Message ID | 1486373775-29580-7-git-send-email-rogerq@ti.com |
---|---|
State | New |
Headers | show |
Series | am57xx-idk LCD and am571x-idk 6 port ethernet pinmux | expand |
On Mon, Feb 06, 2017 at 11:36:13AM +0200, Roger Quadros wrote: > In stead of defining the board EEPROM address in the board headers > let's define them in the board config files and make them > configurable by Kconfig. > > Signed-off-by: Roger Quadros <rogerq@ti.com> > --- > board/ti/common/Kconfig | 14 ++++++++++++++ > board/ti/ks2_evm/Kconfig | 2 ++ > include/configs/am57xx_evm.h | 4 ---- > include/configs/dra7xx_evm.h | 4 ---- > 4 files changed, 16 insertions(+), 8 deletions(-) > > diff --git a/board/ti/common/Kconfig b/board/ti/common/Kconfig > index 4980a04..5003484 100644 > --- a/board/ti/common/Kconfig > +++ b/board/ti/common/Kconfig > @@ -1,3 +1,5 @@ > +if ARCH_OMAP2 > + > config SPL_ENV_SUPPORT > default y > > @@ -39,3 +41,15 @@ config SPL_POWER_SUPPORT > > config SPL_SERIAL_SUPPORT > default y > + > +endif I don't like this part here. But we'll leave cleaning this part up until we have the 'imply' keyword available instead of messing around more with the above constructs that we ultimately want to remove. The rest is good so, thanks! Reviewed-by: Tom Rini <trini@konsulko.com> -- Tom _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
On 2/6/2017 3:06 PM, Roger Quadros wrote: > In stead of defining the board EEPROM address in the board headers > let's define them in the board config files and make them > configurable by Kconfig. > > Signed-off-by: Roger Quadros <rogerq@ti.com> > --- > board/ti/common/Kconfig | 14 ++++++++++++++ > board/ti/ks2_evm/Kconfig | 2 ++ > include/configs/am57xx_evm.h | 4 ---- > include/configs/dra7xx_evm.h | 4 ---- > 4 files changed, 16 insertions(+), 8 deletions(-) > > diff --git a/board/ti/common/Kconfig b/board/ti/common/Kconfig > index 4980a04..5003484 100644 > --- a/board/ti/common/Kconfig > +++ b/board/ti/common/Kconfig > @@ -1,3 +1,5 @@ > +if ARCH_OMAP2 > + > config SPL_ENV_SUPPORT > default y You might want to keep TI_I2C_BOARD_DETECT out of ARCH_OMAP2 or else it will not be included for K2 platforms. Thanks and regards, Lokesh > > @@ -39,3 +41,15 @@ config SPL_POWER_SUPPORT > > config SPL_SERIAL_SUPPORT > default y > + > +endif > + > +config EEPROM_BUS_ADDRESS > + int "Board EEPROM's I2C bus address" > + range 0 8 > + default 0 > + > +config EEPROM_CHIP_ADDRESS > + hex "Board EEPROM's I2C chip address" > + range 0 0xff > + default 0x50 > diff --git a/board/ti/ks2_evm/Kconfig b/board/ti/ks2_evm/Kconfig > index c0568ec..9477f53 100644 > --- a/board/ti/ks2_evm/Kconfig > +++ b/board/ti/ks2_evm/Kconfig > @@ -49,3 +49,5 @@ config SYS_CONFIG_NAME > default "k2g_evm" > > endif > + > +source "board/ti/common/Kconfig" > diff --git a/include/configs/am57xx_evm.h b/include/configs/am57xx_evm.h > index 840502c..d9e1119 100644 > --- a/include/configs/am57xx_evm.h > +++ b/include/configs/am57xx_evm.h > @@ -105,10 +105,6 @@ > #define CONFIG_SYS_SCSI_MAX_DEVICE (CONFIG_SYS_SCSI_MAX_SCSI_ID * \ > CONFIG_SYS_SCSI_MAX_LUN) > > -/* EEPROM */ > -#define CONFIG_EEPROM_CHIP_ADDRESS 0x50 > -#define CONFIG_EEPROM_BUS_ADDRESS 0 > - > /* > * Default to using SPI for environment, etc. > * 0x000000 - 0x040000 : QSPI.SPL (256KiB) > diff --git a/include/configs/dra7xx_evm.h b/include/configs/dra7xx_evm.h > index da458a4..46beb8b 100644 > --- a/include/configs/dra7xx_evm.h > +++ b/include/configs/dra7xx_evm.h > @@ -264,8 +264,4 @@ > #endif > #endif /* NOR support */ > > -/* EEPROM */ > -#define CONFIG_EEPROM_CHIP_ADDRESS 0x50 > -#define CONFIG_EEPROM_BUS_ADDRESS 0 > - > #endif /* __CONFIG_DRA7XX_EVM_H */ > _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
On 07/02/17 05:13, Lokesh Vutla wrote: > > > On 2/6/2017 3:06 PM, Roger Quadros wrote: >> In stead of defining the board EEPROM address in the board headers >> let's define them in the board config files and make them >> configurable by Kconfig. >> >> Signed-off-by: Roger Quadros <rogerq@ti.com> >> --- >> board/ti/common/Kconfig | 14 ++++++++++++++ >> board/ti/ks2_evm/Kconfig | 2 ++ >> include/configs/am57xx_evm.h | 4 ---- >> include/configs/dra7xx_evm.h | 4 ---- >> 4 files changed, 16 insertions(+), 8 deletions(-) >> >> diff --git a/board/ti/common/Kconfig b/board/ti/common/Kconfig >> index 4980a04..5003484 100644 >> --- a/board/ti/common/Kconfig >> +++ b/board/ti/common/Kconfig >> @@ -1,3 +1,5 @@ >> +if ARCH_OMAP2 >> + >> config SPL_ENV_SUPPORT >> default y > > You might want to keep TI_I2C_BOARD_DETECT out of ARCH_OMAP2 or else it > will not be included for K2 platforms. Good catch. I'll fix this. I couldn't verify this as k2g-ice board doesn't boot yet. cheers, -roger > > Thanks and regards, > Lokesh > >> >> @@ -39,3 +41,15 @@ config SPL_POWER_SUPPORT >> >> config SPL_SERIAL_SUPPORT >> default y >> + >> +endif >> + >> +config EEPROM_BUS_ADDRESS >> + int "Board EEPROM's I2C bus address" >> + range 0 8 >> + default 0 >> + >> +config EEPROM_CHIP_ADDRESS >> + hex "Board EEPROM's I2C chip address" >> + range 0 0xff >> + default 0x50 >> diff --git a/board/ti/ks2_evm/Kconfig b/board/ti/ks2_evm/Kconfig >> index c0568ec..9477f53 100644 >> --- a/board/ti/ks2_evm/Kconfig >> +++ b/board/ti/ks2_evm/Kconfig >> @@ -49,3 +49,5 @@ config SYS_CONFIG_NAME >> default "k2g_evm" >> >> endif >> + >> +source "board/ti/common/Kconfig" >> diff --git a/include/configs/am57xx_evm.h b/include/configs/am57xx_evm.h >> index 840502c..d9e1119 100644 >> --- a/include/configs/am57xx_evm.h >> +++ b/include/configs/am57xx_evm.h >> @@ -105,10 +105,6 @@ >> #define CONFIG_SYS_SCSI_MAX_DEVICE (CONFIG_SYS_SCSI_MAX_SCSI_ID * \ >> CONFIG_SYS_SCSI_MAX_LUN) >> >> -/* EEPROM */ >> -#define CONFIG_EEPROM_CHIP_ADDRESS 0x50 >> -#define CONFIG_EEPROM_BUS_ADDRESS 0 >> - >> /* >> * Default to using SPI for environment, etc. >> * 0x000000 - 0x040000 : QSPI.SPL (256KiB) >> diff --git a/include/configs/dra7xx_evm.h b/include/configs/dra7xx_evm.h >> index da458a4..46beb8b 100644 >> --- a/include/configs/dra7xx_evm.h >> +++ b/include/configs/dra7xx_evm.h >> @@ -264,8 +264,4 @@ >> #endif >> #endif /* NOR support */ >> >> -/* EEPROM */ >> -#define CONFIG_EEPROM_CHIP_ADDRESS 0x50 >> -#define CONFIG_EEPROM_BUS_ADDRESS 0 >> - >> #endif /* __CONFIG_DRA7XX_EVM_H */ >> -- cheers, -roger _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot
diff --git a/board/ti/common/Kconfig b/board/ti/common/Kconfig index 4980a04..5003484 100644 --- a/board/ti/common/Kconfig +++ b/board/ti/common/Kconfig @@ -1,3 +1,5 @@ +if ARCH_OMAP2 + config SPL_ENV_SUPPORT default y @@ -39,3 +41,15 @@ config SPL_POWER_SUPPORT config SPL_SERIAL_SUPPORT default y + +endif + +config EEPROM_BUS_ADDRESS + int "Board EEPROM's I2C bus address" + range 0 8 + default 0 + +config EEPROM_CHIP_ADDRESS + hex "Board EEPROM's I2C chip address" + range 0 0xff + default 0x50 diff --git a/board/ti/ks2_evm/Kconfig b/board/ti/ks2_evm/Kconfig index c0568ec..9477f53 100644 --- a/board/ti/ks2_evm/Kconfig +++ b/board/ti/ks2_evm/Kconfig @@ -49,3 +49,5 @@ config SYS_CONFIG_NAME default "k2g_evm" endif + +source "board/ti/common/Kconfig" diff --git a/include/configs/am57xx_evm.h b/include/configs/am57xx_evm.h index 840502c..d9e1119 100644 --- a/include/configs/am57xx_evm.h +++ b/include/configs/am57xx_evm.h @@ -105,10 +105,6 @@ #define CONFIG_SYS_SCSI_MAX_DEVICE (CONFIG_SYS_SCSI_MAX_SCSI_ID * \ CONFIG_SYS_SCSI_MAX_LUN) -/* EEPROM */ -#define CONFIG_EEPROM_CHIP_ADDRESS 0x50 -#define CONFIG_EEPROM_BUS_ADDRESS 0 - /* * Default to using SPI for environment, etc. * 0x000000 - 0x040000 : QSPI.SPL (256KiB) diff --git a/include/configs/dra7xx_evm.h b/include/configs/dra7xx_evm.h index da458a4..46beb8b 100644 --- a/include/configs/dra7xx_evm.h +++ b/include/configs/dra7xx_evm.h @@ -264,8 +264,4 @@ #endif #endif /* NOR support */ -/* EEPROM */ -#define CONFIG_EEPROM_CHIP_ADDRESS 0x50 -#define CONFIG_EEPROM_BUS_ADDRESS 0 - #endif /* __CONFIG_DRA7XX_EVM_H */
In stead of defining the board EEPROM address in the board headers let's define them in the board config files and make them configurable by Kconfig. Signed-off-by: Roger Quadros <rogerq@ti.com> --- board/ti/common/Kconfig | 14 ++++++++++++++ board/ti/ks2_evm/Kconfig | 2 ++ include/configs/am57xx_evm.h | 4 ---- include/configs/dra7xx_evm.h | 4 ---- 4 files changed, 16 insertions(+), 8 deletions(-) -- 2.7.4 _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot