Message ID | 1321954745-18112-6-git-send-email-aneesh@ti.com |
---|---|
State | Accepted, archived |
Delegated to: | Tom Rini |
Headers | show |
On Tue, Nov 22, 2011 at 2:39 AM, Aneesh V <aneesh@ti.com> wrote: > Due to some recent changes I2C is no longer required in SPL. > Remove the i2c_init() call to save some space Which changes? We might need to bring this back for am335x stuff, once we have i2c support ready to post to mainline (on these boards we identify board/rev in the EEPROM)
On Tuesday 22 November 2011 09:22 PM, Tom Rini wrote: > On Tue, Nov 22, 2011 at 2:39 AM, Aneesh V<aneesh@ti.com> wrote: >> Due to some recent changes I2C is no longer required in SPL. >> Remove the i2c_init() call to save some space > > Which changes? We might need to bring this back for am335x stuff, > once we have i2c support ready to post to mainline (on these boards we > identify board/rev in the EEPROM) > Apparently this one: 14fa2dd00f4f996c9583c8fba63bfa03f5025ec3 Looks like this is what has helped: /* TWL6030 */ +#ifndef CONFIG_SPL_BUILD #define CONFIG_TWL6030_POWER 1 +#endif On a closer look, it looks like this may not be the case for OMAP3. CONFIG_TWL4030_POWER seems to be defined even for SPL. So, I think we need to do something like this: #if defined(CONFIG_TWL6030_POWER) || defined(CONFIG_TWL4030_POWER) || defined(CONFIG_EEPROM) i2c_init(); #endif If you agree, I will do this change in v2. BTW, I think you can also remove CONFIG_TWL4030_POWER from SPL. As we continue to boot from the same media where ROM code picked up SPL from, the regulators should be in proper condition. br, Aneesh
On Wed, Nov 23, 2011 at 12:34 AM, Aneesh V <aneesh@ti.com> wrote: > On Tuesday 22 November 2011 09:22 PM, Tom Rini wrote: >> >> On Tue, Nov 22, 2011 at 2:39 AM, Aneesh V<aneesh@ti.com> wrote: >>> >>> Due to some recent changes I2C is no longer required in SPL. >>> Remove the i2c_init() call to save some space >> >> Which changes? We might need to bring this back for am335x stuff, >> once we have i2c support ready to post to mainline (on these boards we >> identify board/rev in the EEPROM) >> > > Apparently this one: > > 14fa2dd00f4f996c9583c8fba63bfa03f5025ec3 > > Looks like this is what has helped: > > /* TWL6030 */ > +#ifndef CONFIG_SPL_BUILD > #define CONFIG_TWL6030_POWER 1 > +#endif > > On a closer look, it looks like this may not be the case for OMAP3. > CONFIG_TWL4030_POWER seems to be defined even for SPL. So, I think we > need to do something like this: > > #if defined(CONFIG_TWL6030_POWER) || defined(CONFIG_TWL4030_POWER) || > defined(CONFIG_EEPROM) > > i2c_init(); > > #endif > > If you agree, I will do this change in v2. > > BTW, I think you can also remove CONFIG_TWL4030_POWER from SPL. As we > continue to boot from the same media where ROM code picked up SPL from, > the regulators should be in proper condition. Hmm, I think what we need is spl_board_init where we can put things like i2c_init();. I'll grab that from the am335x tree and post it today.
diff --git a/arch/arm/cpu/armv7/omap-common/spl.c b/arch/arm/cpu/armv7/omap-common/spl.c index d6d7d65..f72d389 100644 --- a/arch/arm/cpu/armv7/omap-common/spl.c +++ b/arch/arm/cpu/armv7/omap-common/spl.c @@ -115,7 +115,6 @@ void board_init_r(gd_t *id, ulong dummy) CONFIG_SYS_SPL_MALLOC_SIZE); timer_init(); - i2c_init(CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE); boot_device = omap_boot_device(); debug("boot device - %d\n", boot_device);
Due to some recent changes I2C is no longer required in SPL. Remove the i2c_init() call to save some space Signed-off-by: Aneesh V <aneesh@ti.com> --- arch/arm/cpu/armv7/omap-common/spl.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-)