diff mbox

[U-Boot] compulab: eeprom: add default eeprom bus

Message ID 1410958765-6525-1-git-send-email-nikita@compulab.co.il
State Accepted
Delegated to: Albert ARIBAUD
Headers show

Commit Message

Nikita Kiryanov Sept. 17, 2014, 12:59 p.m. UTC
Add default eeprom bus setting.
This addresses the trimslice compile error that was introduced
with the addition of this setting.

Cc: Albert ARIBAUD <albert.u.boot@aribaud.net>
Cc: Igor Grinberg <grinberg@compulab.co.il>
Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
---
 board/compulab/common/eeprom.c | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Igor Grinberg Sept. 17, 2014, 2:18 p.m. UTC | #1
On 09/17/14 15:59, Nikita Kiryanov wrote:
> Add default eeprom bus setting.
> This addresses the trimslice compile error that was introduced
> with the addition of this setting.
> 
> Cc: Albert ARIBAUD <albert.u.boot@aribaud.net>
> Cc: Igor Grinberg <grinberg@compulab.co.il>
> Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>

Acked-by: Igor Grinberg <grinberg@compulab.co.il>

Albert, this should be a temporary fix to not break the trimslice support.
We intend to rework this while switching Kconfig for all boards.

Thanks!

> ---
>  board/compulab/common/eeprom.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/board/compulab/common/eeprom.c b/board/compulab/common/eeprom.c
> index 85442cd..2df3ada 100644
> --- a/board/compulab/common/eeprom.c
> +++ b/board/compulab/common/eeprom.c
> @@ -15,6 +15,10 @@
>  # define CONFIG_SYS_I2C_EEPROM_ADDR_LEN	1
>  #endif
>  
> +#ifndef CONFIG_SYS_I2C_EEPROM_BUS
> +#define CONFIG_SYS_I2C_EEPROM_BUS	0
> +#endif
> +
>  #define EEPROM_LAYOUT_VER_OFFSET	44
>  #define BOARD_SERIAL_OFFSET		20
>  #define BOARD_SERIAL_OFFSET_LEGACY	8
>
Albert ARIBAUD Sept. 18, 2014, 12:26 p.m. UTC | #2
Hi Igor,

On Wed, 17 Sep 2014 17:18:49 +0300, Igor Grinberg
<grinberg@compulab.co.il> wrote:

> On 09/17/14 15:59, Nikita Kiryanov wrote:
> > Add default eeprom bus setting.
> > This addresses the trimslice compile error that was introduced
> > with the addition of this setting.
> > 
> > Cc: Albert ARIBAUD <albert.u.boot@aribaud.net>
> > Cc: Igor Grinberg <grinberg@compulab.co.il>
> > Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
> 
> Acked-by: Igor Grinberg <grinberg@compulab.co.il>
> 
> Albert, this should be a temporary fix to not break the trimslice support.
> We intend to rework this while switching Kconfig for all boards.
> 
> Thanks!
> 
> > ---
> >  board/compulab/common/eeprom.c | 4 ++++
> >  1 file changed, 4 insertions(+)
> > 
> > diff --git a/board/compulab/common/eeprom.c b/board/compulab/common/eeprom.c
> > index 85442cd..2df3ada 100644
> > --- a/board/compulab/common/eeprom.c
> > +++ b/board/compulab/common/eeprom.c
> > @@ -15,6 +15,10 @@
> >  # define CONFIG_SYS_I2C_EEPROM_ADDR_LEN	1
> >  #endif
> >  
> > +#ifndef CONFIG_SYS_I2C_EEPROM_BUS
> > +#define CONFIG_SYS_I2C_EEPROM_BUS	0
> > +#endif
> > +
> >  #define EEPROM_LAYOUT_VER_OFFSET	44
> >  #define BOARD_SERIAL_OFFSET		20
> >  #define BOARD_SERIAL_OFFSET_LEGACY	8
> > 

a 'git grep CONFIG_SYS_I2C_EEPROM_BUS' shows that all values for
CONFIG_SYS_I2C_EEPROM_BUS are set in include/configs/*.h.

Therefore I would prefer that the temporary fix be in
include/configs/trimslice.h header file too.

Amicalement,
Nikita Kiryanov Sept. 18, 2014, 1:21 p.m. UTC | #3
Hi ALbert,

On 18/09/14 15:26, Albert ARIBAUD wrote:
> Hi Igor,
>
> On Wed, 17 Sep 2014 17:18:49 +0300, Igor Grinberg
> <grinberg@compulab.co.il> wrote:
>
>> On 09/17/14 15:59, Nikita Kiryanov wrote:
>>> Add default eeprom bus setting.
>>> This addresses the trimslice compile error that was introduced
>>> with the addition of this setting.
>>>
>>> Cc: Albert ARIBAUD <albert.u.boot@aribaud.net>
>>> Cc: Igor Grinberg <grinberg@compulab.co.il>
>>> Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
>>
>> Acked-by: Igor Grinberg <grinberg@compulab.co.il>
>>
>> Albert, this should be a temporary fix to not break the trimslice support.
>> We intend to rework this while switching Kconfig for all boards.
>>
>> Thanks!
>>
>>> ---
>>>   board/compulab/common/eeprom.c | 4 ++++
>>>   1 file changed, 4 insertions(+)
>>>
>>> diff --git a/board/compulab/common/eeprom.c b/board/compulab/common/eeprom.c
>>> index 85442cd..2df3ada 100644
>>> --- a/board/compulab/common/eeprom.c
>>> +++ b/board/compulab/common/eeprom.c
>>> @@ -15,6 +15,10 @@
>>>   # define CONFIG_SYS_I2C_EEPROM_ADDR_LEN	1
>>>   #endif
>>>
>>> +#ifndef CONFIG_SYS_I2C_EEPROM_BUS
>>> +#define CONFIG_SYS_I2C_EEPROM_BUS	0
>>> +#endif
>>> +
>>>   #define EEPROM_LAYOUT_VER_OFFSET	44
>>>   #define BOARD_SERIAL_OFFSET		20
>>>   #define BOARD_SERIAL_OFFSET_LEGACY	8
>>>
>
> a 'git grep CONFIG_SYS_I2C_EEPROM_BUS' shows that all values for
> CONFIG_SYS_I2C_EEPROM_BUS are set in include/configs/*.h.
>
> Therefore I would prefer that the temporary fix be in
> include/configs/trimslice.h header file too.
>

Given that trimslice does not use the eeprom code, I feel that
it's cleaner to not populate its config file with irrelevant
defines. It's also consistent with the way CONFIG_SYS_I2C_EEPROM_ADDR
and CONFIG_SYS_I2C_EEPROM_ADDR_LEN are handled.
Albert ARIBAUD Sept. 18, 2014, 8:35 p.m. UTC | #4
Hi Nikita,

On Thu, 18 Sep 2014 16:21:07 +0300, Nikita Kiryanov
<nikita@compulab.co.il> wrote:

> Hi ALbert,
> 
> On 18/09/14 15:26, Albert ARIBAUD wrote:
> > Hi Igor,
> >
> > On Wed, 17 Sep 2014 17:18:49 +0300, Igor Grinberg
> > <grinberg@compulab.co.il> wrote:
> >
> >> On 09/17/14 15:59, Nikita Kiryanov wrote:
> >>> Add default eeprom bus setting.
> >>> This addresses the trimslice compile error that was introduced
> >>> with the addition of this setting.
> >>>
> >>> Cc: Albert ARIBAUD <albert.u.boot@aribaud.net>
> >>> Cc: Igor Grinberg <grinberg@compulab.co.il>
> >>> Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
> >>
> >> Acked-by: Igor Grinberg <grinberg@compulab.co.il>
> >>
> >> Albert, this should be a temporary fix to not break the trimslice support.
> >> We intend to rework this while switching Kconfig for all boards.
> >>
> >> Thanks!
> >>
> >>> ---
> >>>   board/compulab/common/eeprom.c | 4 ++++
> >>>   1 file changed, 4 insertions(+)
> >>>
> >>> diff --git a/board/compulab/common/eeprom.c b/board/compulab/common/eeprom.c
> >>> index 85442cd..2df3ada 100644
> >>> --- a/board/compulab/common/eeprom.c
> >>> +++ b/board/compulab/common/eeprom.c
> >>> @@ -15,6 +15,10 @@
> >>>   # define CONFIG_SYS_I2C_EEPROM_ADDR_LEN	1
> >>>   #endif
> >>>
> >>> +#ifndef CONFIG_SYS_I2C_EEPROM_BUS
> >>> +#define CONFIG_SYS_I2C_EEPROM_BUS	0
> >>> +#endif
> >>> +
> >>>   #define EEPROM_LAYOUT_VER_OFFSET	44
> >>>   #define BOARD_SERIAL_OFFSET		20
> >>>   #define BOARD_SERIAL_OFFSET_LEGACY	8
> >>>
> >
> > a 'git grep CONFIG_SYS_I2C_EEPROM_BUS' shows that all values for
> > CONFIG_SYS_I2C_EEPROM_BUS are set in include/configs/*.h.
> >
> > Therefore I would prefer that the temporary fix be in
> > include/configs/trimslice.h header file too.
> >
> 
> Given that trimslice does not use the eeprom code, I feel that
> it's cleaner to not populate its config file with irrelevant
> defines. It's also consistent with the way CONFIG_SYS_I2C_EEPROM_ADDR
> and CONFIG_SYS_I2C_EEPROM_ADDR_LEN are handled.

Makes sense enough.

Amicalement,
Nikita Kiryanov Oct. 8, 2014, 12:03 p.m. UTC | #5
Gentle ping.

On 18/09/14 23:35, Albert ARIBAUD wrote:
> Hi Nikita,
>
> On Thu, 18 Sep 2014 16:21:07 +0300, Nikita Kiryanov
> <nikita@compulab.co.il> wrote:
>
>> Hi ALbert,
>>
>> On 18/09/14 15:26, Albert ARIBAUD wrote:
>>> Hi Igor,
>>>
>>> On Wed, 17 Sep 2014 17:18:49 +0300, Igor Grinberg
>>> <grinberg@compulab.co.il> wrote:
>>>
>>>> On 09/17/14 15:59, Nikita Kiryanov wrote:
>>>>> Add default eeprom bus setting.
>>>>> This addresses the trimslice compile error that was introduced
>>>>> with the addition of this setting.
>>>>>
>>>>> Cc: Albert ARIBAUD <albert.u.boot@aribaud.net>
>>>>> Cc: Igor Grinberg <grinberg@compulab.co.il>
>>>>> Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
>>>>
>>>> Acked-by: Igor Grinberg <grinberg@compulab.co.il>
>>>>
>>>> Albert, this should be a temporary fix to not break the trimslice support.
>>>> We intend to rework this while switching Kconfig for all boards.
>>>>
>>>> Thanks!
>>>>
>>>>> ---
>>>>>    board/compulab/common/eeprom.c | 4 ++++
>>>>>    1 file changed, 4 insertions(+)
>>>>>
>>>>> diff --git a/board/compulab/common/eeprom.c b/board/compulab/common/eeprom.c
>>>>> index 85442cd..2df3ada 100644
>>>>> --- a/board/compulab/common/eeprom.c
>>>>> +++ b/board/compulab/common/eeprom.c
>>>>> @@ -15,6 +15,10 @@
>>>>>    # define CONFIG_SYS_I2C_EEPROM_ADDR_LEN	1
>>>>>    #endif
>>>>>
>>>>> +#ifndef CONFIG_SYS_I2C_EEPROM_BUS
>>>>> +#define CONFIG_SYS_I2C_EEPROM_BUS	0
>>>>> +#endif
>>>>> +
>>>>>    #define EEPROM_LAYOUT_VER_OFFSET	44
>>>>>    #define BOARD_SERIAL_OFFSET		20
>>>>>    #define BOARD_SERIAL_OFFSET_LEGACY	8
>>>>>
>>>
>>> a 'git grep CONFIG_SYS_I2C_EEPROM_BUS' shows that all values for
>>> CONFIG_SYS_I2C_EEPROM_BUS are set in include/configs/*.h.
>>>
>>> Therefore I would prefer that the temporary fix be in
>>> include/configs/trimslice.h header file too.
>>>
>>
>> Given that trimslice does not use the eeprom code, I feel that
>> it's cleaner to not populate its config file with irrelevant
>> defines. It's also consistent with the way CONFIG_SYS_I2C_EEPROM_ADDR
>> and CONFIG_SYS_I2C_EEPROM_ADDR_LEN are handled.
>
> Makes sense enough.
>
> Amicalement,
>
Albert ARIBAUD Oct. 9, 2014, 8:50 a.m. UTC | #6
Hi Nikita,

On Wed, 17 Sep 2014 15:59:25 +0300, Nikita Kiryanov
<nikita@compulab.co.il> wrote:

> Add default eeprom bus setting.
> This addresses the trimslice compile error that was introduced
> with the addition of this setting.
> 
> Cc: Albert ARIBAUD <albert.u.boot@aribaud.net>
> Cc: Igor Grinberg <grinberg@compulab.co.il>
> Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
> ---
>  board/compulab/common/eeprom.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/board/compulab/common/eeprom.c b/board/compulab/common/eeprom.c
> index 85442cd..2df3ada 100644
> --- a/board/compulab/common/eeprom.c
> +++ b/board/compulab/common/eeprom.c
> @@ -15,6 +15,10 @@
>  # define CONFIG_SYS_I2C_EEPROM_ADDR_LEN	1
>  #endif
>  
> +#ifndef CONFIG_SYS_I2C_EEPROM_BUS
> +#define CONFIG_SYS_I2C_EEPROM_BUS	0
> +#endif
> +
>  #define EEPROM_LAYOUT_VER_OFFSET	44
>  #define BOARD_SERIAL_OFFSET		20
>  #define BOARD_SERIAL_OFFSET_LEGACY	8

Applied to u-boot-arm/master, thanks!

Unclean builds now down from 6 to 5 (openrd_client openrd_ultimate
tricorder_flash openrd_base tricorder)

Amicalement,
diff mbox

Patch

diff --git a/board/compulab/common/eeprom.c b/board/compulab/common/eeprom.c
index 85442cd..2df3ada 100644
--- a/board/compulab/common/eeprom.c
+++ b/board/compulab/common/eeprom.c
@@ -15,6 +15,10 @@ 
 # define CONFIG_SYS_I2C_EEPROM_ADDR_LEN	1
 #endif
 
+#ifndef CONFIG_SYS_I2C_EEPROM_BUS
+#define CONFIG_SYS_I2C_EEPROM_BUS	0
+#endif
+
 #define EEPROM_LAYOUT_VER_OFFSET	44
 #define BOARD_SERIAL_OFFSET		20
 #define BOARD_SERIAL_OFFSET_LEGACY	8