Loading arch/avr32/boards/atngw100/setup.c +5 −2 Original line number Diff line number Diff line Loading @@ -53,8 +53,11 @@ static struct spi_board_info spi0_board_info[] __initdata = { }; static struct mci_platform_data __initdata mci0_data = { .slot[0] = { .bus_width = 4, .detect_pin = GPIO_PIN_PC(25), .wp_pin = GPIO_PIN_PE(0), }, }; /* Loading arch/avr32/boards/atstk1000/atstk1002.c +11 −7 Original line number Diff line number Diff line Loading @@ -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 #else #define MCI_PDATA NULL .detect_pin = -ENODEV, .wp_pin = -ENODEV, #endif /* SW6 for sd{cd,wp} routing */ }, }; #endif /* SW2 for MMC signal routing */ Loading Loading @@ -326,7 +330,7 @@ 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_pdata); #endif #ifdef CONFIG_BOARD_ATSTK1002_SW5_CUSTOM set_hw_addr(at32_add_device_eth(1, ð_data[1])); Loading arch/avr32/boards/atstk1000/atstk1003.c +11 −1 Original line number Diff line number Diff line Loading @@ -66,6 +66,16 @@ static struct spi_board_info spi1_board_info[] __initdata = { { } }; #endif #ifndef CONFIG_BOARD_ATSTK100X_SW2_CUSTOM static struct mci_platform_data __initdata mci0_data = { .slot[0] = { .bus_width = 4, .detect_pin = -ENODEV, .wp_pin = -ENODEV, }, }; #endif #ifdef CONFIG_BOARD_ATSTK1000_EXTDAC static void __init atstk1003_setup_extdac(void) { Loading Loading @@ -154,7 +164,7 @@ static int __init atstk1003_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, NULL); at32_add_device_mci(0, &mci0_data); #endif at32_add_device_usba(0, NULL); #ifndef CONFIG_BOARD_ATSTK100X_SW3_CUSTOM Loading arch/avr32/boards/atstk1000/atstk1004.c +11 −1 Original line number Diff line number Diff line Loading @@ -71,6 +71,16 @@ static struct spi_board_info spi1_board_info[] __initdata = { { } }; #endif #ifndef CONFIG_BOARD_ATSTK100X_SW2_CUSTOM static struct mci_platform_data __initdata mci0_data = { .slot[0] = { .bus_width = 4, .detect_pin = -ENODEV, .wp_pin = -ENODEV, }, }; #endif #ifdef CONFIG_BOARD_ATSTK1000_EXTDAC static void __init atstk1004_setup_extdac(void) { Loading Loading @@ -137,7 +147,7 @@ static int __init atstk1004_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, NULL); at32_add_device_mci(0, &mci0_data); #endif at32_add_device_lcdc(0, &atstk1000_lcdc_data, fbmem_start, fbmem_size, 0); Loading arch/avr32/include/asm/atmel-mci.h +31 −1 Original line number Diff line number Diff line #ifndef __ASM_AVR32_ATMEL_MCI_H #define __ASM_AVR32_ATMEL_MCI_H struct mci_platform_data { #define ATMEL_MCI_MAX_NR_SLOTS 2 struct dma_slave; /** * struct mci_slot_pdata - board-specific per-slot configuration * @bus_width: Number of data lines wired up the slot * @detect_pin: GPIO pin wired to the card detect switch * @wp_pin: GPIO pin wired to the write protect sensor * * If a given slot is not present on the board, @bus_width should be * set to 0. The other fields are ignored in this case. * * Any pins that aren't available should be set to a negative value. * * Note that support for multiple slots is experimental -- some cards * might get upset if we don't get the clock management exactly right. * But in most cases, it should work just fine. */ struct mci_slot_pdata { unsigned int bus_width; int detect_pin; int wp_pin; }; /** * struct mci_platform_data - board-specific MMC/SDcard configuration * @dma_slave: DMA slave interface to use in data transfers, or NULL. * @slot: Per-slot configuration data. */ struct mci_platform_data { struct dma_slave *dma_slave; struct mci_slot_pdata slot[ATMEL_MCI_MAX_NR_SLOTS]; }; #endif /* __ASM_AVR32_ATMEL_MCI_H */ Loading
arch/avr32/boards/atngw100/setup.c +5 −2 Original line number Diff line number Diff line Loading @@ -53,8 +53,11 @@ static struct spi_board_info spi0_board_info[] __initdata = { }; static struct mci_platform_data __initdata mci0_data = { .slot[0] = { .bus_width = 4, .detect_pin = GPIO_PIN_PC(25), .wp_pin = GPIO_PIN_PE(0), }, }; /* Loading
arch/avr32/boards/atstk1000/atstk1002.c +11 −7 Original line number Diff line number Diff line Loading @@ -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 #else #define MCI_PDATA NULL .detect_pin = -ENODEV, .wp_pin = -ENODEV, #endif /* SW6 for sd{cd,wp} routing */ }, }; #endif /* SW2 for MMC signal routing */ Loading Loading @@ -326,7 +330,7 @@ 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_pdata); #endif #ifdef CONFIG_BOARD_ATSTK1002_SW5_CUSTOM set_hw_addr(at32_add_device_eth(1, ð_data[1])); Loading
arch/avr32/boards/atstk1000/atstk1003.c +11 −1 Original line number Diff line number Diff line Loading @@ -66,6 +66,16 @@ static struct spi_board_info spi1_board_info[] __initdata = { { } }; #endif #ifndef CONFIG_BOARD_ATSTK100X_SW2_CUSTOM static struct mci_platform_data __initdata mci0_data = { .slot[0] = { .bus_width = 4, .detect_pin = -ENODEV, .wp_pin = -ENODEV, }, }; #endif #ifdef CONFIG_BOARD_ATSTK1000_EXTDAC static void __init atstk1003_setup_extdac(void) { Loading Loading @@ -154,7 +164,7 @@ static int __init atstk1003_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, NULL); at32_add_device_mci(0, &mci0_data); #endif at32_add_device_usba(0, NULL); #ifndef CONFIG_BOARD_ATSTK100X_SW3_CUSTOM Loading
arch/avr32/boards/atstk1000/atstk1004.c +11 −1 Original line number Diff line number Diff line Loading @@ -71,6 +71,16 @@ static struct spi_board_info spi1_board_info[] __initdata = { { } }; #endif #ifndef CONFIG_BOARD_ATSTK100X_SW2_CUSTOM static struct mci_platform_data __initdata mci0_data = { .slot[0] = { .bus_width = 4, .detect_pin = -ENODEV, .wp_pin = -ENODEV, }, }; #endif #ifdef CONFIG_BOARD_ATSTK1000_EXTDAC static void __init atstk1004_setup_extdac(void) { Loading Loading @@ -137,7 +147,7 @@ static int __init atstk1004_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, NULL); at32_add_device_mci(0, &mci0_data); #endif at32_add_device_lcdc(0, &atstk1000_lcdc_data, fbmem_start, fbmem_size, 0); Loading
arch/avr32/include/asm/atmel-mci.h +31 −1 Original line number Diff line number Diff line #ifndef __ASM_AVR32_ATMEL_MCI_H #define __ASM_AVR32_ATMEL_MCI_H struct mci_platform_data { #define ATMEL_MCI_MAX_NR_SLOTS 2 struct dma_slave; /** * struct mci_slot_pdata - board-specific per-slot configuration * @bus_width: Number of data lines wired up the slot * @detect_pin: GPIO pin wired to the card detect switch * @wp_pin: GPIO pin wired to the write protect sensor * * If a given slot is not present on the board, @bus_width should be * set to 0. The other fields are ignored in this case. * * Any pins that aren't available should be set to a negative value. * * Note that support for multiple slots is experimental -- some cards * might get upset if we don't get the clock management exactly right. * But in most cases, it should work just fine. */ struct mci_slot_pdata { unsigned int bus_width; int detect_pin; int wp_pin; }; /** * struct mci_platform_data - board-specific MMC/SDcard configuration * @dma_slave: DMA slave interface to use in data transfers, or NULL. * @slot: Per-slot configuration data. */ struct mci_platform_data { struct dma_slave *dma_slave; struct mci_slot_pdata slot[ATMEL_MCI_MAX_NR_SLOTS]; }; #endif /* __ASM_AVR32_ATMEL_MCI_H */