public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Tom Rini <trini@konsulko.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [u-boot PATCH v2 6/8] ARM: Use Kconfig for board EEPROM's I2C bus and chip address
Date: Wed, 1 Feb 2017 08:44:06 -0500	[thread overview]
Message-ID: <20170201134406.GM5096@bill-the-cat> (raw)
In-Reply-To: <22f06bc2-b365-d851-228a-facf5fa7018b@ti.com>

On Wed, Feb 01, 2017 at 03:05:18PM +0200, Roger Quadros wrote:
> On 01/02/17 14:14, Tom Rini wrote:
> > On Wed, Feb 01, 2017 at 02:01:11PM +0200, Roger Quadros wrote:
> >> On 01/02/17 12:47, Lokesh Vutla wrote:
> >>>
> >>>
> >>> On Wednesday 01 February 2017 03:12 PM, Roger Quadros wrote:
> >>>> On 31/01/17 06:17, Lokesh Vutla wrote:
> >>>>>
> >>>>>
> >>>>> On Monday 30 January 2017 08:45 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>
> >>>>>> ---
> >>>>>>  arch/arm/Kconfig                  | 10 ++++++++++
> >>>>>>  configs/am57xx_evm_defconfig      |  2 ++
> >>>>>>  configs/am57xx_evm_nodt_defconfig |  2 ++
> >>>>>>  configs/am57xx_hs_evm_defconfig   |  2 ++
> >>>>>>  configs/dra7xx_evm_defconfig      |  2 ++
> >>>>>>  configs/dra7xx_hs_evm_defconfig   |  2 ++
> >>>>>>  include/configs/am57xx_evm.h      |  4 ----
> >>>>>>  include/configs/dra7xx_evm.h      |  4 ----
> >>>>>>  8 files changed, 20 insertions(+), 8 deletions(-)
> >>>>>>
> >>>>>> diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
> >>>>>> index c04adfb..19886ad 100644
> >>>>>> --- a/arch/arm/Kconfig
> >>>>>> +++ b/arch/arm/Kconfig
> >>>>>> @@ -1009,6 +1009,16 @@ config TARGET_THUNDERX_88XX
> >>>>>>  
> >>>>>>  endchoice
> >>>>>>  
> >>>>>> +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
> >>>>>> +
> >>>>>
> >>>>> IMO, these should be placed in board/ti/common/Kconfig. Also need not
> >>>>> specify the value explicitly in defconfig if default value is used.
> >>>>
> >>>> "board/ti/common/Kconfig" is not used by keystone
> >>>> Is it OK to source it in board/ti/ks2_evm/Kconfig?
> >>>
> >>> yes. I don't see any problem with that :)
> >>>
> >>
> >> If I do that I get the below error.
> >> I think it is because SPL_NAND is being enabled but not required for K2?
> >> Are all options in ti/common/Kconfig relevant for K2?
> > 
> > The Kconfig file may need some minor tweaks / dependencies added to be
> > used on keystone, and long term we'll be doing all of those "config
> > SPL_FOO\ndefault y" entries another way.  The NAND entry could be
> > changed (but you'll need to test, and shoving a test branch at travis-ci
> > is an easy way to test) to be instead of 'default y' be 'default
> > CMD_NAND' I think.
> 
> It starts to look ugly if I add conditions in the Kconfig file.
> Why are we setting default y to various SPL_* options in this file?
> Shouldn't the board config file explicitly set the values?
> e.g. some TI board might not need SPL_I2C and other might need it.

Until the 'imply' keyword comes in to Kconfig we're left with a few
different ugly options in order to avoid having to make the defconfig
files themselves unwieldy.  A 'default y' does not make it impossible to
disable the feature, but changing the default here potentially easier
than setting it to N in the various k2 defconfig files, for example.

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170201/fc44d251/attachment.sig>

  reply	other threads:[~2017-02-01 13:44 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-30 15:15 [U-Boot] [u-boot PATCH v2 0/8] am57xx-idk LCD and am571x-idk 6 port ethernet pinmux Roger Quadros
2017-01-30 15:15 ` [U-Boot] [u-boot PATCH v2 1/8] ARM: OMAP5+: GPIO: Add GPIO_TO_PIN() macro Roger Quadros
2017-01-31  4:08   ` Lokesh Vutla
2017-01-30 15:15 ` [U-Boot] [u-boot PATCH v2 2/8] ti: common: board_detect: commodify ethaddr environment setting code Roger Quadros
2017-01-31  4:08   ` Lokesh Vutla
2017-01-31 21:38   ` Tom Rini
2017-01-30 15:15 ` [U-Boot] [u-boot PATCH v2 3/8] board: ti: am571x-idk: Support 6 port Ethernet or 4 port Ethernet with LCD Roger Quadros
2017-01-31  4:10   ` Lokesh Vutla
2017-01-30 15:15 ` [U-Boot] [u-boot PATCH v2 4/8] board: ti: am571x-idk: Update pinmux for ICSS2 Ethernet Roger Quadros
2017-01-31  4:10   ` Lokesh Vutla
2017-01-30 15:15 ` [U-Boot] [u-boot PATCH v2 5/8] board: ti: am57xx-idk: Auto detect LCD Panel Roger Quadros
2017-01-30 15:15 ` [U-Boot] [u-boot PATCH v2 6/8] ARM: Use Kconfig for board EEPROM's I2C bus and chip address Roger Quadros
2017-01-31  4:17   ` Lokesh Vutla
2017-02-01  9:42     ` Roger Quadros
2017-02-01 10:47       ` Lokesh Vutla
2017-02-01 12:01         ` Roger Quadros
2017-02-01 12:14           ` Tom Rini
2017-02-01 13:05             ` Roger Quadros
2017-02-01 13:44               ` Tom Rini [this message]
2017-01-30 15:15 ` [U-Boot] [u-boot PATCH v2 7/8] ARM: k2g: setup PRU ethernet MAC addresses Roger Quadros
2017-01-31  4:18   ` Lokesh Vutla
2017-01-30 15:15 ` [U-Boot] [u-boot PATCH v2 8/8] ti: common: board_detect: Rename EEPROM scratch start macro Roger Quadros
2017-01-31 21:38   ` Tom Rini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170201134406.GM5096@bill-the-cat \
    --to=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox