On 08:32-20130712, Robert Nelson wrote: > On Thu, Jul 11, 2013 at 11:06 PM, Nishanth Menon <n...@ti.com> wrote: > > ok, here is how the code looks like with the V2 of my series: > > > > Do we just default to none for XM_AB for dvi_pup? > > > > static void beagle_dvi_pup(void) > > { > > uchar val; > > > > switch (get_board_revision()) { > > case REVISION_AXBX: > > case REVISION_CX: > > case REVISION_C4: > > case REVISION_XM_AB: > > gpio_request(170, ""); > > gpio_direction_output(170, 0); > > gpio_set_value(170, 1); > > break; > > case REVISION_XM_C: > > default: > > #define GPIODATADIR1 (TWL4030_BASEADD_GPIO+3) > > #define GPIODATAOUT1 (TWL4030_BASEADD_GPIO+6) > > > > i2c_read(TWL4030_CHIP_GPIO, GPIODATADIR1, 1, &val, 1); > > val |= 4; > > i2c_write(TWL4030_CHIP_GPIO, GPIODATADIR1, 1, &val, 1); > > > > i2c_read(TWL4030_CHIP_GPIO, GPIODATAOUT1, 1, &val, 1); > > val |= 4; > > i2c_write(TWL4030_CHIP_GPIO, GPIODATAOUT1, 1, &val, 1); > > break; > > } > > } > > I'd do it like this, as... > > On the xMA, xMA1, & xMA2: TPS_GPIO2 is not connected to anything... > xMA3->xMC: TPS_GPIO2 is connected to dvi_pup > > static void beagle_dvi_pup(void) > { > uchar val; > > switch (get_board_revision()) { > case REVISION_AXBX: > case REVISION_CX: > case REVISION_C4: > gpio_request(170, ""); > gpio_direction_output(170, 0); > gpio_set_value(170, 1); > break; > case REVISION_XM_AB: > case REVISION_XM_C: > default: > #define GPIODATADIR1 (TWL4030_BASEADD_GPIO+3) > #define GPIODATAOUT1 (TWL4030_BASEADD_GPIO+6) > > i2c_read(TWL4030_CHIP_GPIO, GPIODATADIR1, 1, &val, 1); > val |= 4; > i2c_write(TWL4030_CHIP_GPIO, GPIODATADIR1, 1, &val, 1); > > i2c_read(TWL4030_CHIP_GPIO, GPIODATAOUT1, 1, &val, 1); > val |= 4; > i2c_write(TWL4030_CHIP_GPIO, GPIODATAOUT1, 1, &val, 1); > break; > } > } Thanks for the review. sounds good. I will update http://patchwork.ozlabs.org/patch/258634/ accordingly for a rev3.
Will wait till Monday before posting a new series to accommodate any further comments. -- Regards, Nishanth Menon _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot