summaryrefslogtreecommitdiff
path: root/cleopatre/linux-2.6.25.10-spc300/arch/arm/mach-spc300/spc300-devices.c
diff options
context:
space:
mode:
Diffstat (limited to 'cleopatre/linux-2.6.25.10-spc300/arch/arm/mach-spc300/spc300-devices.c')
-rw-r--r--cleopatre/linux-2.6.25.10-spc300/arch/arm/mach-spc300/spc300-devices.c55
1 files changed, 55 insertions, 0 deletions
diff --git a/cleopatre/linux-2.6.25.10-spc300/arch/arm/mach-spc300/spc300-devices.c b/cleopatre/linux-2.6.25.10-spc300/arch/arm/mach-spc300/spc300-devices.c
index ad69b6b9d5..5e80bdb83c 100644
--- a/cleopatre/linux-2.6.25.10-spc300/arch/arm/mach-spc300/spc300-devices.c
+++ b/cleopatre/linux-2.6.25.10-spc300/arch/arm/mach-spc300/spc300-devices.c
@@ -43,6 +43,48 @@
*/
#define SPC300_MTD_PARTITION_NB_MAX 7
+#ifdef CONFIG_USB_EHCI_HCD
+/**
+ * USB EHCI Devices Structures
+ */
+static struct resource mstar_usb_ehci_resources[] = {
+ [0] = {
+ .start = USB_UTMI_BASE,
+ .end = USB_UTMI_BASE + SZ_512 - 1,
+ .flags = IORESOURCE_MEM,
+ },
+ [1] = {
+ .start = USB_UHC_BASE,
+ .end = USB_UHC_BASE + SZ_512 - 1,
+ .flags = IORESOURCE_MEM,
+ },
+ [2] = {
+ .start = USB_USBC_BASE,
+ .end = USB_USBC_BASE + SZ_512 - 1,
+ .flags = IORESOURCE_MEM,
+ },
+ [3] = {
+ .start = INT_UHC,
+ .end = INT_UHC,
+ .flags = IORESOURCE_IRQ,
+ },
+};
+
+/* The dmamask must be set for EHCI to work */
+static u64 ehci_dmamask = 0x7ffffff; //tony add for limit DMA range
+
+static struct platform_device Mstar_usb_ehci_device = {
+ .name = "Mstar-ehci-1",
+ .id = 0,
+ .dev = {
+ .dma_mask = &ehci_dmamask,
+ .coherent_dma_mask = 0xffffffff, //tony add for limit DMA range
+ },
+ .num_resources = ARRAY_SIZE(mstar_usb_ehci_resources),
+ .resource = mstar_usb_ehci_resources,
+};
+#endif
+
/**
* UART Devices Structures
*/
@@ -392,6 +434,19 @@ static struct platform_device spc300_pcm_device = {
};
#endif
+#ifdef CONFIG_USB_EHCI_HCD
+/**
+ * Register USB EHCI.
+ */
+void __init spc300_add_device_ehci(void)
+{
+ platform_device_register(&Mstar_usb_ehci_device);
+}
+#endif
+
+/**
+ * Register UART 0 device.
+ */
void __init spc300_add_device_uart0(void)
{
amba_device_register(amba_devs[0], &iomem_resource);