[U-Boot] [PATCH v2 3/5] ARM: omap-common: Add standard access for board description EEPROM

Tom Rini trini at konsulko.com
Tue Nov 3 17:07:21 CET 2015


On Tue, Nov 03, 2015 at 09:26:44AM -0600, Nishanth Menon wrote:
> On 11/03/2015 09:13 AM, Steven Kipisz wrote:
> > On 11/03/2015 07:16 AM, Igor Grinberg wrote:
> >> Hi Steve,
> >>
> >> On 11/03/15 14:22, Steve Kipisz wrote:
> >>> From: Lokesh Vutla <lokeshvutla at ti.com>
> >>
> >> [...]
> >>
> >>>
> >>> Signed-off-by: Lokesh Vutla <lokeshvutla at ti.com>
> >>> Signed-off-by: Steve Kipisz <s-kipisz2 at ti.com>
> >>> ---
> >>> v2 Based on
> >>>   master      a6104737  ARM: at91: sama5: change the environment
> >>> address to 0x6000
> >>>
> >>> Changes in v2 (since v1)
> >>>     - make the EEPROM code mor generic for TI EVMs
> >>>     - rename structures/subroutines to ti_am_xxxxx
> >>>     - add routines to access the EEPROM data
> >>>     - redo commit message to be more clear
> >>>
> >>> v1:   http://marc.info/?t=144608007900001&r=1&w=2
> >>>     (mailing list squashed original submission)
> >>>
> >>>   arch/arm/cpu/armv7/omap-common/Makefile        |   1 +
> >>>   arch/arm/cpu/armv7/omap-common/ti-i2c-eeprom.c | 148
> >>> +++++++++++++++++++++++++
> >>>   arch/arm/include/asm/omap_common.h             | 130
> >>> +++++++++++++++++++++-
> >>>   3 files changed, 278 insertions(+), 1 deletion(-)
> >>>   create mode 100644 arch/arm/cpu/armv7/omap-common/ti-i2c-eeprom.c
> >>>
> >>> diff --git a/arch/arm/cpu/armv7/omap-common/Makefile
> >>> b/arch/arm/cpu/armv7/omap-common/Makefile
> >>> index 464a5d1d732a..53a9fdb81100 100644
> >>> --- a/arch/arm/cpu/armv7/omap-common/Makefile
> >>> +++ b/arch/arm/cpu/armv7/omap-common/Makefile
> >>> @@ -15,6 +15,7 @@ obj-y    += clocks-common.o
> >>>   obj-y    += emif-common.o
> >>>   obj-y    += vc.o
> >>>   obj-y    += abb.o
> >>> +obj-$(CONFIG_I2C) += ti-i2c-eeprom.o
> >>
> >> This makes this module compile on all TI SoC based boards enabling I2C.
> >> AFAIU, this is a separate chip (not inside the SoC), so this module will
> >> also compile on non-TI boards that do not have this EEPROM.
> >> I think, it should be more fine grained (e.g. have its own symbol).
> >>
> > Can you give a suggestion?
> 
> Are you sure this will be built into non-ti SoCs with I2C enabled if you
> are not using the function? I assume  __maybe_unused should take care of
> that, no - let the compiler do the gc anyways?

The gc should work, yes.  But this is also TI-centric code and should
end up in board/ti/ similar to how the Siemens AM335x EEPROM code is
under board/siemens/ because they didn't re-use the TI format :)

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


More information about the U-Boot mailing list