Skip to contentSkip to conversation

sunxi: Only enable i2c support in the SPL when needed

PATCH New Hans de Goede 2 participants 2 messages Jan 23, 2015 Arm/Allwinner sunXi SoC support

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sunxi: Only enable i2c support in the SPL when needed

We do not need i2c support in the SPL when there is no PMIC (some sun4i boards), or when the PMIC is not using i2c such as on sun6i and sun8i.

This reduces the SPL size from (e.g.) 21812 to 19260 bytes.

---
 include/configs/sunxi-common.h | 3 +++
 1 file changed, 3 insertions(+)
include/configs/sunxi-common.h +3 -0
index ad8a6a3..3d69861 100644
@@ -233,7 +233,10 @@
 #define CONFIG_SPL_STACK		LOW_LEVEL_SRAM_STACK
 
 /* I2C */
+#if defined CONFIG_AXP152_POWER || defined CONFIG_AXP209_POWER
 #define CONFIG_SPL_I2C_SUPPORT
+#endif
+
 #define CONFIG_SYS_I2C
 #define CONFIG_SYS_I2C_MVTWSI
 #define CONFIG_SYS_I2C_SPEED		400000
Signature · 1 line
2.1.0
#1 lore raw

PATCH 1/1 sunxi: Only enable i2c support in the SPL when needed

Quoted 6 lines · Hans de Goede

We do not need i2c support in the SPL when there is no PMIC (some sun4i boards), or when the PMIC is not using i2c such as on sun6i and sun8i.

This reduces the SPL size from (e.g.) 21812 to 19260 bytes.

Eventually ought to be expressed via Kconfig, but for now: