[U-Boot] [PATCH v2 08/12] i2c: Drop use of CONFIG_I2C_HARD

Simon Glass sjg at chromium.org
Sat May 13 03:09:50 UTC 2017


Hi Tom.

On 12 May 2017 at 09:12, Simon Glass <sjg at chromium.org> wrote:
> Hi Tom,
>
> On 12 May 2017 at 08:47, Tom Rini <trini at konsulko.com> wrote:
>> On Fri, May 12, 2017 at 08:29:04AM -0600, Simon Glass wrote:
>>> Hi Tom,
>>>
>>> On 12 May 2017 at 08:19, Tom Rini <trini at konsulko.com> wrote:
>>> > On Fri, May 12, 2017 at 08:12:14AM -0600, Simon Glass wrote:
>>> >> Hi Tom,
>>> >>
>>> >> On 11 May 2017 at 18:33, Tom Rini <trini at konsulko.com> wrote:
>>> >> > On Thu, May 11, 2017 at 06:23:57PM -0600, Simon Glass wrote:
>>> >> >
>>> >> >> Drop use of this long-deprecated option.
>>> >> > [snip]
>>> >> >> diff --git a/include/configs/PATI.h b/include/configs/PATI.h
>>> >> >> index e53db2485b..046aa0d5f1 100644
>>> >> >> --- a/include/configs/PATI.h
>>> >> >> +++ b/include/configs/PATI.h
>>> >> >> @@ -38,7 +38,6 @@
>>> >> >>   */
>>> >> >>  #define CONFIG_CMD_REGINFO
>>> >> >>  #define CONFIG_CMD_REGINFO
>>> >> >> -#define CONFIG_CMD_EEPROM
>>> >> >>  #define CONFIG_CMD_IRQ
>>> >> >>
>>> >> >>  #define CONFIG_BOOTCOMMAND   ""      /* autoboot command                     */
>>> >> > [snip]
>>> >> >> diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h
>>> >> >> index fc8a08f5b7..5c1a6d64da 100644
>>> >> >> --- a/include/configs/am335x_evm.h
>>> >> >> +++ b/include/configs/am335x_evm.h
>>> >> >> @@ -176,11 +176,6 @@
>>> >> >>  #define CONFIG_SYS_NS16550_COM5              0x481a8000      /* UART4 */
>>> >> >>  #define CONFIG_SYS_NS16550_COM6              0x481aa000      /* UART5 */
>>> >> >>
>>> >> >> -#define CONFIG_CMD_EEPROM
>>> >> >> -#define CONFIG_ENV_EEPROM_IS_ON_I2C
>>> >> >> -#define CONFIG_SYS_I2C_EEPROM_ADDR   0x50    /* Main EEPROM */
>>> >> >> -#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN       2
>>> >> >> -
>>> >> >>  /* PMIC support */
>>> >> >>  #define CONFIG_POWER_TPS65217
>>> >> >>  #define CONFIG_POWER_TPS65910
>>> >> >> diff --git a/include/configs/am43xx_evm.h b/include/configs/am43xx_evm.h
>>> >> >> index 1feb946834..ba185ebf5a 100644
>>> >> >> --- a/include/configs/am43xx_evm.h
>>> >> >> +++ b/include/configs/am43xx_evm.h
>>> >> >> @@ -22,12 +22,6 @@
>>> >> >>  #define CONFIG_SYS_NS16550_SERIAL
>>> >> >>  #endif
>>> >> >>
>>> >> >> -/* I2C Configuration */
>>> >> >> -#define CONFIG_CMD_EEPROM
>>> >> >> -#define CONFIG_ENV_EEPROM_IS_ON_I2C
>>> >> >> -#define CONFIG_SYS_I2C_EEPROM_ADDR   0x50    /* Main EEPROM */
>>> >> >> -#define CONFIG_SYS_I2C_EEPROM_ADDR_LEN       2
>>> >> >> -
>>> >> >>  /* Power */
>>> >> >>  #define CONFIG_POWER
>>> >> >>  #define CONFIG_POWER_I2C
>>> >> >> diff --git a/include/configs/ti_armv7_keystone2.h b/include/configs/ti_armv7_keystone2.h
>>> >> >> index 868464cd32..3161c50abb 100644
>>> >> >> --- a/include/configs/ti_armv7_keystone2.h
>>> >> >> +++ b/include/configs/ti_armv7_keystone2.h
>>> >> >> @@ -208,7 +208,6 @@
>>> >> >>  /* U-Boot command configuration */
>>> >> >>  #define CONFIG_CMD_SAVES
>>> >> >>  #define CONFIG_CMD_UBIFS
>>> >> >> -#define CONFIG_CMD_EEPROM
>>> >> >>
>>> >> >>  /* U-Boot general configuration */
>>> >> >>  #define CONFIG_MISC_INIT_R
>>> >> >
>>> >> > Er, what's all of this about EEPROM stuff you're dropping?
>>> >>
>>> >> It uses I2C (as does the environment and RTC on some boards) so I need
>>> >> to drop this too. Let me know if you can think of a better way.
>>> >
>>> > Am I confused, or is CONFIG_SYS_I2C staying (so far..) and
>>> > CONFIG_HARD_I2C going?  cmd/eeprom.c supports CONFIG_SYS_I2C, so we only
>>> > need to drop CMD_EEPROM stuff iff the board was also CONFIG_HARD_I2C.
>>>
>>> Yes that's my intention. But if I have stuffed something up, let me know.
>>
>> Yes, it got stuffed up :)  I know all of the TI related ones are wrong,
>> and you might want to double check the others too.
>
> OK I will take another look. My algorithm was to disable eeprom, env
> or rtc when I got a build error.

I found the problem. I was confused by a double #ifdef. I'll fix this
up and send v3.

>
>>
>>> >> I am not sure this will be enough though. I looked through the CONFIG
>>> >> whitelist a few days ago and there are many boards that have
>>> >> board-specific settings like I2C addresses, speeds, etc. I am not sure
>>> >> how we can keep these board around since we really don't want to add
>>> >> these sorts of board-specific settings to Kconfig. They should be in
>>> >> the device tree.
>>> >
>>> > Yes, there's a lot of CONFIG_xxx stuff that's going to need to move out
>>> > of the CONFIG namespace as it doesn't make sense there.  And I have been
>>> > sending out some private pings about converting PowerPC stuff (and I'm
>>> > getting my own house in order right now).
>>>
>>> Yes PowerPC seems to be the main area, but there are some ARM boards
>>> too. I wonder if we need a tool to automate finding boards with
>>> special configuration.
>>
>> My current plan is to see if people still wish to maintain the board in
>> mainline and if so, prod them about needing to get those values
>> converted asap.
>>
>> --
>> Tom
>
> Regards,
> Siimon

Regards,
Simon


More information about the U-Boot mailing list