]> git.hungrycats.org Git - linux/commitdiff
[ARM] Add PXA MCI resources and device structure.
authorRussell King <rmk@flint.arm.linux.org.uk>
Tue, 20 Jan 2004 16:43:55 +0000 (16:43 +0000)
committerRussell King <rmk@flint.arm.linux.org.uk>
Tue, 20 Jan 2004 16:43:55 +0000 (16:43 +0000)
arch/arm/mach-pxa/generic.c

index a7eff6ea126401abceb3ae66fcf5359b9260e63d..a811fa344b8bcd11f4214f47cf3e2156a0386e8e 100644 (file)
 #include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/delay.h>
+#include <linux/device.h>
+#include <linux/ioport.h>
 #include <linux/pm.h>
 
 #include <asm/hardware.h>
+#include <asm/irq.h>
 #include <asm/system.h>
 #include <asm/pgtable.h>
 #include <asm/mach/map.h>
@@ -138,3 +141,40 @@ void __init pxa_map_io(void)
        iotable_init(standard_io_desc, ARRAY_SIZE(standard_io_desc));
        get_clk_frequency_khz(1);
 }
+
+
+static struct resource pxamci_resources[] = {
+       [0] = {
+               .start  = 0x41100000,
+               .end    = 0x41100fff,
+               .flags  = IORESOURCE_MEM,
+       },
+       [1] = {
+               .start  = IRQ_MMC,
+               .end    = IRQ_MMC,
+               .flags  = IORESOURCE_IRQ,
+       },
+};
+
+static u64 pxamci_dmamask = 0xffffffffUL;
+
+static struct platform_device pxamci_device = {
+       .name           = "pxamci",
+       .id             = 0,
+       .dev            = {
+               .dma_mask = &pxamci_dmamask,
+       },
+       .num_resources  = ARRAY_SIZE(pxamci_resources),
+       .resource       = pxamci_resources,
+};
+
+static struct platform_device *devices[] __initdata = {
+       &pxamci_device,
+};
+
+static int __init pxa_init(void)
+{
+       return platform_add_devices(devices, ARRAY_SIZE(devices));
+}
+
+subsys_initcall(pxa_init);