sunxi: Only enable i2c support in the SPL when needed
authorHans de Goede <hdegoede@redhat.com>
Fri, 23 Jan 2015 14:28:22 +0000 (15:28 +0100)
committerHans de Goede <hdegoede@redhat.com>
Mon, 2 Feb 2015 12:55:14 +0000 (13:55 +0100)
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.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
include/configs/sunxi-common.h

index 4a5cab2..6cfd7e1 100644 (file)
 #define CONFIG_SYS_SPL_MALLOC_SIZE     0x00080000      /* 512 KiB */
 
 /* 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