]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/avr32/boards/atstk1000/atstk1002.c
avr32: Fix GPIO initcall breakage
[linux-2.6-omap-h63xx.git] / arch / avr32 / boards / atstk1000 / atstk1002.c
index dfc3443e23aa3df4cb0033c579a5f7a3d4679623..5c5cdf3b464fb8d99394e408ed49b700babc1ec4 100644 (file)
@@ -232,7 +232,7 @@ static void __init atstk1002_setup_extdac(void)
                goto err_set_clk;
        }
 
-       at32_select_periph(GPIO_PIN_PA(30), GPIO_PERIPH_A, 0);
+       at32_select_periph(GPIO_PIOA_BASE, (1 << 30), GPIO_PERIPH_A, 0);
        at73c213_data.dac_clk = gclk;
 
 err_set_clk:
@@ -264,16 +264,20 @@ void __init setup_board(void)
 
 #ifndef CONFIG_BOARD_ATSTK100X_SW2_CUSTOM
 
+static struct mci_platform_data __initdata mci0_data = {
+       .slot[0] = {
+               .bus_width      = 4,
+
 /* MMC card detect requires MACB0 *NOT* be used */
 #ifdef CONFIG_BOARD_ATSTK1002_SW6_CUSTOM
-static struct mci_platform_data __initdata mci0_data = {
-       .detect_pin     = GPIO_PIN_PC(14),      /* gpio30/sdcd */
-       .wp_pin         = GPIO_PIN_PC(15),      /* gpio31/sdwp */
-};
-#define MCI_PDATA      &mci0_data
+               .detect_pin     = GPIO_PIN_PC(14), /* gpio30/sdcd */
+               .wp_pin         = GPIO_PIN_PC(15), /* gpio31/sdwp */
 #else
-#define MCI_PDATA      NULL
+               .detect_pin     = -ENODEV,
+               .wp_pin         = -ENODEV,
 #endif /* SW6 for sd{cd,wp} routing */
+       },
+};
 
 #endif /* SW2 for MMC signal routing */
 
@@ -301,8 +305,6 @@ static int __init atstk1002_init(void)
        at32_reserve_pin(GPIO_PIN_PE(15));      /* DATA[31]     */
        at32_reserve_pin(GPIO_PIN_PE(26));      /* SDCS         */
 
-       at32_add_system_devices();
-
 #ifdef CONFIG_BOARD_ATSTK1006
        smc_set_timing(&nand_config, &nand_timing);
        smc_set_configuration(3, &nand_config);
@@ -326,13 +328,14 @@ static int __init atstk1002_init(void)
        at32_add_device_spi(1, spi1_board_info, ARRAY_SIZE(spi1_board_info));
 #endif
 #ifndef CONFIG_BOARD_ATSTK100X_SW2_CUSTOM
-       at32_add_device_mci(0, MCI_PDATA);
+       at32_add_device_mci(0, &mci0_data);
 #endif
 #ifdef CONFIG_BOARD_ATSTK1002_SW5_CUSTOM
        set_hw_addr(at32_add_device_eth(1, &eth_data[1]));
 #else
        at32_add_device_lcdc(0, &atstk1000_lcdc_data,
-                            fbmem_start, fbmem_size, 0);
+                            fbmem_start, fbmem_size,
+                            ATMEL_LCDC_PRI_24BIT | ATMEL_LCDC_PRI_CONTROL);
 #endif
        at32_add_device_usba(0, NULL);
 #ifndef CONFIG_BOARD_ATSTK100X_SW3_CUSTOM