mirror of
https://github.com/rd-stuffs/msm-4.14.git
synced 2025-02-20 11:45:48 +08:00
ARM: at91: add atmel-mci support for chips and boards which can use it
Since atmel-mci driver supports all atmel mci versions, use it instead of the deprecated at91_mci driver. Platform data and all related configuration are removed. Signed-off-by: Ludovic Desroches <ludovic.desroches@atmel.com> [nicolas.ferre@atmel.com: remove at91_mci platform data] Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
This commit is contained in:
parent
24f5c4b6e6
commit
4cf3326ab5
@ -294,9 +294,9 @@ void __init at91_add_device_cf(struct at91_cf_data *data) {}
|
|||||||
* MMC / SD
|
* MMC / SD
|
||||||
* -------------------------------------------------------------------- */
|
* -------------------------------------------------------------------- */
|
||||||
|
|
||||||
#if defined(CONFIG_MMC_AT91) || defined(CONFIG_MMC_AT91_MODULE)
|
#if IS_ENABLED(CONFIG_MMC_ATMELMCI)
|
||||||
static u64 mmc_dmamask = DMA_BIT_MASK(32);
|
static u64 mmc_dmamask = DMA_BIT_MASK(32);
|
||||||
static struct at91_mmc_data mmc_data;
|
static struct mci_platform_data mmc_data;
|
||||||
|
|
||||||
static struct resource mmc_resources[] = {
|
static struct resource mmc_resources[] = {
|
||||||
[0] = {
|
[0] = {
|
||||||
@ -312,7 +312,7 @@ static struct resource mmc_resources[] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
static struct platform_device at91rm9200_mmc_device = {
|
static struct platform_device at91rm9200_mmc_device = {
|
||||||
.name = "at91_mci",
|
.name = "atmel_mci",
|
||||||
.id = -1,
|
.id = -1,
|
||||||
.dev = {
|
.dev = {
|
||||||
.dma_mask = &mmc_dmamask,
|
.dma_mask = &mmc_dmamask,
|
||||||
@ -323,53 +323,69 @@ static struct platform_device at91rm9200_mmc_device = {
|
|||||||
.num_resources = ARRAY_SIZE(mmc_resources),
|
.num_resources = ARRAY_SIZE(mmc_resources),
|
||||||
};
|
};
|
||||||
|
|
||||||
void __init at91_add_device_mmc(short mmc_id, struct at91_mmc_data *data)
|
void __init at91_add_device_mci(short mmc_id, struct mci_platform_data *data)
|
||||||
{
|
{
|
||||||
|
unsigned int i;
|
||||||
|
unsigned int slot_count = 0;
|
||||||
|
|
||||||
if (!data)
|
if (!data)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/* input/irq */
|
for (i = 0; i < ATMCI_MAX_NR_SLOTS; i++) {
|
||||||
if (gpio_is_valid(data->det_pin)) {
|
|
||||||
at91_set_gpio_input(data->det_pin, 1);
|
|
||||||
at91_set_deglitch(data->det_pin, 1);
|
|
||||||
}
|
|
||||||
if (gpio_is_valid(data->wp_pin))
|
|
||||||
at91_set_gpio_input(data->wp_pin, 1);
|
|
||||||
if (gpio_is_valid(data->vcc_pin))
|
|
||||||
at91_set_gpio_output(data->vcc_pin, 0);
|
|
||||||
|
|
||||||
/* CLK */
|
if (!data->slot[i].bus_width)
|
||||||
at91_set_A_periph(AT91_PIN_PA27, 0);
|
continue;
|
||||||
|
|
||||||
if (data->slot_b) {
|
/* input/irq */
|
||||||
/* CMD */
|
if (gpio_is_valid(data->slot[i].detect_pin)) {
|
||||||
at91_set_B_periph(AT91_PIN_PA8, 1);
|
at91_set_gpio_input(data->slot[i].detect_pin, 1);
|
||||||
|
at91_set_deglitch(data->slot[i].detect_pin, 1);
|
||||||
/* DAT0, maybe DAT1..DAT3 */
|
|
||||||
at91_set_B_periph(AT91_PIN_PA9, 1);
|
|
||||||
if (data->wire4) {
|
|
||||||
at91_set_B_periph(AT91_PIN_PA10, 1);
|
|
||||||
at91_set_B_periph(AT91_PIN_PA11, 1);
|
|
||||||
at91_set_B_periph(AT91_PIN_PA12, 1);
|
|
||||||
}
|
}
|
||||||
} else {
|
if (gpio_is_valid(data->slot[i].wp_pin))
|
||||||
/* CMD */
|
at91_set_gpio_input(data->slot[i].wp_pin, 1);
|
||||||
at91_set_A_periph(AT91_PIN_PA28, 1);
|
|
||||||
|
|
||||||
/* DAT0, maybe DAT1..DAT3 */
|
switch (i) {
|
||||||
at91_set_A_periph(AT91_PIN_PA29, 1);
|
case 0: /* slot A */
|
||||||
if (data->wire4) {
|
/* CMD */
|
||||||
at91_set_B_periph(AT91_PIN_PB3, 1);
|
at91_set_A_periph(AT91_PIN_PA28, 1);
|
||||||
at91_set_B_periph(AT91_PIN_PB4, 1);
|
/* DAT0, maybe DAT1..DAT3 */
|
||||||
at91_set_B_periph(AT91_PIN_PB5, 1);
|
at91_set_A_periph(AT91_PIN_PA29, 1);
|
||||||
|
if (data->slot[i].bus_width == 4) {
|
||||||
|
at91_set_B_periph(AT91_PIN_PB3, 1);
|
||||||
|
at91_set_B_periph(AT91_PIN_PB4, 1);
|
||||||
|
at91_set_B_periph(AT91_PIN_PB5, 1);
|
||||||
|
}
|
||||||
|
slot_count++;
|
||||||
|
break;
|
||||||
|
case 1: /* slot B */
|
||||||
|
/* CMD */
|
||||||
|
at91_set_B_periph(AT91_PIN_PA8, 1);
|
||||||
|
/* DAT0, maybe DAT1..DAT3 */
|
||||||
|
at91_set_B_periph(AT91_PIN_PA9, 1);
|
||||||
|
if (data->slot[i].bus_width == 4) {
|
||||||
|
at91_set_B_periph(AT91_PIN_PA10, 1);
|
||||||
|
at91_set_B_periph(AT91_PIN_PA11, 1);
|
||||||
|
at91_set_B_periph(AT91_PIN_PA12, 1);
|
||||||
|
}
|
||||||
|
slot_count++;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
printk(KERN_ERR
|
||||||
|
"AT91: SD/MMC slot %d not available\n", i);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if (slot_count) {
|
||||||
|
/* CLK */
|
||||||
|
at91_set_A_periph(AT91_PIN_PA27, 0);
|
||||||
|
|
||||||
|
mmc_data = *data;
|
||||||
|
platform_device_register(&at91rm9200_mmc_device);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
mmc_data = *data;
|
|
||||||
platform_device_register(&at91rm9200_mmc_device);
|
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
void __init at91_add_device_mmc(short mmc_id, struct at91_mmc_data *data) {}
|
void __init at91_add_device_mci(short mmc_id, struct mci_platform_data *data) {}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
@ -208,93 +208,11 @@ void __init at91_add_device_eth(struct macb_platform_data *data) {}
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/* --------------------------------------------------------------------
|
|
||||||
* MMC / SD
|
|
||||||
* -------------------------------------------------------------------- */
|
|
||||||
|
|
||||||
#if defined(CONFIG_MMC_AT91) || defined(CONFIG_MMC_AT91_MODULE)
|
|
||||||
static u64 mmc_dmamask = DMA_BIT_MASK(32);
|
|
||||||
static struct at91_mmc_data mmc_data;
|
|
||||||
|
|
||||||
static struct resource mmc_resources[] = {
|
|
||||||
[0] = {
|
|
||||||
.start = AT91SAM9260_BASE_MCI,
|
|
||||||
.end = AT91SAM9260_BASE_MCI + SZ_16K - 1,
|
|
||||||
.flags = IORESOURCE_MEM,
|
|
||||||
},
|
|
||||||
[1] = {
|
|
||||||
.start = AT91SAM9260_ID_MCI,
|
|
||||||
.end = AT91SAM9260_ID_MCI,
|
|
||||||
.flags = IORESOURCE_IRQ,
|
|
||||||
},
|
|
||||||
};
|
|
||||||
|
|
||||||
static struct platform_device at91sam9260_mmc_device = {
|
|
||||||
.name = "at91_mci",
|
|
||||||
.id = -1,
|
|
||||||
.dev = {
|
|
||||||
.dma_mask = &mmc_dmamask,
|
|
||||||
.coherent_dma_mask = DMA_BIT_MASK(32),
|
|
||||||
.platform_data = &mmc_data,
|
|
||||||
},
|
|
||||||
.resource = mmc_resources,
|
|
||||||
.num_resources = ARRAY_SIZE(mmc_resources),
|
|
||||||
};
|
|
||||||
|
|
||||||
void __init at91_add_device_mmc(short mmc_id, struct at91_mmc_data *data)
|
|
||||||
{
|
|
||||||
if (!data)
|
|
||||||
return;
|
|
||||||
|
|
||||||
/* input/irq */
|
|
||||||
if (gpio_is_valid(data->det_pin)) {
|
|
||||||
at91_set_gpio_input(data->det_pin, 1);
|
|
||||||
at91_set_deglitch(data->det_pin, 1);
|
|
||||||
}
|
|
||||||
if (gpio_is_valid(data->wp_pin))
|
|
||||||
at91_set_gpio_input(data->wp_pin, 1);
|
|
||||||
if (gpio_is_valid(data->vcc_pin))
|
|
||||||
at91_set_gpio_output(data->vcc_pin, 0);
|
|
||||||
|
|
||||||
/* CLK */
|
|
||||||
at91_set_A_periph(AT91_PIN_PA8, 0);
|
|
||||||
|
|
||||||
if (data->slot_b) {
|
|
||||||
/* CMD */
|
|
||||||
at91_set_B_periph(AT91_PIN_PA1, 1);
|
|
||||||
|
|
||||||
/* DAT0, maybe DAT1..DAT3 */
|
|
||||||
at91_set_B_periph(AT91_PIN_PA0, 1);
|
|
||||||
if (data->wire4) {
|
|
||||||
at91_set_B_periph(AT91_PIN_PA5, 1);
|
|
||||||
at91_set_B_periph(AT91_PIN_PA4, 1);
|
|
||||||
at91_set_B_periph(AT91_PIN_PA3, 1);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
/* CMD */
|
|
||||||
at91_set_A_periph(AT91_PIN_PA7, 1);
|
|
||||||
|
|
||||||
/* DAT0, maybe DAT1..DAT3 */
|
|
||||||
at91_set_A_periph(AT91_PIN_PA6, 1);
|
|
||||||
if (data->wire4) {
|
|
||||||
at91_set_A_periph(AT91_PIN_PA9, 1);
|
|
||||||
at91_set_A_periph(AT91_PIN_PA10, 1);
|
|
||||||
at91_set_A_periph(AT91_PIN_PA11, 1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
mmc_data = *data;
|
|
||||||
platform_device_register(&at91sam9260_mmc_device);
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
void __init at91_add_device_mmc(short mmc_id, struct at91_mmc_data *data) {}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* --------------------------------------------------------------------
|
/* --------------------------------------------------------------------
|
||||||
* MMC / SD Slot for Atmel MCI Driver
|
* MMC / SD Slot for Atmel MCI Driver
|
||||||
* -------------------------------------------------------------------- */
|
* -------------------------------------------------------------------- */
|
||||||
|
|
||||||
#if defined(CONFIG_MMC_ATMELMCI) || defined(CONFIG_MMC_ATMELMCI_MODULE)
|
#if IS_ENABLED(CONFIG_MMC_ATMELMCI)
|
||||||
static u64 mmc_dmamask = DMA_BIT_MASK(32);
|
static u64 mmc_dmamask = DMA_BIT_MASK(32);
|
||||||
static struct mci_platform_data mmc_data;
|
static struct mci_platform_data mmc_data;
|
||||||
|
|
||||||
|
@ -137,9 +137,9 @@ void __init at91_add_device_udc(struct at91_udc_data *data) {}
|
|||||||
* MMC / SD
|
* MMC / SD
|
||||||
* -------------------------------------------------------------------- */
|
* -------------------------------------------------------------------- */
|
||||||
|
|
||||||
#if defined(CONFIG_MMC_AT91) || defined(CONFIG_MMC_AT91_MODULE)
|
#if IS_ENABLED(CONFIG_MMC_ATMELMCI)
|
||||||
static u64 mmc_dmamask = DMA_BIT_MASK(32);
|
static u64 mmc_dmamask = DMA_BIT_MASK(32);
|
||||||
static struct at91_mmc_data mmc_data;
|
static struct mci_platform_data mmc_data;
|
||||||
|
|
||||||
static struct resource mmc_resources[] = {
|
static struct resource mmc_resources[] = {
|
||||||
[0] = {
|
[0] = {
|
||||||
@ -155,7 +155,7 @@ static struct resource mmc_resources[] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
static struct platform_device at91sam9261_mmc_device = {
|
static struct platform_device at91sam9261_mmc_device = {
|
||||||
.name = "at91_mci",
|
.name = "atmel_mci",
|
||||||
.id = -1,
|
.id = -1,
|
||||||
.dev = {
|
.dev = {
|
||||||
.dma_mask = &mmc_dmamask,
|
.dma_mask = &mmc_dmamask,
|
||||||
@ -166,40 +166,40 @@ static struct platform_device at91sam9261_mmc_device = {
|
|||||||
.num_resources = ARRAY_SIZE(mmc_resources),
|
.num_resources = ARRAY_SIZE(mmc_resources),
|
||||||
};
|
};
|
||||||
|
|
||||||
void __init at91_add_device_mmc(short mmc_id, struct at91_mmc_data *data)
|
void __init at91_add_device_mci(short mmc_id, struct mci_platform_data *data)
|
||||||
{
|
{
|
||||||
if (!data)
|
if (!data)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/* input/irq */
|
if (data->slot[0].bus_width) {
|
||||||
if (gpio_is_valid(data->det_pin)) {
|
/* input/irq */
|
||||||
at91_set_gpio_input(data->det_pin, 1);
|
if (gpio_is_valid(data->slot[0].detect_pin)) {
|
||||||
at91_set_deglitch(data->det_pin, 1);
|
at91_set_gpio_input(data->slot[0].detect_pin, 1);
|
||||||
|
at91_set_deglitch(data->slot[0].detect_pin, 1);
|
||||||
|
}
|
||||||
|
if (gpio_is_valid(data->slot[0].wp_pin))
|
||||||
|
at91_set_gpio_input(data->slot[0].wp_pin, 1);
|
||||||
|
|
||||||
|
/* CLK */
|
||||||
|
at91_set_B_periph(AT91_PIN_PA2, 0);
|
||||||
|
|
||||||
|
/* CMD */
|
||||||
|
at91_set_B_periph(AT91_PIN_PA1, 1);
|
||||||
|
|
||||||
|
/* DAT0, maybe DAT1..DAT3 */
|
||||||
|
at91_set_B_periph(AT91_PIN_PA0, 1);
|
||||||
|
if (data->slot[0].bus_width == 4) {
|
||||||
|
at91_set_B_periph(AT91_PIN_PA4, 1);
|
||||||
|
at91_set_B_periph(AT91_PIN_PA5, 1);
|
||||||
|
at91_set_B_periph(AT91_PIN_PA6, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
mmc_data = *data;
|
||||||
|
platform_device_register(&at91sam9261_mmc_device);
|
||||||
}
|
}
|
||||||
if (gpio_is_valid(data->wp_pin))
|
|
||||||
at91_set_gpio_input(data->wp_pin, 1);
|
|
||||||
if (gpio_is_valid(data->vcc_pin))
|
|
||||||
at91_set_gpio_output(data->vcc_pin, 0);
|
|
||||||
|
|
||||||
/* CLK */
|
|
||||||
at91_set_B_periph(AT91_PIN_PA2, 0);
|
|
||||||
|
|
||||||
/* CMD */
|
|
||||||
at91_set_B_periph(AT91_PIN_PA1, 1);
|
|
||||||
|
|
||||||
/* DAT0, maybe DAT1..DAT3 */
|
|
||||||
at91_set_B_periph(AT91_PIN_PA0, 1);
|
|
||||||
if (data->wire4) {
|
|
||||||
at91_set_B_periph(AT91_PIN_PA4, 1);
|
|
||||||
at91_set_B_periph(AT91_PIN_PA5, 1);
|
|
||||||
at91_set_B_periph(AT91_PIN_PA6, 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
mmc_data = *data;
|
|
||||||
platform_device_register(&at91sam9261_mmc_device);
|
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
void __init at91_add_device_mmc(short mmc_id, struct at91_mmc_data *data) {}
|
void __init at91_add_device_mci(short mmc_id, struct mci_platform_data *data) {}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
@ -187,8 +187,8 @@ static struct clk_lookup periph_clocks_lookups[] = {
|
|||||||
CLKDEV_CON_ID("hclk", &macb_clk),
|
CLKDEV_CON_ID("hclk", &macb_clk),
|
||||||
CLKDEV_CON_DEV_ID("pclk", "ssc.0", &ssc0_clk),
|
CLKDEV_CON_DEV_ID("pclk", "ssc.0", &ssc0_clk),
|
||||||
CLKDEV_CON_DEV_ID("pclk", "ssc.1", &ssc1_clk),
|
CLKDEV_CON_DEV_ID("pclk", "ssc.1", &ssc1_clk),
|
||||||
CLKDEV_CON_DEV_ID("mci_clk", "at91_mci.0", &mmc0_clk),
|
CLKDEV_CON_DEV_ID("mci_clk", "atmel_mci.0", &mmc0_clk),
|
||||||
CLKDEV_CON_DEV_ID("mci_clk", "at91_mci.1", &mmc1_clk),
|
CLKDEV_CON_DEV_ID("mci_clk", "atmel_mci.1", &mmc1_clk),
|
||||||
CLKDEV_CON_DEV_ID("spi_clk", "atmel_spi.0", &spi0_clk),
|
CLKDEV_CON_DEV_ID("spi_clk", "atmel_spi.0", &spi0_clk),
|
||||||
CLKDEV_CON_DEV_ID("spi_clk", "atmel_spi.1", &spi1_clk),
|
CLKDEV_CON_DEV_ID("spi_clk", "atmel_spi.1", &spi1_clk),
|
||||||
CLKDEV_CON_DEV_ID("t0_clk", "atmel_tcb.0", &tcb_clk),
|
CLKDEV_CON_DEV_ID("t0_clk", "atmel_tcb.0", &tcb_clk),
|
||||||
|
@ -218,9 +218,9 @@ void __init at91_add_device_eth(struct macb_platform_data *data) {}
|
|||||||
* MMC / SD
|
* MMC / SD
|
||||||
* -------------------------------------------------------------------- */
|
* -------------------------------------------------------------------- */
|
||||||
|
|
||||||
#if defined(CONFIG_MMC_AT91) || defined(CONFIG_MMC_AT91_MODULE)
|
#if IS_ENABLED(CONFIG_MMC_ATMELMCI)
|
||||||
static u64 mmc_dmamask = DMA_BIT_MASK(32);
|
static u64 mmc_dmamask = DMA_BIT_MASK(32);
|
||||||
static struct at91_mmc_data mmc0_data, mmc1_data;
|
static struct mci_platform_data mmc0_data, mmc1_data;
|
||||||
|
|
||||||
static struct resource mmc0_resources[] = {
|
static struct resource mmc0_resources[] = {
|
||||||
[0] = {
|
[0] = {
|
||||||
@ -236,7 +236,7 @@ static struct resource mmc0_resources[] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
static struct platform_device at91sam9263_mmc0_device = {
|
static struct platform_device at91sam9263_mmc0_device = {
|
||||||
.name = "at91_mci",
|
.name = "atmel_mci",
|
||||||
.id = 0,
|
.id = 0,
|
||||||
.dev = {
|
.dev = {
|
||||||
.dma_mask = &mmc_dmamask,
|
.dma_mask = &mmc_dmamask,
|
||||||
@ -261,7 +261,7 @@ static struct resource mmc1_resources[] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
static struct platform_device at91sam9263_mmc1_device = {
|
static struct platform_device at91sam9263_mmc1_device = {
|
||||||
.name = "at91_mci",
|
.name = "atmel_mci",
|
||||||
.id = 1,
|
.id = 1,
|
||||||
.dev = {
|
.dev = {
|
||||||
.dma_mask = &mmc_dmamask,
|
.dma_mask = &mmc_dmamask,
|
||||||
@ -272,85 +272,110 @@ static struct platform_device at91sam9263_mmc1_device = {
|
|||||||
.num_resources = ARRAY_SIZE(mmc1_resources),
|
.num_resources = ARRAY_SIZE(mmc1_resources),
|
||||||
};
|
};
|
||||||
|
|
||||||
void __init at91_add_device_mmc(short mmc_id, struct at91_mmc_data *data)
|
void __init at91_add_device_mci(short mmc_id, struct mci_platform_data *data)
|
||||||
{
|
{
|
||||||
|
unsigned int i;
|
||||||
|
unsigned int slot_count = 0;
|
||||||
|
|
||||||
if (!data)
|
if (!data)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/* input/irq */
|
for (i = 0; i < ATMCI_MAX_NR_SLOTS; i++) {
|
||||||
if (gpio_is_valid(data->det_pin)) {
|
|
||||||
at91_set_gpio_input(data->det_pin, 1);
|
|
||||||
at91_set_deglitch(data->det_pin, 1);
|
|
||||||
}
|
|
||||||
if (gpio_is_valid(data->wp_pin))
|
|
||||||
at91_set_gpio_input(data->wp_pin, 1);
|
|
||||||
if (gpio_is_valid(data->vcc_pin))
|
|
||||||
at91_set_gpio_output(data->vcc_pin, 0);
|
|
||||||
|
|
||||||
if (mmc_id == 0) { /* MCI0 */
|
if (!data->slot[i].bus_width)
|
||||||
/* CLK */
|
continue;
|
||||||
at91_set_A_periph(AT91_PIN_PA12, 0);
|
|
||||||
|
|
||||||
if (data->slot_b) {
|
/* input/irq */
|
||||||
/* CMD */
|
if (gpio_is_valid(data->slot[i].detect_pin)) {
|
||||||
at91_set_A_periph(AT91_PIN_PA16, 1);
|
at91_set_gpio_input(data->slot[i].detect_pin,
|
||||||
|
1);
|
||||||
|
at91_set_deglitch(data->slot[i].detect_pin,
|
||||||
|
1);
|
||||||
|
}
|
||||||
|
if (gpio_is_valid(data->slot[i].wp_pin))
|
||||||
|
at91_set_gpio_input(data->slot[i].wp_pin, 1);
|
||||||
|
|
||||||
/* DAT0, maybe DAT1..DAT3 */
|
if (mmc_id == 0) { /* MCI0 */
|
||||||
at91_set_A_periph(AT91_PIN_PA17, 1);
|
switch (i) {
|
||||||
if (data->wire4) {
|
case 0: /* slot A */
|
||||||
at91_set_A_periph(AT91_PIN_PA18, 1);
|
/* CMD */
|
||||||
at91_set_A_periph(AT91_PIN_PA19, 1);
|
at91_set_A_periph(AT91_PIN_PA1, 1);
|
||||||
at91_set_A_periph(AT91_PIN_PA20, 1);
|
/* DAT0, maybe DAT1..DAT3 */
|
||||||
|
at91_set_A_periph(AT91_PIN_PA0, 1);
|
||||||
|
if (data->slot[i].bus_width == 4) {
|
||||||
|
at91_set_A_periph(AT91_PIN_PA3, 1);
|
||||||
|
at91_set_A_periph(AT91_PIN_PA4, 1);
|
||||||
|
at91_set_A_periph(AT91_PIN_PA5, 1);
|
||||||
|
}
|
||||||
|
slot_count++;
|
||||||
|
break;
|
||||||
|
case 1: /* slot B */
|
||||||
|
/* CMD */
|
||||||
|
at91_set_A_periph(AT91_PIN_PA16, 1);
|
||||||
|
/* DAT0, maybe DAT1..DAT3 */
|
||||||
|
at91_set_A_periph(AT91_PIN_PA17, 1);
|
||||||
|
if (data->slot[i].bus_width == 4) {
|
||||||
|
at91_set_A_periph(AT91_PIN_PA18, 1);
|
||||||
|
at91_set_A_periph(AT91_PIN_PA19, 1);
|
||||||
|
at91_set_A_periph(AT91_PIN_PA20, 1);
|
||||||
|
}
|
||||||
|
slot_count++;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
printk(KERN_ERR
|
||||||
|
"AT91: SD/MMC slot %d not available\n", i);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
} else {
|
if (slot_count) {
|
||||||
/* CMD */
|
/* CLK */
|
||||||
at91_set_A_periph(AT91_PIN_PA1, 1);
|
at91_set_A_periph(AT91_PIN_PA12, 0);
|
||||||
|
|
||||||
/* DAT0, maybe DAT1..DAT3 */
|
mmc0_data = *data;
|
||||||
at91_set_A_periph(AT91_PIN_PA0, 1);
|
platform_device_register(&at91sam9263_mmc0_device);
|
||||||
if (data->wire4) {
|
}
|
||||||
at91_set_A_periph(AT91_PIN_PA3, 1);
|
} else if (mmc_id == 1) { /* MCI1 */
|
||||||
at91_set_A_periph(AT91_PIN_PA4, 1);
|
switch (i) {
|
||||||
at91_set_A_periph(AT91_PIN_PA5, 1);
|
case 0: /* slot A */
|
||||||
|
/* CMD */
|
||||||
|
at91_set_A_periph(AT91_PIN_PA7, 1);
|
||||||
|
/* DAT0, maybe DAT1..DAT3 */
|
||||||
|
at91_set_A_periph(AT91_PIN_PA8, 1);
|
||||||
|
if (data->slot[i].bus_width == 4) {
|
||||||
|
at91_set_A_periph(AT91_PIN_PA9, 1);
|
||||||
|
at91_set_A_periph(AT91_PIN_PA10, 1);
|
||||||
|
at91_set_A_periph(AT91_PIN_PA11, 1);
|
||||||
|
}
|
||||||
|
slot_count++;
|
||||||
|
break;
|
||||||
|
case 1: /* slot B */
|
||||||
|
/* CMD */
|
||||||
|
at91_set_A_periph(AT91_PIN_PA21, 1);
|
||||||
|
/* DAT0, maybe DAT1..DAT3 */
|
||||||
|
at91_set_A_periph(AT91_PIN_PA22, 1);
|
||||||
|
if (data->slot[i].bus_width == 4) {
|
||||||
|
at91_set_A_periph(AT91_PIN_PA23, 1);
|
||||||
|
at91_set_A_periph(AT91_PIN_PA24, 1);
|
||||||
|
at91_set_A_periph(AT91_PIN_PA25, 1);
|
||||||
|
}
|
||||||
|
slot_count++;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
printk(KERN_ERR
|
||||||
|
"AT91: SD/MMC slot %d not available\n", i);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if (slot_count) {
|
||||||
|
/* CLK */
|
||||||
|
at91_set_A_periph(AT91_PIN_PA6, 0);
|
||||||
|
|
||||||
|
mmc1_data = *data;
|
||||||
|
platform_device_register(&at91sam9263_mmc1_device);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
mmc0_data = *data;
|
|
||||||
platform_device_register(&at91sam9263_mmc0_device);
|
|
||||||
} else { /* MCI1 */
|
|
||||||
/* CLK */
|
|
||||||
at91_set_A_periph(AT91_PIN_PA6, 0);
|
|
||||||
|
|
||||||
if (data->slot_b) {
|
|
||||||
/* CMD */
|
|
||||||
at91_set_A_periph(AT91_PIN_PA21, 1);
|
|
||||||
|
|
||||||
/* DAT0, maybe DAT1..DAT3 */
|
|
||||||
at91_set_A_periph(AT91_PIN_PA22, 1);
|
|
||||||
if (data->wire4) {
|
|
||||||
at91_set_A_periph(AT91_PIN_PA23, 1);
|
|
||||||
at91_set_A_periph(AT91_PIN_PA24, 1);
|
|
||||||
at91_set_A_periph(AT91_PIN_PA25, 1);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
/* CMD */
|
|
||||||
at91_set_A_periph(AT91_PIN_PA7, 1);
|
|
||||||
|
|
||||||
/* DAT0, maybe DAT1..DAT3 */
|
|
||||||
at91_set_A_periph(AT91_PIN_PA8, 1);
|
|
||||||
if (data->wire4) {
|
|
||||||
at91_set_A_periph(AT91_PIN_PA9, 1);
|
|
||||||
at91_set_A_periph(AT91_PIN_PA10, 1);
|
|
||||||
at91_set_A_periph(AT91_PIN_PA11, 1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
mmc1_data = *data;
|
|
||||||
platform_device_register(&at91sam9263_mmc1_device);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
void __init at91_add_device_mmc(short mmc_id, struct at91_mmc_data *data) {}
|
void __init at91_add_device_mci(short mmc_id, struct mci_platform_data *data) {}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* --------------------------------------------------------------------
|
/* --------------------------------------------------------------------
|
||||||
|
@ -161,9 +161,9 @@ void __init at91_add_device_usba(struct usba_platform_data *data) {}
|
|||||||
* MMC / SD
|
* MMC / SD
|
||||||
* -------------------------------------------------------------------- */
|
* -------------------------------------------------------------------- */
|
||||||
|
|
||||||
#if defined(CONFIG_MMC_AT91) || defined(CONFIG_MMC_AT91_MODULE)
|
#if IS_ENABLED(CONFIG_MMC_ATMELMCI)
|
||||||
static u64 mmc_dmamask = DMA_BIT_MASK(32);
|
static u64 mmc_dmamask = DMA_BIT_MASK(32);
|
||||||
static struct at91_mmc_data mmc_data;
|
static struct mci_platform_data mmc_data;
|
||||||
|
|
||||||
static struct resource mmc_resources[] = {
|
static struct resource mmc_resources[] = {
|
||||||
[0] = {
|
[0] = {
|
||||||
@ -179,7 +179,7 @@ static struct resource mmc_resources[] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
static struct platform_device at91sam9rl_mmc_device = {
|
static struct platform_device at91sam9rl_mmc_device = {
|
||||||
.name = "at91_mci",
|
.name = "atmel_mci",
|
||||||
.id = -1,
|
.id = -1,
|
||||||
.dev = {
|
.dev = {
|
||||||
.dma_mask = &mmc_dmamask,
|
.dma_mask = &mmc_dmamask,
|
||||||
@ -190,40 +190,40 @@ static struct platform_device at91sam9rl_mmc_device = {
|
|||||||
.num_resources = ARRAY_SIZE(mmc_resources),
|
.num_resources = ARRAY_SIZE(mmc_resources),
|
||||||
};
|
};
|
||||||
|
|
||||||
void __init at91_add_device_mmc(short mmc_id, struct at91_mmc_data *data)
|
void __init at91_add_device_mci(short mmc_id, struct mci_platform_data *data)
|
||||||
{
|
{
|
||||||
if (!data)
|
if (!data)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/* input/irq */
|
if (data->slot[0].bus_width) {
|
||||||
if (gpio_is_valid(data->det_pin)) {
|
/* input/irq */
|
||||||
at91_set_gpio_input(data->det_pin, 1);
|
if (gpio_is_valid(data->slot[0].detect_pin)) {
|
||||||
at91_set_deglitch(data->det_pin, 1);
|
at91_set_gpio_input(data->slot[0].detect_pin, 1);
|
||||||
|
at91_set_deglitch(data->slot[0].detect_pin, 1);
|
||||||
|
}
|
||||||
|
if (gpio_is_valid(data->slot[0].wp_pin))
|
||||||
|
at91_set_gpio_input(data->slot[0].wp_pin, 1);
|
||||||
|
|
||||||
|
/* CLK */
|
||||||
|
at91_set_A_periph(AT91_PIN_PA2, 0);
|
||||||
|
|
||||||
|
/* CMD */
|
||||||
|
at91_set_A_periph(AT91_PIN_PA1, 1);
|
||||||
|
|
||||||
|
/* DAT0, maybe DAT1..DAT3 */
|
||||||
|
at91_set_A_periph(AT91_PIN_PA0, 1);
|
||||||
|
if (data->slot[0].bus_width == 4) {
|
||||||
|
at91_set_A_periph(AT91_PIN_PA3, 1);
|
||||||
|
at91_set_A_periph(AT91_PIN_PA4, 1);
|
||||||
|
at91_set_A_periph(AT91_PIN_PA5, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
mmc_data = *data;
|
||||||
|
platform_device_register(&at91sam9rl_mmc_device);
|
||||||
}
|
}
|
||||||
if (gpio_is_valid(data->wp_pin))
|
|
||||||
at91_set_gpio_input(data->wp_pin, 1);
|
|
||||||
if (gpio_is_valid(data->vcc_pin))
|
|
||||||
at91_set_gpio_output(data->vcc_pin, 0);
|
|
||||||
|
|
||||||
/* CLK */
|
|
||||||
at91_set_A_periph(AT91_PIN_PA2, 0);
|
|
||||||
|
|
||||||
/* CMD */
|
|
||||||
at91_set_A_periph(AT91_PIN_PA1, 1);
|
|
||||||
|
|
||||||
/* DAT0, maybe DAT1..DAT3 */
|
|
||||||
at91_set_A_periph(AT91_PIN_PA0, 1);
|
|
||||||
if (data->wire4) {
|
|
||||||
at91_set_A_periph(AT91_PIN_PA3, 1);
|
|
||||||
at91_set_A_periph(AT91_PIN_PA4, 1);
|
|
||||||
at91_set_A_periph(AT91_PIN_PA5, 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
mmc_data = *data;
|
|
||||||
platform_device_register(&at91sam9rl_mmc_device);
|
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
void __init at91_add_device_mmc(short mmc_id, struct at91_mmc_data *data) {}
|
void __init at91_add_device_mci(short mmc_id, struct mci_platform_data *data) {}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
@ -132,12 +132,12 @@ static struct atmel_nand_data __initdata afeb9260_nand_data = {
|
|||||||
/*
|
/*
|
||||||
* MCI (SD/MMC)
|
* MCI (SD/MMC)
|
||||||
*/
|
*/
|
||||||
static struct at91_mmc_data __initdata afeb9260_mmc_data = {
|
static struct mci_platform_data __initdata afeb9260_mci0_data = {
|
||||||
.det_pin = AT91_PIN_PC9,
|
.slot[1] = {
|
||||||
.wp_pin = AT91_PIN_PC4,
|
.bus_width = 4,
|
||||||
.slot_b = 1,
|
.detect_pin = AT91_PIN_PC9,
|
||||||
.wire4 = 1,
|
.wp_pin = AT91_PIN_PC4,
|
||||||
.vcc_pin = -EINVAL,
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -198,7 +198,7 @@ static void __init afeb9260_board_init(void)
|
|||||||
at91_set_B_periph(AT91_PIN_PA10, 0); /* ETX2 */
|
at91_set_B_periph(AT91_PIN_PA10, 0); /* ETX2 */
|
||||||
at91_set_B_periph(AT91_PIN_PA11, 0); /* ETX3 */
|
at91_set_B_periph(AT91_PIN_PA11, 0); /* ETX3 */
|
||||||
/* MMC */
|
/* MMC */
|
||||||
at91_add_device_mmc(0, &afeb9260_mmc_data);
|
at91_add_device_mci(0, &afeb9260_mci0_data);
|
||||||
/* I2C */
|
/* I2C */
|
||||||
at91_add_device_i2c(afeb9260_i2c_devices,
|
at91_add_device_i2c(afeb9260_i2c_devices,
|
||||||
ARRAY_SIZE(afeb9260_i2c_devices));
|
ARRAY_SIZE(afeb9260_i2c_devices));
|
||||||
|
@ -70,12 +70,12 @@ static struct at91_udc_data __initdata carmeva_udc_data = {
|
|||||||
// .vcc_pin = -EINVAL,
|
// .vcc_pin = -EINVAL,
|
||||||
// };
|
// };
|
||||||
|
|
||||||
static struct at91_mmc_data __initdata carmeva_mmc_data = {
|
static struct mci_platform_data __initdata carmeva_mci0_data = {
|
||||||
.slot_b = 0,
|
.slot[0] = {
|
||||||
.wire4 = 1,
|
.bus_width = 4,
|
||||||
.det_pin = AT91_PIN_PB10,
|
.detect_pin = AT91_PIN_PB10,
|
||||||
.wp_pin = AT91_PIN_PC14,
|
.wp_pin = AT91_PIN_PC14,
|
||||||
.vcc_pin = -EINVAL,
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct spi_board_info carmeva_spi_devices[] = {
|
static struct spi_board_info carmeva_spi_devices[] = {
|
||||||
@ -149,7 +149,7 @@ static void __init carmeva_board_init(void)
|
|||||||
/* Compact Flash */
|
/* Compact Flash */
|
||||||
// at91_add_device_cf(&carmeva_cf_data);
|
// at91_add_device_cf(&carmeva_cf_data);
|
||||||
/* MMC */
|
/* MMC */
|
||||||
at91_add_device_mmc(0, &carmeva_mmc_data);
|
at91_add_device_mci(0, &carmeva_mci0_data);
|
||||||
/* LEDs */
|
/* LEDs */
|
||||||
at91_gpio_leds(carmeva_leds, ARRAY_SIZE(carmeva_leds));
|
at91_gpio_leds(carmeva_leds, ARRAY_SIZE(carmeva_leds));
|
||||||
}
|
}
|
||||||
|
@ -310,12 +310,12 @@ static void __init cpu9krea_add_device_buttons(void)
|
|||||||
/*
|
/*
|
||||||
* MCI (SD/MMC)
|
* MCI (SD/MMC)
|
||||||
*/
|
*/
|
||||||
static struct at91_mmc_data __initdata cpu9krea_mmc_data = {
|
static struct mci_platform_data __initdata cpu9krea_mci0_data = {
|
||||||
.slot_b = 0,
|
.slot[0] = {
|
||||||
.wire4 = 1,
|
.bus_width = 4,
|
||||||
.det_pin = AT91_PIN_PA29,
|
.detect_pin = AT91_PIN_PA29,
|
||||||
.wp_pin = -EINVAL,
|
.wp_pin = -EINVAL,
|
||||||
.vcc_pin = -EINVAL,
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
static void __init cpu9krea_board_init(void)
|
static void __init cpu9krea_board_init(void)
|
||||||
@ -357,7 +357,7 @@ static void __init cpu9krea_board_init(void)
|
|||||||
/* Ethernet */
|
/* Ethernet */
|
||||||
at91_add_device_eth(&cpu9krea_macb_data);
|
at91_add_device_eth(&cpu9krea_macb_data);
|
||||||
/* MMC */
|
/* MMC */
|
||||||
at91_add_device_mmc(0, &cpu9krea_mmc_data);
|
at91_add_device_mci(0, &cpu9krea_mci0_data);
|
||||||
/* I2C */
|
/* I2C */
|
||||||
at91_add_device_i2c(cpu9krea_i2c_devices,
|
at91_add_device_i2c(cpu9krea_i2c_devices,
|
||||||
ARRAY_SIZE(cpu9krea_i2c_devices));
|
ARRAY_SIZE(cpu9krea_i2c_devices));
|
||||||
|
@ -77,11 +77,12 @@ static struct at91_udc_data __initdata cpuat91_udc_data = {
|
|||||||
.pullup_pin = AT91_PIN_PC14,
|
.pullup_pin = AT91_PIN_PC14,
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct at91_mmc_data __initdata cpuat91_mmc_data = {
|
static struct mci_platform_data __initdata cpuat91_mci0_data = {
|
||||||
.det_pin = AT91_PIN_PC2,
|
.slot[0] = {
|
||||||
.wire4 = 1,
|
.bus_width = 4,
|
||||||
.wp_pin = -EINVAL,
|
.detect_pin = AT91_PIN_PC2,
|
||||||
.vcc_pin = -EINVAL,
|
.wp_pin = -EINVAL,
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct physmap_flash_data cpuat91_flash_data = {
|
static struct physmap_flash_data cpuat91_flash_data = {
|
||||||
@ -167,7 +168,7 @@ static void __init cpuat91_board_init(void)
|
|||||||
/* USB Device */
|
/* USB Device */
|
||||||
at91_add_device_udc(&cpuat91_udc_data);
|
at91_add_device_udc(&cpuat91_udc_data);
|
||||||
/* MMC */
|
/* MMC */
|
||||||
at91_add_device_mmc(0, &cpuat91_mmc_data);
|
at91_add_device_mci(0, &cpuat91_mci0_data);
|
||||||
/* I2C */
|
/* I2C */
|
||||||
at91_add_device_i2c(NULL, 0);
|
at91_add_device_i2c(NULL, 0);
|
||||||
/* Platform devices */
|
/* Platform devices */
|
||||||
|
@ -86,12 +86,12 @@ static struct at91_cf_data __initdata csb337_cf_data = {
|
|||||||
.rst_pin = AT91_PIN_PD2,
|
.rst_pin = AT91_PIN_PD2,
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct at91_mmc_data __initdata csb337_mmc_data = {
|
static struct mci_platform_data __initdata csb337_mci0_data = {
|
||||||
.det_pin = AT91_PIN_PD5,
|
.slot[0] = {
|
||||||
.slot_b = 0,
|
.bus_width = 4,
|
||||||
.wire4 = 1,
|
.detect_pin = AT91_PIN_PD5,
|
||||||
.wp_pin = AT91_PIN_PD6,
|
.wp_pin = AT91_PIN_PD6,
|
||||||
.vcc_pin = -EINVAL,
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct spi_board_info csb337_spi_devices[] = {
|
static struct spi_board_info csb337_spi_devices[] = {
|
||||||
@ -239,7 +239,7 @@ static void __init csb337_board_init(void)
|
|||||||
/* SPI */
|
/* SPI */
|
||||||
at91_add_device_spi(csb337_spi_devices, ARRAY_SIZE(csb337_spi_devices));
|
at91_add_device_spi(csb337_spi_devices, ARRAY_SIZE(csb337_spi_devices));
|
||||||
/* MMC */
|
/* MMC */
|
||||||
at91_add_device_mmc(0, &csb337_mmc_data);
|
at91_add_device_mci(0, &csb337_mci0_data);
|
||||||
/* NOR flash */
|
/* NOR flash */
|
||||||
platform_device_register(&csb_flash);
|
platform_device_register(&csb_flash);
|
||||||
/* LEDs */
|
/* LEDs */
|
||||||
|
@ -69,12 +69,12 @@ static struct at91_cf_data __initdata eb9200_cf_data = {
|
|||||||
.rst_pin = AT91_PIN_PC5,
|
.rst_pin = AT91_PIN_PC5,
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct at91_mmc_data __initdata eb9200_mmc_data = {
|
static struct mci_platform_data __initdata eb9200_mci0_data = {
|
||||||
.slot_b = 0,
|
.slot[0] = {
|
||||||
.wire4 = 1,
|
.bus_width = 4,
|
||||||
.det_pin = -EINVAL,
|
.detect_pin = -EINVAL,
|
||||||
.wp_pin = -EINVAL,
|
.wp_pin = -EINVAL,
|
||||||
.vcc_pin = -EINVAL,
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct i2c_board_info __initdata eb9200_i2c_devices[] = {
|
static struct i2c_board_info __initdata eb9200_i2c_devices[] = {
|
||||||
@ -112,7 +112,7 @@ static void __init eb9200_board_init(void)
|
|||||||
at91_add_device_spi(NULL, 0);
|
at91_add_device_spi(NULL, 0);
|
||||||
/* MMC */
|
/* MMC */
|
||||||
/* only supports 1 or 4 bit interface, not wired through to SPI */
|
/* only supports 1 or 4 bit interface, not wired through to SPI */
|
||||||
at91_add_device_mmc(0, &eb9200_mmc_data);
|
at91_add_device_mci(0, &eb9200_mci0_data);
|
||||||
}
|
}
|
||||||
|
|
||||||
MACHINE_START(ATEB9200, "Embest ATEB9200")
|
MACHINE_START(ATEB9200, "Embest ATEB9200")
|
||||||
|
@ -63,12 +63,12 @@ static struct at91_usbh_data __initdata ecb_at91usbh_data = {
|
|||||||
.overcurrent_pin= {-EINVAL, -EINVAL},
|
.overcurrent_pin= {-EINVAL, -EINVAL},
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct at91_mmc_data __initdata ecb_at91mmc_data = {
|
static struct mci_platform_data __initdata ecbat91_mci0_data = {
|
||||||
.slot_b = 0,
|
.slot[0] = {
|
||||||
.wire4 = 1,
|
.bus_width = 4,
|
||||||
.det_pin = -EINVAL,
|
.detect_pin = -EINVAL,
|
||||||
.wp_pin = -EINVAL,
|
.wp_pin = -EINVAL,
|
||||||
.vcc_pin = -EINVAL,
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -160,7 +160,7 @@ static void __init ecb_at91board_init(void)
|
|||||||
at91_add_device_i2c(NULL, 0);
|
at91_add_device_i2c(NULL, 0);
|
||||||
|
|
||||||
/* MMC */
|
/* MMC */
|
||||||
at91_add_device_mmc(0, &ecb_at91mmc_data);
|
at91_add_device_mci(0, &ecbat91_mci0_data);
|
||||||
|
|
||||||
/* SPI */
|
/* SPI */
|
||||||
at91_add_device_spi(ecb_at91spi_devices, ARRAY_SIZE(ecb_at91spi_devices));
|
at91_add_device_spi(ecb_at91spi_devices, ARRAY_SIZE(ecb_at91spi_devices));
|
||||||
|
@ -55,12 +55,12 @@ static struct at91_udc_data __initdata eco920_udc_data = {
|
|||||||
.pullup_pin = AT91_PIN_PB13,
|
.pullup_pin = AT91_PIN_PB13,
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct at91_mmc_data __initdata eco920_mmc_data = {
|
static struct mci_platform_data __initdata eco920_mci0_data = {
|
||||||
.slot_b = 0,
|
.slot[0] = {
|
||||||
.wire4 = 0,
|
.bus_width = 1,
|
||||||
.det_pin = -EINVAL,
|
.detect_pin = -EINVAL,
|
||||||
.wp_pin = -EINVAL,
|
.wp_pin = -EINVAL,
|
||||||
.vcc_pin = -EINVAL,
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct physmap_flash_data eco920_flash_data = {
|
static struct physmap_flash_data eco920_flash_data = {
|
||||||
@ -103,7 +103,7 @@ static void __init eco920_board_init(void)
|
|||||||
at91_add_device_usbh(&eco920_usbh_data);
|
at91_add_device_usbh(&eco920_usbh_data);
|
||||||
at91_add_device_udc(&eco920_udc_data);
|
at91_add_device_udc(&eco920_udc_data);
|
||||||
|
|
||||||
at91_add_device_mmc(0, &eco920_mmc_data);
|
at91_add_device_mci(0, &eco920_mci0_data);
|
||||||
platform_device_register(&eco920_flash);
|
platform_device_register(&eco920_flash);
|
||||||
|
|
||||||
at91_ramc_write(0, AT91_SMC_CSR(7), AT91_SMC_RWHOLD_(1)
|
at91_ramc_write(0, AT91_SMC_CSR(7), AT91_SMC_RWHOLD_(1)
|
||||||
|
@ -74,12 +74,12 @@ static struct spi_board_info flexibity_spi_devices[] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
/* MCI (SD/MMC) */
|
/* MCI (SD/MMC) */
|
||||||
static struct at91_mmc_data __initdata flexibity_mmc_data = {
|
static struct mci_platform_data __initdata flexibity_mci0_data = {
|
||||||
.slot_b = 0,
|
.slot[0] = {
|
||||||
.wire4 = 1,
|
.bus_width = 4,
|
||||||
.det_pin = AT91_PIN_PC9,
|
.detect_pin = AT91_PIN_PC9,
|
||||||
.wp_pin = AT91_PIN_PC4,
|
.wp_pin = AT91_PIN_PC4,
|
||||||
.vcc_pin = -EINVAL,
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
/* LEDs */
|
/* LEDs */
|
||||||
@ -151,7 +151,7 @@ static void __init flexibity_board_init(void)
|
|||||||
at91_add_device_spi(flexibity_spi_devices,
|
at91_add_device_spi(flexibity_spi_devices,
|
||||||
ARRAY_SIZE(flexibity_spi_devices));
|
ARRAY_SIZE(flexibity_spi_devices));
|
||||||
/* MMC */
|
/* MMC */
|
||||||
at91_add_device_mmc(0, &flexibity_mmc_data);
|
at91_add_device_mci(0, &flexibity_mci0_data);
|
||||||
/* LEDs */
|
/* LEDs */
|
||||||
at91_gpio_leds(flexibity_leds, ARRAY_SIZE(flexibity_leds));
|
at91_gpio_leds(flexibity_leds, ARRAY_SIZE(flexibity_leds));
|
||||||
}
|
}
|
||||||
|
@ -85,7 +85,7 @@ static struct at91_udc_data __initdata foxg20_udc_data = {
|
|||||||
* SPI devices.
|
* SPI devices.
|
||||||
*/
|
*/
|
||||||
static struct spi_board_info foxg20_spi_devices[] = {
|
static struct spi_board_info foxg20_spi_devices[] = {
|
||||||
#if !defined(CONFIG_MMC_AT91)
|
#if !IS_ENABLED(CONFIG_MMC_ATMELMCI)
|
||||||
{
|
{
|
||||||
.modalias = "mtd_dataflash",
|
.modalias = "mtd_dataflash",
|
||||||
.chip_select = 1,
|
.chip_select = 1,
|
||||||
@ -108,12 +108,12 @@ static struct macb_platform_data __initdata foxg20_macb_data = {
|
|||||||
* MCI (SD/MMC)
|
* MCI (SD/MMC)
|
||||||
* det_pin, wp_pin and vcc_pin are not connected
|
* det_pin, wp_pin and vcc_pin are not connected
|
||||||
*/
|
*/
|
||||||
static struct at91_mmc_data __initdata foxg20_mmc_data = {
|
static struct mci_platform_data __initdata foxg20_mci0_data = {
|
||||||
.slot_b = 1,
|
.slot[1] = {
|
||||||
.wire4 = 1,
|
.bus_width = 4,
|
||||||
.det_pin = -EINVAL,
|
.detect_pin = -EINVAL,
|
||||||
.wp_pin = -EINVAL,
|
.wp_pin = -EINVAL,
|
||||||
.vcc_pin = -EINVAL,
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -246,7 +246,7 @@ static void __init foxg20_board_init(void)
|
|||||||
/* Ethernet */
|
/* Ethernet */
|
||||||
at91_add_device_eth(&foxg20_macb_data);
|
at91_add_device_eth(&foxg20_macb_data);
|
||||||
/* MMC */
|
/* MMC */
|
||||||
at91_add_device_mmc(0, &foxg20_mmc_data);
|
at91_add_device_mci(0, &foxg20_mci0_data);
|
||||||
/* I2C */
|
/* I2C */
|
||||||
at91_add_device_i2c(foxg20_i2c_devices, ARRAY_SIZE(foxg20_i2c_devices));
|
at91_add_device_i2c(foxg20_i2c_devices, ARRAY_SIZE(foxg20_i2c_devices));
|
||||||
/* LEDs */
|
/* LEDs */
|
||||||
|
@ -68,12 +68,12 @@ static struct at91_udc_data __initdata kb9202_udc_data = {
|
|||||||
.pullup_pin = AT91_PIN_PB22,
|
.pullup_pin = AT91_PIN_PB22,
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct at91_mmc_data __initdata kb9202_mmc_data = {
|
static struct mci_platform_data __initdata kb9202_mci0_data = {
|
||||||
.det_pin = AT91_PIN_PB2,
|
.slot[0] = {
|
||||||
.slot_b = 0,
|
.bus_width = 4,
|
||||||
.wire4 = 1,
|
.detect_pin = AT91_PIN_PB2,
|
||||||
.wp_pin = -EINVAL,
|
.wp_pin = -EINVAL,
|
||||||
.vcc_pin = -EINVAL,
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct mtd_partition __initdata kb9202_nand_partition[] = {
|
static struct mtd_partition __initdata kb9202_nand_partition[] = {
|
||||||
@ -120,7 +120,7 @@ static void __init kb9202_board_init(void)
|
|||||||
/* USB Device */
|
/* USB Device */
|
||||||
at91_add_device_udc(&kb9202_udc_data);
|
at91_add_device_udc(&kb9202_udc_data);
|
||||||
/* MMC */
|
/* MMC */
|
||||||
at91_add_device_mmc(0, &kb9202_mmc_data);
|
at91_add_device_mci(0, &kb9202_mci0_data);
|
||||||
/* I2C */
|
/* I2C */
|
||||||
at91_add_device_i2c(NULL, 0);
|
at91_add_device_i2c(NULL, 0);
|
||||||
/* SPI */
|
/* SPI */
|
||||||
|
@ -137,11 +137,12 @@ static struct spi_board_info neocore926_spi_devices[] = {
|
|||||||
/*
|
/*
|
||||||
* MCI (SD/MMC)
|
* MCI (SD/MMC)
|
||||||
*/
|
*/
|
||||||
static struct at91_mmc_data __initdata neocore926_mmc_data = {
|
static struct mci_platform_data __initdata neocore926_mci0_data = {
|
||||||
.wire4 = 1,
|
.slot[0] = {
|
||||||
.det_pin = AT91_PIN_PE18,
|
.bus_width = 4,
|
||||||
.wp_pin = AT91_PIN_PE19,
|
.detect_pin = AT91_PIN_PE18,
|
||||||
.vcc_pin = -EINVAL,
|
.wp_pin = AT91_PIN_PE19,
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -353,7 +354,7 @@ static void __init neocore926_board_init(void)
|
|||||||
neocore926_add_device_ts();
|
neocore926_add_device_ts();
|
||||||
|
|
||||||
/* MMC */
|
/* MMC */
|
||||||
at91_add_device_mmc(1, &neocore926_mmc_data);
|
at91_add_device_mci(0, &neocore926_mci0_data);
|
||||||
|
|
||||||
/* Ethernet */
|
/* Ethernet */
|
||||||
at91_add_device_eth(&neocore926_macb_data);
|
at91_add_device_eth(&neocore926_macb_data);
|
||||||
|
@ -61,12 +61,12 @@ static struct at91_usbh_data __initdata picotux200_usbh_data = {
|
|||||||
.overcurrent_pin= {-EINVAL, -EINVAL},
|
.overcurrent_pin= {-EINVAL, -EINVAL},
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct at91_mmc_data __initdata picotux200_mmc_data = {
|
static struct mci_platform_data __initdata picotux200_mci0_data = {
|
||||||
.det_pin = AT91_PIN_PB27,
|
.slot[0] = {
|
||||||
.slot_b = 0,
|
.bus_width = 4,
|
||||||
.wire4 = 1,
|
.detect_pin = AT91_PIN_PB27,
|
||||||
.wp_pin = AT91_PIN_PA17,
|
.wp_pin = AT91_PIN_PA17,
|
||||||
.vcc_pin = -EINVAL,
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
#define PICOTUX200_FLASH_BASE AT91_CHIPSELECT_0
|
#define PICOTUX200_FLASH_BASE AT91_CHIPSELECT_0
|
||||||
@ -111,7 +111,7 @@ static void __init picotux200_board_init(void)
|
|||||||
at91_add_device_i2c(NULL, 0);
|
at91_add_device_i2c(NULL, 0);
|
||||||
/* MMC */
|
/* MMC */
|
||||||
at91_set_gpio_output(AT91_PIN_PB22, 1); /* this MMC card slot can optionally use SPI signaling (CS3). */
|
at91_set_gpio_output(AT91_PIN_PB22, 1); /* this MMC card slot can optionally use SPI signaling (CS3). */
|
||||||
at91_add_device_mmc(0, &picotux200_mmc_data);
|
at91_add_device_mci(0, &picotux200_mci0_data);
|
||||||
/* NOR Flash */
|
/* NOR Flash */
|
||||||
platform_device_register(&picotux200_flash);
|
platform_device_register(&picotux200_flash);
|
||||||
}
|
}
|
||||||
|
@ -155,12 +155,12 @@ static void __init ek_add_device_nand(void)
|
|||||||
/*
|
/*
|
||||||
* MCI (SD/MMC)
|
* MCI (SD/MMC)
|
||||||
*/
|
*/
|
||||||
static struct at91_mmc_data __initdata ek_mmc_data = {
|
static struct mci_platform_data __initdata ek_mci0_data = {
|
||||||
.slot_b = 0,
|
.slot[0] = {
|
||||||
.wire4 = 1,
|
.bus_width = 4,
|
||||||
.det_pin = -EINVAL,
|
.detect_pin = -EINVAL,
|
||||||
.wp_pin = -EINVAL,
|
.wp_pin = -EINVAL,
|
||||||
.vcc_pin = -EINVAL,
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -244,7 +244,7 @@ static void __init ek_board_init(void)
|
|||||||
/* Ethernet */
|
/* Ethernet */
|
||||||
at91_add_device_eth(&ek_macb_data);
|
at91_add_device_eth(&ek_macb_data);
|
||||||
/* MMC */
|
/* MMC */
|
||||||
at91_add_device_mmc(0, &ek_mmc_data);
|
at91_add_device_mci(0, &ek_mci0_data);
|
||||||
/* Push Buttons */
|
/* Push Buttons */
|
||||||
ek_add_device_buttons();
|
ek_add_device_buttons();
|
||||||
/* LEDs */
|
/* LEDs */
|
||||||
|
@ -76,12 +76,12 @@ static struct at91_cf_data __initdata dk_cf_data = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
#ifndef CONFIG_MTD_AT91_DATAFLASH_CARD
|
#ifndef CONFIG_MTD_AT91_DATAFLASH_CARD
|
||||||
static struct at91_mmc_data __initdata dk_mmc_data = {
|
static struct mci_platform_data __initdata dk_mci0_data = {
|
||||||
.slot_b = 0,
|
.slot[0] = {
|
||||||
.wire4 = 1,
|
.bus_width = 4,
|
||||||
.det_pin = -EINVAL,
|
.detect_pin = -EINVAL,
|
||||||
.wp_pin = -EINVAL,
|
.wp_pin = -EINVAL,
|
||||||
.vcc_pin = -EINVAL,
|
},
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -207,7 +207,7 @@ static void __init dk_board_init(void)
|
|||||||
#else
|
#else
|
||||||
/* MMC */
|
/* MMC */
|
||||||
at91_set_gpio_output(AT91_PIN_PB7, 1); /* this MMC card slot can optionally use SPI signaling (CS3). */
|
at91_set_gpio_output(AT91_PIN_PB7, 1); /* this MMC card slot can optionally use SPI signaling (CS3). */
|
||||||
at91_add_device_mmc(0, &dk_mmc_data);
|
at91_add_device_mci(0, &dk_mci0_data);
|
||||||
#endif
|
#endif
|
||||||
/* NAND */
|
/* NAND */
|
||||||
at91_add_device_nand(&dk_nand_data);
|
at91_add_device_nand(&dk_nand_data);
|
||||||
|
@ -69,12 +69,12 @@ static struct at91_udc_data __initdata ek_udc_data = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
#ifndef CONFIG_MTD_AT91_DATAFLASH_CARD
|
#ifndef CONFIG_MTD_AT91_DATAFLASH_CARD
|
||||||
static struct at91_mmc_data __initdata ek_mmc_data = {
|
static struct mci_platform_data __initdata ek_mci0_data = {
|
||||||
.det_pin = AT91_PIN_PB27,
|
.slot[0] = {
|
||||||
.slot_b = 0,
|
.bus_width = 4,
|
||||||
.wire4 = 1,
|
.detect_pin = AT91_PIN_PB27,
|
||||||
.wp_pin = AT91_PIN_PA17,
|
.wp_pin = AT91_PIN_PA17,
|
||||||
.vcc_pin = -EINVAL,
|
}
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -176,7 +176,7 @@ static void __init ek_board_init(void)
|
|||||||
#else
|
#else
|
||||||
/* MMC */
|
/* MMC */
|
||||||
at91_set_gpio_output(AT91_PIN_PB22, 1); /* this MMC card slot can optionally use SPI signaling (CS3). */
|
at91_set_gpio_output(AT91_PIN_PB22, 1); /* this MMC card slot can optionally use SPI signaling (CS3). */
|
||||||
at91_add_device_mmc(0, &ek_mmc_data);
|
at91_add_device_mci(0, &ek_mci0_data);
|
||||||
#endif
|
#endif
|
||||||
/* NOR Flash */
|
/* NOR Flash */
|
||||||
platform_device_register(&ek_flash);
|
platform_device_register(&ek_flash);
|
||||||
|
@ -57,11 +57,12 @@ static struct at91_usbh_data rsi_ews_usbh_data __initdata = {
|
|||||||
/*
|
/*
|
||||||
* SD/MC
|
* SD/MC
|
||||||
*/
|
*/
|
||||||
static struct at91_mmc_data rsi_ews_mmc_data __initdata = {
|
static struct mci_platform_data __initdata rsi_ews_mci0_data = {
|
||||||
.slot_b = 0,
|
.slot[0] = {
|
||||||
.wire4 = 1,
|
.bus_width = 4,
|
||||||
.det_pin = AT91_PIN_PB27,
|
.detect_pin = AT91_PIN_PB27,
|
||||||
.wp_pin = AT91_PIN_PB29,
|
.wp_pin = AT91_PIN_PB29,
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -214,7 +215,7 @@ static void __init rsi_ews_board_init(void)
|
|||||||
at91_add_device_spi(rsi_ews_spi_devices,
|
at91_add_device_spi(rsi_ews_spi_devices,
|
||||||
ARRAY_SIZE(rsi_ews_spi_devices));
|
ARRAY_SIZE(rsi_ews_spi_devices));
|
||||||
/* MMC */
|
/* MMC */
|
||||||
at91_add_device_mmc(0, &rsi_ews_mmc_data);
|
at91_add_device_mci(0, &rsi_ews_mci0_data);
|
||||||
/* NOR Flash */
|
/* NOR Flash */
|
||||||
platform_device_register(&rsiews_nor_flash);
|
platform_device_register(&rsiews_nor_flash);
|
||||||
/* LEDs */
|
/* LEDs */
|
||||||
|
@ -72,7 +72,7 @@ static struct at91_udc_data __initdata ek_udc_data = {
|
|||||||
* SPI devices.
|
* SPI devices.
|
||||||
*/
|
*/
|
||||||
static struct spi_board_info ek_spi_devices[] = {
|
static struct spi_board_info ek_spi_devices[] = {
|
||||||
#if !defined(CONFIG_MMC_AT91)
|
#if !IS_ENABLED(CONFIG_MMC_ATMELMCI)
|
||||||
{ /* DataFlash chip */
|
{ /* DataFlash chip */
|
||||||
.modalias = "mtd_dataflash",
|
.modalias = "mtd_dataflash",
|
||||||
.chip_select = 1,
|
.chip_select = 1,
|
||||||
@ -157,12 +157,12 @@ static void __init ek_add_device_nand(void)
|
|||||||
/*
|
/*
|
||||||
* MCI (SD/MMC)
|
* MCI (SD/MMC)
|
||||||
*/
|
*/
|
||||||
static struct at91_mmc_data __initdata ek_mmc_data = {
|
static struct mci_platform_data __initdata ek_mci0_data = {
|
||||||
.slot_b = 1,
|
.slot[1] = {
|
||||||
.wire4 = 1,
|
.bus_width = 4,
|
||||||
.det_pin = AT91_PIN_PC8,
|
.detect_pin = AT91_PIN_PC8,
|
||||||
.wp_pin = AT91_PIN_PC4,
|
.wp_pin = AT91_PIN_PC4,
|
||||||
.vcc_pin = -EINVAL,
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
static void __init ek_board_init(void)
|
static void __init ek_board_init(void)
|
||||||
@ -193,7 +193,7 @@ static void __init ek_board_init(void)
|
|||||||
/* Ethernet */
|
/* Ethernet */
|
||||||
at91_add_device_eth(&ek_macb_data);
|
at91_add_device_eth(&ek_macb_data);
|
||||||
/* MMC */
|
/* MMC */
|
||||||
at91_add_device_mmc(0, &ek_mmc_data);
|
at91_add_device_mci(0, &ek_mci0_data);
|
||||||
/* I2C */
|
/* I2C */
|
||||||
at91_add_device_i2c(NULL, 0);
|
at91_add_device_i2c(NULL, 0);
|
||||||
}
|
}
|
||||||
|
@ -107,7 +107,7 @@ static void __init at73c213_set_clk(struct at73c213_board_info *info) {}
|
|||||||
* SPI devices.
|
* SPI devices.
|
||||||
*/
|
*/
|
||||||
static struct spi_board_info ek_spi_devices[] = {
|
static struct spi_board_info ek_spi_devices[] = {
|
||||||
#if !defined(CONFIG_MMC_AT91)
|
#if !IS_ENABLED(CONFIG_MMC_ATMELMCI)
|
||||||
{ /* DataFlash chip */
|
{ /* DataFlash chip */
|
||||||
.modalias = "mtd_dataflash",
|
.modalias = "mtd_dataflash",
|
||||||
.chip_select = 1,
|
.chip_select = 1,
|
||||||
@ -210,12 +210,12 @@ static void __init ek_add_device_nand(void)
|
|||||||
/*
|
/*
|
||||||
* MCI (SD/MMC)
|
* MCI (SD/MMC)
|
||||||
*/
|
*/
|
||||||
static struct at91_mmc_data __initdata ek_mmc_data = {
|
static struct mci_platform_data __initdata ek_mci0_data = {
|
||||||
.slot_b = 1,
|
.slot[1] = {
|
||||||
.wire4 = 1,
|
.bus_width = 4,
|
||||||
.det_pin = -EINVAL,
|
.detect_pin = -EINVAL,
|
||||||
.wp_pin = -EINVAL,
|
.wp_pin = -EINVAL,
|
||||||
.vcc_pin = -EINVAL,
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -328,7 +328,7 @@ static void __init ek_board_init(void)
|
|||||||
/* Ethernet */
|
/* Ethernet */
|
||||||
at91_add_device_eth(&ek_macb_data);
|
at91_add_device_eth(&ek_macb_data);
|
||||||
/* MMC */
|
/* MMC */
|
||||||
at91_add_device_mmc(0, &ek_mmc_data);
|
at91_add_device_mci(0, &ek_mci0_data);
|
||||||
/* I2C */
|
/* I2C */
|
||||||
at91_add_device_i2c(ek_i2c_devices, ARRAY_SIZE(ek_i2c_devices));
|
at91_add_device_i2c(ek_i2c_devices, ARRAY_SIZE(ek_i2c_devices));
|
||||||
/* SSC (to AT73C213) */
|
/* SSC (to AT73C213) */
|
||||||
|
@ -339,11 +339,12 @@ static struct spi_board_info ek_spi_devices[] = {
|
|||||||
* MCI (SD/MMC)
|
* MCI (SD/MMC)
|
||||||
* det_pin, wp_pin and vcc_pin are not connected
|
* det_pin, wp_pin and vcc_pin are not connected
|
||||||
*/
|
*/
|
||||||
static struct at91_mmc_data __initdata ek_mmc_data = {
|
static struct mci_platform_data __initdata mci0_data = {
|
||||||
.wire4 = 1,
|
.slot[0] = {
|
||||||
.det_pin = -EINVAL,
|
.bus_width = 4,
|
||||||
.wp_pin = -EINVAL,
|
.detect_pin = -EINVAL,
|
||||||
.vcc_pin = -EINVAL,
|
.wp_pin = -EINVAL,
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* CONFIG_SPI_ATMEL_* */
|
#endif /* CONFIG_SPI_ATMEL_* */
|
||||||
@ -597,7 +598,7 @@ static void __init ek_board_init(void)
|
|||||||
at91_add_device_ssc(AT91SAM9261_ID_SSC1, ATMEL_SSC_TX);
|
at91_add_device_ssc(AT91SAM9261_ID_SSC1, ATMEL_SSC_TX);
|
||||||
#else
|
#else
|
||||||
/* MMC */
|
/* MMC */
|
||||||
at91_add_device_mmc(0, &ek_mmc_data);
|
at91_add_device_mci(0, &mci0_data);
|
||||||
#endif
|
#endif
|
||||||
/* LCD Controller */
|
/* LCD Controller */
|
||||||
at91_add_device_lcdc(&ek_lcdc_data);
|
at91_add_device_lcdc(&ek_lcdc_data);
|
||||||
|
@ -140,11 +140,12 @@ static struct spi_board_info ek_spi_devices[] = {
|
|||||||
/*
|
/*
|
||||||
* MCI (SD/MMC)
|
* MCI (SD/MMC)
|
||||||
*/
|
*/
|
||||||
static struct at91_mmc_data __initdata ek_mmc_data = {
|
static struct mci_platform_data __initdata mci1_data = {
|
||||||
.wire4 = 1,
|
.slot[0] = {
|
||||||
.det_pin = AT91_PIN_PE18,
|
.bus_width = 4,
|
||||||
.wp_pin = AT91_PIN_PE19,
|
.detect_pin = AT91_PIN_PE18,
|
||||||
.vcc_pin = -EINVAL,
|
.wp_pin = AT91_PIN_PE19,
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -419,7 +420,7 @@ static void __init ek_board_init(void)
|
|||||||
/* Touchscreen */
|
/* Touchscreen */
|
||||||
ek_add_device_ts();
|
ek_add_device_ts();
|
||||||
/* MMC */
|
/* MMC */
|
||||||
at91_add_device_mmc(1, &ek_mmc_data);
|
at91_add_device_mci(1, &mci1_data);
|
||||||
/* Ethernet */
|
/* Ethernet */
|
||||||
at91_add_device_eth(&ek_macb_data);
|
at91_add_device_eth(&ek_macb_data);
|
||||||
/* NAND */
|
/* NAND */
|
||||||
|
@ -91,7 +91,7 @@ static struct at91_udc_data __initdata ek_udc_data = {
|
|||||||
* SPI devices.
|
* SPI devices.
|
||||||
*/
|
*/
|
||||||
static struct spi_board_info ek_spi_devices[] = {
|
static struct spi_board_info ek_spi_devices[] = {
|
||||||
#if !(defined(CONFIG_MMC_ATMELMCI) || defined(CONFIG_MMC_AT91))
|
#if !IS_ENABLED(CONFIG_MMC_ATMELMCI)
|
||||||
{ /* DataFlash chip */
|
{ /* DataFlash chip */
|
||||||
.modalias = "mtd_dataflash",
|
.modalias = "mtd_dataflash",
|
||||||
.chip_select = 1,
|
.chip_select = 1,
|
||||||
@ -198,7 +198,6 @@ static void __init ek_add_device_nand(void)
|
|||||||
* MCI (SD/MMC)
|
* MCI (SD/MMC)
|
||||||
* wp_pin and vcc_pin are not connected
|
* wp_pin and vcc_pin are not connected
|
||||||
*/
|
*/
|
||||||
#if defined(CONFIG_MMC_ATMELMCI) || defined(CONFIG_MMC_ATMELMCI_MODULE)
|
|
||||||
static struct mci_platform_data __initdata ek_mmc_data = {
|
static struct mci_platform_data __initdata ek_mmc_data = {
|
||||||
.slot[1] = {
|
.slot[1] = {
|
||||||
.bus_width = 4,
|
.bus_width = 4,
|
||||||
@ -207,28 +206,15 @@ static struct mci_platform_data __initdata ek_mmc_data = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
};
|
};
|
||||||
#else
|
|
||||||
static struct at91_mmc_data __initdata ek_mmc_data = {
|
|
||||||
.slot_b = 1, /* Only one slot so use slot B */
|
|
||||||
.wire4 = 1,
|
|
||||||
.det_pin = AT91_PIN_PC9,
|
|
||||||
.wp_pin = -EINVAL,
|
|
||||||
.vcc_pin = -EINVAL,
|
|
||||||
};
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static void __init ek_add_device_mmc(void)
|
static void __init ek_add_device_mmc(void)
|
||||||
{
|
{
|
||||||
#if defined(CONFIG_MMC_ATMELMCI) || defined(CONFIG_MMC_ATMELMCI_MODULE)
|
|
||||||
if (ek_have_2mmc()) {
|
if (ek_have_2mmc()) {
|
||||||
ek_mmc_data.slot[0].bus_width = 4;
|
ek_mmc_data.slot[0].bus_width = 4;
|
||||||
ek_mmc_data.slot[0].detect_pin = AT91_PIN_PC2;
|
ek_mmc_data.slot[0].detect_pin = AT91_PIN_PC2;
|
||||||
ek_mmc_data.slot[0].wp_pin = -1;
|
ek_mmc_data.slot[0].wp_pin = -1;
|
||||||
}
|
}
|
||||||
at91_add_device_mci(0, &ek_mmc_data);
|
at91_add_device_mci(0, &ek_mmc_data);
|
||||||
#else
|
|
||||||
at91_add_device_mmc(0, &ek_mmc_data);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -55,11 +55,12 @@ static struct usba_platform_data __initdata ek_usba_udc_data = {
|
|||||||
/*
|
/*
|
||||||
* MCI (SD/MMC)
|
* MCI (SD/MMC)
|
||||||
*/
|
*/
|
||||||
static struct at91_mmc_data __initdata ek_mmc_data = {
|
static struct mci_platform_data __initdata mci0_data = {
|
||||||
.wire4 = 1,
|
.slot[0] = {
|
||||||
.det_pin = AT91_PIN_PA15,
|
.bus_width = 4,
|
||||||
.wp_pin = -EINVAL,
|
.detect_pin = AT91_PIN_PA15,
|
||||||
.vcc_pin = -EINVAL,
|
.wp_pin = -EINVAL,
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -302,7 +303,7 @@ static void __init ek_board_init(void)
|
|||||||
/* SPI */
|
/* SPI */
|
||||||
at91_add_device_spi(ek_spi_devices, ARRAY_SIZE(ek_spi_devices));
|
at91_add_device_spi(ek_spi_devices, ARRAY_SIZE(ek_spi_devices));
|
||||||
/* MMC */
|
/* MMC */
|
||||||
at91_add_device_mmc(0, &ek_mmc_data);
|
at91_add_device_mci(0, &mci0_data);
|
||||||
/* LCD Controller */
|
/* LCD Controller */
|
||||||
at91_add_device_lcdc(&ek_lcdc_data);
|
at91_add_device_lcdc(&ek_lcdc_data);
|
||||||
/* AC97 */
|
/* AC97 */
|
||||||
|
@ -82,7 +82,6 @@ static void __init add_device_nand(void)
|
|||||||
* MCI (SD/MMC)
|
* MCI (SD/MMC)
|
||||||
* det_pin, wp_pin and vcc_pin are not connected
|
* det_pin, wp_pin and vcc_pin are not connected
|
||||||
*/
|
*/
|
||||||
#if defined(CONFIG_MMC_ATMELMCI) || defined(CONFIG_MMC_ATMELMCI_MODULE)
|
|
||||||
static struct mci_platform_data __initdata mmc_data = {
|
static struct mci_platform_data __initdata mmc_data = {
|
||||||
.slot[0] = {
|
.slot[0] = {
|
||||||
.bus_width = 4,
|
.bus_width = 4,
|
||||||
@ -90,15 +89,6 @@ static struct mci_platform_data __initdata mmc_data = {
|
|||||||
.wp_pin = -1,
|
.wp_pin = -1,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
#else
|
|
||||||
static struct at91_mmc_data __initdata mmc_data = {
|
|
||||||
.slot_b = 0,
|
|
||||||
.wire4 = 1,
|
|
||||||
.det_pin = -EINVAL,
|
|
||||||
.wp_pin = -EINVAL,
|
|
||||||
.vcc_pin = -EINVAL,
|
|
||||||
};
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -222,11 +212,7 @@ void __init stamp9g20_board_init(void)
|
|||||||
/* NAND */
|
/* NAND */
|
||||||
add_device_nand();
|
add_device_nand();
|
||||||
/* MMC */
|
/* MMC */
|
||||||
#if defined(CONFIG_MMC_ATMELMCI) || defined(CONFIG_MMC_ATMELMCI_MODULE)
|
|
||||||
at91_add_device_mci(0, &mmc_data);
|
at91_add_device_mci(0, &mmc_data);
|
||||||
#else
|
|
||||||
at91_add_device_mmc(0, &mmc_data);
|
|
||||||
#endif
|
|
||||||
/* W1 */
|
/* W1 */
|
||||||
add_w1();
|
add_w1();
|
||||||
}
|
}
|
||||||
|
@ -108,14 +108,12 @@ static struct mmc_spi_platform_data at91_mmc_spi_pdata = {
|
|||||||
* SPI devices.
|
* SPI devices.
|
||||||
*/
|
*/
|
||||||
static struct spi_board_info usb_a9263_spi_devices[] = {
|
static struct spi_board_info usb_a9263_spi_devices[] = {
|
||||||
#if !defined(CONFIG_MMC_AT91)
|
|
||||||
{ /* DataFlash chip */
|
{ /* DataFlash chip */
|
||||||
.modalias = "mtd_dataflash",
|
.modalias = "mtd_dataflash",
|
||||||
.chip_select = 0,
|
.chip_select = 0,
|
||||||
.max_speed_hz = 15 * 1000 * 1000,
|
.max_speed_hz = 15 * 1000 * 1000,
|
||||||
.bus_num = 0,
|
.bus_num = 0,
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct spi_board_info usb_a9g20_spi_devices[] = {
|
static struct spi_board_info usb_a9g20_spi_devices[] = {
|
||||||
|
@ -118,11 +118,12 @@ static struct at91_udc_data __initdata yl9200_udc_data = {
|
|||||||
/*
|
/*
|
||||||
* MMC
|
* MMC
|
||||||
*/
|
*/
|
||||||
static struct at91_mmc_data __initdata yl9200_mmc_data = {
|
static struct mci_platform_data __initdata yl9200_mci0_data = {
|
||||||
.det_pin = AT91_PIN_PB9,
|
.slot[0] = {
|
||||||
.wire4 = 1,
|
.bus_width = 4,
|
||||||
.wp_pin = -EINVAL,
|
.detect_pin = AT91_PIN_PB9,
|
||||||
.vcc_pin = -EINVAL,
|
.wp_pin = -EINVAL,
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -567,7 +568,7 @@ static void __init yl9200_board_init(void)
|
|||||||
/* I2C */
|
/* I2C */
|
||||||
at91_add_device_i2c(yl9200_i2c_devices, ARRAY_SIZE(yl9200_i2c_devices));
|
at91_add_device_i2c(yl9200_i2c_devices, ARRAY_SIZE(yl9200_i2c_devices));
|
||||||
/* MMC */
|
/* MMC */
|
||||||
at91_add_device_mmc(0, &yl9200_mmc_data);
|
at91_add_device_mci(0, &yl9200_mci0_data);
|
||||||
/* NAND */
|
/* NAND */
|
||||||
at91_add_device_nand(&yl9200_nand_data);
|
at91_add_device_nand(&yl9200_nand_data);
|
||||||
/* NOR Flash */
|
/* NOR Flash */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user