[U-Boot] [PATCH 03/22] ARM sunxi: I2C driver

Henrik Nordström henrik at henriknordstrom.net
Sun Nov 25 16:47:54 CET 2012


sön 2012-11-25 klockan 15:41 +0100 skrev Luka Perkov:

> Why don't you do it like this:
> 
> #ifdef CONFIG_CMD_I2C
> #define CONFIG_SPL_I2C_SUPPORT
> #define CONFIG_SYS_I2C_SPEED		400000
> #define CONFIG_HARD_I2C
> #define CONFIG_SUNXI_I2C
> #define CONFIG_SYS_I2C_SLAVE		0x7f
> #endif /* CONFIG_CMD_I2C */
> 
> That way you can simply turn on i2c support in board configuration file.
> If users don't want/need i2c they don't need to use it.

SPL I2C support is orthogonal to CMD_I2C.

SPL needs I2C support for PMU control to configure the right CPU core
voltage and some other parameters.

Right now we only have one board which do not really need I2C driver in
SPL, all the others always need I2C driver enabled in SPL.

And we don't really have any board specific config files at the moment.
sunxi-common.h is the shared-by-all board config file, with sun4i.h and
sun5i.h being SoC generation dependent. The known boards are all so
similar that they can use the same main u-boot binary, almost even in
both SoC generations. 

SPL do differ noticeably in parameters from board to board.

Regards
Henrik



More information about the U-Boot mailing list