diff options
author | Florian Fainelli <florian@openwrt.org> | 2012-10-08 09:11:30 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-10-22 14:24:11 -0400 |
commit | f2028bdf06f45955f93cbba8d0a5b5e47be0f359 (patch) | |
tree | 2450d81d87973a4a8d7bb0c36b437113e6f751dd | |
parent | cfa49b4b88fe14d2b5792f2ea7ba5b88c8cd1d15 (diff) |
MIPS: PNX8550: use OHCI platform driver
Change the PNX8550 platform code to register an ohci-platform driver instead
of ohci-pnx8550 since the ohci-platform is suitable for use.
Signed-off-by: Florian Fainelli <florian@openwrt.org>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | arch/mips/pnx8550/common/platform.c | 31 |
1 files changed, 30 insertions, 1 deletions
diff --git a/arch/mips/pnx8550/common/platform.c b/arch/mips/pnx8550/common/platform.c index 5264cc09a27..0a8faeaa7b7 100644 --- a/arch/mips/pnx8550/common/platform.c +++ b/arch/mips/pnx8550/common/platform.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/serial.h> | 20 | #include <linux/serial.h> |
21 | #include <linux/serial_pnx8xxx.h> | 21 | #include <linux/serial_pnx8xxx.h> |
22 | #include <linux/platform_device.h> | 22 | #include <linux/platform_device.h> |
23 | #include <linux/usb/ohci_pdriver.h> | ||
23 | 24 | ||
24 | #include <int.h> | 25 | #include <int.h> |
25 | #include <usb.h> | 26 | #include <usb.h> |
@@ -96,12 +97,40 @@ static u64 ohci_dmamask = DMA_BIT_MASK(32); | |||
96 | 97 | ||
97 | static u64 uart_dmamask = DMA_BIT_MASK(32); | 98 | static u64 uart_dmamask = DMA_BIT_MASK(32); |
98 | 99 | ||
100 | static int pnx8550_usb_ohci_power_on(struct platform_device *pdev) | ||
101 | { | ||
102 | /* | ||
103 | * Set register CLK48CTL to enable and 48MHz | ||
104 | */ | ||
105 | outl(0x00000003, PCI_BASE | 0x0004770c); | ||
106 | |||
107 | /* | ||
108 | * Set register CLK12CTL to enable and 48MHz | ||
109 | */ | ||
110 | outl(0x00000003, PCI_BASE | 0x00047710); | ||
111 | |||
112 | udelay(100); | ||
113 | |||
114 | return 0; | ||
115 | } | ||
116 | |||
117 | static void pnx8550_usb_ohci_power_off(struct platform_device *pdev) | ||
118 | { | ||
119 | udelay(10); | ||
120 | } | ||
121 | |||
122 | static struct usb_ohci_pdata pnx8550_usb_ohci_pdata = { | ||
123 | .power_on = pnx8550_usb_ohci_power_on, | ||
124 | .power_off = pnx8550_usb_ohci_power_off, | ||
125 | }; | ||
126 | |||
99 | static struct platform_device pnx8550_usb_ohci_device = { | 127 | static struct platform_device pnx8550_usb_ohci_device = { |
100 | .name = "pnx8550-ohci", | 128 | .name = "ohci-platform", |
101 | .id = -1, | 129 | .id = -1, |
102 | .dev = { | 130 | .dev = { |
103 | .dma_mask = &ohci_dmamask, | 131 | .dma_mask = &ohci_dmamask, |
104 | .coherent_dma_mask = DMA_BIT_MASK(32), | 132 | .coherent_dma_mask = DMA_BIT_MASK(32), |
133 | .platform_data = &pnx8550_usb_ohci_pdata, | ||
105 | }, | 134 | }, |
106 | .num_resources = ARRAY_SIZE(pnx8550_usb_ohci_resources), | 135 | .num_resources = ARRAY_SIZE(pnx8550_usb_ohci_resources), |
107 | .resource = pnx8550_usb_ohci_resources, | 136 | .resource = pnx8550_usb_ohci_resources, |