[PATCH 11/13] Convert CONFIG_SYS_I2C_SOFT et al to Kconfig

Tom Rini trini at konsulko.com
Wed Aug 18 15:37:29 CEST 2021


On Tue, Aug 17, 2021 at 11:35:53PM -0500, Samuel Holland wrote:
> Hi Tom,
> 
> On 8/17/21 4:59 PM, Tom Rini wrote:
> > This converts the following to Kconfig:
> >    CONFIG_SYS_I2C_SOFT
> >    CONFIG_SYS_I2C_SOFT_SPEED
> >    CONFIG_SYS_I2C_SOFT_SLAVE
> > 
> > Signed-off-by: Tom Rini <trini at konsulko.com>
> > ---
> >  board/sunxi/board.c                  |  2 +-
> >  configs/Colombus_defconfig           |  3 +++
> >  configs/UTOO_P66_defconfig           |  3 +++
> >  configs/ethernut5_defconfig          |  2 ++
> >  configs/km_kirkwood_128m16_defconfig |  2 ++
> >  configs/km_kirkwood_defconfig        |  2 ++
> >  configs/km_kirkwood_pci_defconfig    |  2 ++
> >  configs/kmcoge5un_defconfig          |  2 ++
> >  configs/kmnusa_defconfig             |  2 ++
> >  configs/kmsuse2_defconfig            |  2 ++
> >  configs/snapper9260_defconfig        |  2 ++
> >  configs/snapper9g20_defconfig        |  2 ++
> >  drivers/i2c/Kconfig                  | 19 +++++++++++++++++++
> >  include/configs/ethernut5.h          |  3 ---
> >  include/configs/km/km_arm.h          |  4 ----
> >  include/configs/snapper9260.h        |  3 ---
> >  include/configs/sunxi-common.h       |  5 +----
> >  17 files changed, 45 insertions(+), 15 deletions(-)
> > 
> > diff --git a/board/sunxi/board.c b/board/sunxi/board.c
> > index 1a46100e408d..2b7d655678d0 100644
> > --- a/board/sunxi/board.c
> > +++ b/board/sunxi/board.c
> > @@ -47,7 +47,7 @@
> >  #include <sy8106a.h>
> >  #include <asm/setup.h>
> >  
> > -#if defined CONFIG_VIDEO_LCD_PANEL_I2C && !(defined CONFIG_SPL_BUILD)
> > +#if defined(CONFIG_VIDEO_LCD_PANEL_I2C)
> 
> The soft i2c bus is only used by a DM driver (sunxi_de), and DM is not enabled
> in SPL, so this bus is not needed in SPL.
> 
> This worked because the condition for CONFIG_SYS_I2C_SOFT, and thus for
> compiling the driver, also included !(defined CONFIG_SPL_BUILD).
> 
> Your change will increase the size of SPL, but I think it should be fine. The
> increase will be temporary, as I am working on a patch series to finish the
> DM_I2C conversion for sunxi.

Yes, it's a small increase (but within the limits I believe, unless
sunxi isn't enforcing link time failures on overgrowth?).  And it's good
to hear you've got a series to address this as I wasn't looking forward
to adding a further batch of SPL-only symbols.

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20210818/d1754602/attachment.sig>


More information about the U-Boot mailing list