@@ -60,22 +60,26 @@ int board_init(void)
writel(0x02100551, NOMADIK_FSMC_BASE + 0x04); /* FSMC_BTR0 */
icache_enable();
- return 0;
-}
-int board_late_init(void)
-{
+ /*
+ * Configure I2C pins, as we will use I2C in a later commit
+ */
+
/* Set the two I2C gpio lines to be gpio high */
nmk_gpio_set(__SCL, 1); nmk_gpio_set(__SDA, 1);
nmk_gpio_dir(__SCL, 1); nmk_gpio_dir(__SDA, 1);
nmk_gpio_af(__SCL, GPIO_GPIO); nmk_gpio_af(__SDA, GPIO_GPIO);
- /* Reset the I2C port expander, on GPIO77 */
- nmk_gpio_af(77, GPIO_GPIO);
- nmk_gpio_dir(77, 1);
- nmk_gpio_set(77, 0);
- udelay(10);
- nmk_gpio_set(77, 1);
+ /* Put the two I2C port expanders out of reset, on GPIO77 and 79 */
+ {
+ int n[2]={77, 79};
+ int i;
+ for (i = 0; i < ARRAY_SIZE(n); i++) {
+ nmk_gpio_af(n[i], GPIO_GPIO);
+ nmk_gpio_dir(n[i], 1);
+ nmk_gpio_set(n[i], 1);
+ }
+ }
return 0;
}
@@ -101,3 +105,10 @@ int board_eth_init(bd_t *bis)
return rc;
}
#endif
+
+/* Initialization callback, from lib_arm/board.c */
+int board_late_init(void)
+{
+ return 0;
+}
+