diff options
author | wanzongshun <mcuos.com@gmail.com> | 2009-05-01 11:11:46 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2009-05-07 10:24:18 -0400 |
commit | 177dd6bb8c70885bfe3c269bf21dab1c4aeaf5c3 (patch) | |
tree | b4e498d2f331f55b0cb5472a8c0aa675575c64d7 /arch/arm/mach-w90x900 | |
parent | 7f7810e2db70589c6695f9994c10258b09b1f93c (diff) |
[ARM] 5495/1: Add w90p910 usb host driver relevant kernel parts[1/2]
Add this usb host driver relevant kernel parts.
Signed-off-by: Wan ZongShun <mcuos.com@gmail.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-w90x900')
-rw-r--r-- | arch/arm/mach-w90x900/mach-w90p910evb.c | 65 |
1 files changed, 61 insertions, 4 deletions
diff --git a/arch/arm/mach-w90x900/mach-w90p910evb.c b/arch/arm/mach-w90x900/mach-w90p910evb.c index 726ff6798a56..578a50910c0a 100644 --- a/arch/arm/mach-w90x900/mach-w90p910evb.c +++ b/arch/arm/mach-w90x900/mach-w90p910evb.c | |||
@@ -3,15 +3,13 @@ | |||
3 | * | 3 | * |
4 | * Based on mach-s3c2410/mach-smdk2410.c by Jonas Dietsche | 4 | * Based on mach-s3c2410/mach-smdk2410.c by Jonas Dietsche |
5 | * | 5 | * |
6 | * Copyright (C) 2008 Nuvoton technology corporation | 6 | * Copyright (C) 2008 Nuvoton technology corporation. |
7 | * All rights reserved. | ||
8 | * | 7 | * |
9 | * Wan ZongShun <mcuos.com@gmail.com> | 8 | * Wan ZongShun <mcuos.com@gmail.com> |
10 | * | 9 | * |
11 | * This program is free software; you can redistribute it and/or | 10 | * This program is free software; you can redistribute it and/or |
12 | * modify it under the terms of the GNU General Public License as | 11 | * modify it under the terms of the GNU General Public License as |
13 | * published by the Free Software Foundation; either version 2 of | 12 | * published by the Free Software Foundation;version 2 of the License. |
14 | * the License, or (at your option) any later version. | ||
15 | * | 13 | * |
16 | */ | 14 | */ |
17 | 15 | ||
@@ -80,6 +78,63 @@ static struct platform_device w90p910_flash_device = { | |||
80 | .num_resources = ARRAY_SIZE(w90p910_flash_resources), | 78 | .num_resources = ARRAY_SIZE(w90p910_flash_resources), |
81 | }; | 79 | }; |
82 | 80 | ||
81 | /* USB EHCI Host Controller */ | ||
82 | |||
83 | static struct resource w90x900_usb_ehci_resource[] = { | ||
84 | [0] = { | ||
85 | .start = W90X900_PA_USBEHCIHOST, | ||
86 | .end = W90X900_PA_USBEHCIHOST + W90X900_SZ_USBEHCIHOST - 1, | ||
87 | .flags = IORESOURCE_MEM, | ||
88 | }, | ||
89 | [1] = { | ||
90 | .start = IRQ_USBH, | ||
91 | .end = IRQ_USBH, | ||
92 | .flags = IORESOURCE_IRQ, | ||
93 | } | ||
94 | }; | ||
95 | |||
96 | static u64 w90x900_device_usb_ehci_dmamask = 0xffffffffUL; | ||
97 | |||
98 | struct platform_device w90x900_device_usb_ehci = { | ||
99 | .name = "w90x900-ehci", | ||
100 | .id = -1, | ||
101 | .num_resources = ARRAY_SIZE(w90x900_usb_ehci_resource), | ||
102 | .resource = w90x900_usb_ehci_resource, | ||
103 | .dev = { | ||
104 | .dma_mask = &w90x900_device_usb_ehci_dmamask, | ||
105 | .coherent_dma_mask = 0xffffffffUL | ||
106 | } | ||
107 | }; | ||
108 | EXPORT_SYMBOL(w90x900_device_usb_ehci); | ||
109 | |||
110 | /* USB OHCI Host Controller */ | ||
111 | |||
112 | static struct resource w90x900_usb_ohci_resource[] = { | ||
113 | [0] = { | ||
114 | .start = W90X900_PA_USBOHCIHOST, | ||
115 | .end = W90X900_PA_USBOHCIHOST + W90X900_SZ_USBOHCIHOST - 1, | ||
116 | .flags = IORESOURCE_MEM, | ||
117 | }, | ||
118 | [1] = { | ||
119 | .start = IRQ_USBH, | ||
120 | .end = IRQ_USBH, | ||
121 | .flags = IORESOURCE_IRQ, | ||
122 | } | ||
123 | }; | ||
124 | |||
125 | static u64 w90x900_device_usb_ohci_dmamask = 0xffffffffUL; | ||
126 | struct platform_device w90x900_device_usb_ohci = { | ||
127 | .name = "w90x900-ohci", | ||
128 | .id = -1, | ||
129 | .num_resources = ARRAY_SIZE(w90x900_usb_ohci_resource), | ||
130 | .resource = w90x900_usb_ohci_resource, | ||
131 | .dev = { | ||
132 | .dma_mask = &w90x900_device_usb_ohci_dmamask, | ||
133 | .coherent_dma_mask = 0xffffffffUL | ||
134 | } | ||
135 | }; | ||
136 | EXPORT_SYMBOL(w90x900_device_usb_ohci); | ||
137 | |||
83 | static struct map_desc w90p910_iodesc[] __initdata = { | 138 | static struct map_desc w90p910_iodesc[] __initdata = { |
84 | }; | 139 | }; |
85 | 140 | ||
@@ -88,6 +143,8 @@ static struct map_desc w90p910_iodesc[] __initdata = { | |||
88 | static struct platform_device *w90p910evb_dev[] __initdata = { | 143 | static struct platform_device *w90p910evb_dev[] __initdata = { |
89 | &w90p910_serial_device, | 144 | &w90p910_serial_device, |
90 | &w90p910_flash_device, | 145 | &w90p910_flash_device, |
146 | &w90x900_device_usb_ehci, | ||
147 | &w90x900_device_usb_ohci, | ||
91 | }; | 148 | }; |
92 | 149 | ||
93 | static void __init w90p910evb_map_io(void) | 150 | static void __init w90p910evb_map_io(void) |