4/7 AU1100 MMC support
Subsystems (2)
PATCH 1/1 4/7 AU1100 MMC support
Better probe/remove functions implementation.
Signed-off-by Rodolfo Giometti <[email protected]>
Signature · 4 lines
GNU/Linux Solutions e-mail: [email protected] Linux Device Driver [email protected] Embedded Systems [email protected] UNIX programming phone: +39 349 2432127
arch/mips/au1000/common/platform.c +59 -22
@@ -13,6 +13,7 @@ #include <linux/kernel.h>#include <linux/init.h> #include <linux/resource.h> +#include <asm/mach-au1x00/au1xxx_dbdma.h> #include <asm/mach-au1x00/au1xxx.h> #if defined(CONFIG_MIPS_AU1X00_ENET ) || defined(CONFIG_MIPS_AU1X00_ENET_MODULE )
@@ -212,24 +213,6 @@ static struct resource au1xxx_usb_gdt_re }, }; -static struct resource au1xxx_mmc_resources[] = { - [0 ] = { - .start =SD0_PHYS_ADDR , - .end =SD0_PHYS_ADDR +0x40 , - .flags =IORESOURCE_MEM , - }, - [1 ] = { - .start =SD1_PHYS_ADDR , - .end =SD1_PHYS_ADDR +0x40 , - .flags =IORESOURCE_MEM , - }, - [2 ] = { - .start =AU1200_SD_INT , - .end =AU1200_SD_INT , - .flags =IORESOURCE_IRQ , - } -}; -static u64 udc_dmamask = ~(u32 )0 ;static struct platform_device au1xxx_usb_gdt_device = {
@@ -325,15 +308,68 @@ static struct platform_device au1200_idestatic u64 au1xxx_mmc_dmamask = ~(u32 )0 ; -static struct platform_device au1xxx_mmc_device = { +static struct resource au1xxx_mmc0_resources[] = { + [0 ] = { + .name ="mmc-base" , + .start =SD0_PHYS_ADDR , + .end =SD0_PHYS_ADDR +0x40 , + .flags =IORESOURCE_MEM , + }, + [1 ] = { + .name ="mmc-irq" , + .start =AU1200_SD_INT , + .end =AU1200_SD_INT , + .flags =IORESOURCE_IRQ , + }, + [2 ] = { + .name ="mmc-dma" , + .start =DSCR_CMD0_SDMS_TX0 , + .end =DSCR_CMD0_SDMS_RX0 , + .flags =IORESOURCE_DMA , + }, +}; + +static struct platform_device au1xxx_mmc0_device = { .name ="au1xxx-mmc" , .id =0 , .dev = { .dma_mask = &au1xxx_mmc_dmamask, .coherent_dma_mask =0xffffffff , }, - .num_resources =ARRAY_SIZE (au1xxx_mmc_resources), - .resource = au1xxx_mmc_resources, + .num_resources =ARRAY_SIZE (au1xxx_mmc0_resources), + .resource = au1xxx_mmc0_resources, +}; + +static struct resource au1xxx_mmc1_resources[] = { + [0 ] = { + .name ="mmc-base" , + .start =SD1_PHYS_ADDR , + .end =SD1_PHYS_ADDR +0x40 , + .flags =IORESOURCE_MEM , + }, + [1 ] = { + .name ="mmc-irq" , + .start =AU1200_SD_INT , + .end =AU1200_SD_INT , + .flags =IORESOURCE_IRQ , + }, + [2 ] = { + .name ="mmc-dma" , + .start =DSCR_CMD0_SDMS_TX1 , + .end =DSCR_CMD0_SDMS_RX1 , + .flags =IORESOURCE_DMA , + }, +}; + +static struct platform_device au1xxx_mmc1_device = { + .name ="au1xxx-mmc" , + .id =1 , + .dev = { + .dma_mask = &au1xxx_mmc_dmamask, + .coherent_dma_mask =0xffffffff , + }, + .num_resources =ARRAY_SIZE (au1xxx_mmc1_resources), + .resource = au1xxx_mmc1_resources, };#endif /* #ifdef CONFIG_SOC_AU1200 */
@@ -414,7 +450,8 @@ #ifdef CONFIG_SOC_AU1200 &au1xxx_usb_otg_device, &au1200_lcd_device, &au1200_ide0_device, - &au1xxx_mmc_device, + &au1xxx_mmc0_device, + &au1xxx_mmc1_device, #endif #ifdef CONFIG_MIPS_DB1200 &smc91x_device,
drivers/mmc/au1xmmc.c +156 -128
379 lines not on this page · raw message
drivers/mmc/au1xmmc.h +3 -0
@@ -53,6 +53,9 @@ struct au1xmmc_host {u32 flags;u32 iobase; +int irq; +int tx_devid; +int rx_devid;u32 clock;u32 bus_width;u32 power_mode;