On Wednesday, December 14, 2011 06:24:13 PM Steve Sakoman wrote: > > I think you will also need to update the get_board_revision function > to ensure that SPL works with very early Overo revisions. > > Note this excerpt from the X-loader get_board_revision funtion: > > /* board revisions <= R2410 connect 4030 irq_1 to gpio112 */ > /* these boards should return a revision number of 0 */ > /* the code below forces a 4030 RTC irq to ensure that gpio112 is low */ > #ifdef CONFIG_DRIVER_OMAP34XX_I2C > i2c_init(CFG_I2C_SPEED, CFG_I2C_SLAVE); > data = 0x01; > i2c_write(0x4B, 0x29, 1, &data, 1); > data = 0x0c; > i2c_write(0x4B, 0x2b, 1, &data, 1); > i2c_read(0x4B, 0x2a, 1, &data, 1); > #endif > > Yup, ugly, but this is the only way to detect revision properly on those > boards. I tried the following (as you can see I already commented out the i2c-read-write for test):
int get_board_revision(void) { #ifdef CONFIG_DRIVER_OMAP34XX_I2C i2c_set_bus_num(TWL4030_I2C_BUS); /*data = 0x01; i2c_write(0x4B, 0x29, 1, &data, 1); data = 0x0c; i2c_write(0x4B, 0x2b, 1, &data, 1); i2c_read(0x4B, 0x2a, 1, &data, 1);*/ #endif .... } SPL Boot process hangs on i2c_set_bus_num ( tested by removing i2c_set_bus_num - > proper operation ) with console freeze: | U-Boot SPL 2011.12-rc1-00004-g06e42c6-dirty (Dec 15 2011 - 14:03:34) | Texas Instruments Revision detection unimplemented The call stack for get_board_revision() is for SPL s_init() mem_init() do_sdrc_init(..) get_board_mem_timings(..) get_board_revision(..) It seems that the call to i2c_set_bus_num comes too early. Before I dive into x- loader analysis: Has anybody an idea what goes wrong? Andreas _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot