This commit was manufactured by cvs2svn to create branch 'vserver'.
[linux-2.6.git] / arch / mips / au1000 / common / platform.c
1 /*
2  * Platform device support for Au1x00 SoCs.
3  *
4  * Copyright 2004, Matt Porter <mporter@kernel.crashing.org>
5  *
6  * This file is licensed under the terms of the GNU General Public
7  * License version 2.  This program is licensed "as is" without any
8  * warranty of any kind, whether express or implied.
9  */
10 #include <linux/config.h>
11 #include <linux/device.h>
12 #include <linux/kernel.h>
13 #include <linux/init.h>
14 #include <linux/resource.h>
15
16 #include <asm/mach-au1x00/au1000.h>
17
18 static struct resource au1xxx_usb_ohci_resources[] = {
19         [0] = {
20                 .start          = USB_OHCI_BASE,
21                 .end            = USB_OHCI_BASE + USB_OHCI_LEN,
22                 .flags          = IORESOURCE_MEM,
23         },
24         [1] = {
25                 .start          = AU1000_USB_HOST_INT,
26                 .end            = AU1000_USB_HOST_INT,
27                 .flags          = IORESOURCE_IRQ,
28         },
29 };
30
31 /* The dmamask must be set for OHCI to work */
32 static u64 ohci_dmamask = ~(u32)0;
33
34 static struct platform_device au1xxx_usb_ohci_device = {
35         .name           = "au1xxx-ohci",
36         .id             = 0,
37         .dev = {
38                 .dma_mask               = &ohci_dmamask,
39                 .coherent_dma_mask      = 0xffffffff,
40         },
41         .num_resources  = ARRAY_SIZE(au1xxx_usb_ohci_resources),
42         .resource       = au1xxx_usb_ohci_resources,
43 };
44
45 static struct platform_device *au1xxx_platform_devices[] __initdata = {
46         &au1xxx_usb_ohci_device,
47 };
48
49 int au1xxx_platform_init(void)
50 {
51         return platform_add_devices(au1xxx_platform_devices, ARRAY_SIZE(au1xxx_platform_devices));
52 }
53
54 arch_initcall(au1xxx_platform_init);