diff options
Diffstat (limited to 'arch/mips/pnx8550/common/platform.c')
| -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 5264cc09a27b..0a8faeaa7b70 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, |
