Jordan Crouse | 76fa9a2 | 2006-01-20 14:06:09 -0800 | [diff] [blame] | 1 | /* |
| 2 | * EHCI HCD (Host Controller Driver) for USB. |
| 3 | * |
Jordan Crouse | 76fa9a2 | 2006-01-20 14:06:09 -0800 | [diff] [blame] | 4 | * Bus Glue for AMD Alchemy Au1xxx |
| 5 | * |
| 6 | * Based on "ohci-au1xxx.c" by Matt Porter <mporter@kernel.crashing.org> |
| 7 | * |
| 8 | * Modified for AMD Alchemy Au1200 EHC |
| 9 | * by K.Boge <karsten.boge@amd.com> |
| 10 | * |
| 11 | * This file is licenced under the GPL. |
| 12 | */ |
| 13 | |
| 14 | #include <linux/platform_device.h> |
| 15 | #include <asm/mach-au1x00/au1000.h> |
| 16 | |
Jordan Crouse | 76fa9a2 | 2006-01-20 14:06:09 -0800 | [diff] [blame] | 17 | #define USB_HOST_CONFIG (USB_MSR_BASE + USB_MSR_MCFG) |
| 18 | #define USB_MCFG_PFEN (1<<31) |
| 19 | #define USB_MCFG_RDCOMB (1<<30) |
| 20 | #define USB_MCFG_SSDEN (1<<23) |
| 21 | #define USB_MCFG_PHYPLLEN (1<<19) |
Manuel Lauss | 53c81a3 | 2008-06-23 09:08:29 +0200 | [diff] [blame] | 22 | #define USB_MCFG_UCECLKEN (1<<18) |
Jordan Crouse | 76fa9a2 | 2006-01-20 14:06:09 -0800 | [diff] [blame] | 23 | #define USB_MCFG_EHCCLKEN (1<<17) |
Manuel Lauss | 53c81a3 | 2008-06-23 09:08:29 +0200 | [diff] [blame] | 24 | #ifdef CONFIG_DMA_COHERENT |
Jordan Crouse | 76fa9a2 | 2006-01-20 14:06:09 -0800 | [diff] [blame] | 25 | #define USB_MCFG_UCAM (1<<7) |
Manuel Lauss | 53c81a3 | 2008-06-23 09:08:29 +0200 | [diff] [blame] | 26 | #else |
| 27 | #define USB_MCFG_UCAM (0) |
| 28 | #endif |
Jordan Crouse | 76fa9a2 | 2006-01-20 14:06:09 -0800 | [diff] [blame] | 29 | #define USB_MCFG_EBMEN (1<<3) |
| 30 | #define USB_MCFG_EMEMEN (1<<2) |
| 31 | |
Manuel Lauss | 53c81a3 | 2008-06-23 09:08:29 +0200 | [diff] [blame] | 32 | #define USBH_ENABLE_CE (USB_MCFG_PHYPLLEN | USB_MCFG_EHCCLKEN) |
| 33 | #define USBH_ENABLE_INIT (USB_MCFG_PFEN | USB_MCFG_RDCOMB | \ |
| 34 | USBH_ENABLE_CE | USB_MCFG_SSDEN | \ |
| 35 | USB_MCFG_UCAM | USB_MCFG_EBMEN | \ |
| 36 | USB_MCFG_EMEMEN) |
Jordan Crouse | 76fa9a2 | 2006-01-20 14:06:09 -0800 | [diff] [blame] | 37 | |
Jordan Crouse | 76fa9a2 | 2006-01-20 14:06:09 -0800 | [diff] [blame] | 38 | #define USBH_DISABLE (USB_MCFG_EBMEN | USB_MCFG_EMEMEN) |
| 39 | |
Jordan Crouse | 76fa9a2 | 2006-01-20 14:06:09 -0800 | [diff] [blame] | 40 | extern int usb_disabled(void); |
| 41 | |
Manuel Lauss | 53c81a3 | 2008-06-23 09:08:29 +0200 | [diff] [blame] | 42 | static void au1xxx_start_ehc(void) |
Jordan Crouse | 76fa9a2 | 2006-01-20 14:06:09 -0800 | [diff] [blame] | 43 | { |
Manuel Lauss | 53c81a3 | 2008-06-23 09:08:29 +0200 | [diff] [blame] | 44 | /* enable clock to EHCI block and HS PHY PLL*/ |
| 45 | au_writel(au_readl(USB_HOST_CONFIG) | USBH_ENABLE_CE, USB_HOST_CONFIG); |
| 46 | au_sync(); |
Jordan Crouse | 76fa9a2 | 2006-01-20 14:06:09 -0800 | [diff] [blame] | 47 | udelay(1000); |
| 48 | |
Manuel Lauss | 53c81a3 | 2008-06-23 09:08:29 +0200 | [diff] [blame] | 49 | /* enable EHCI mmio */ |
| 50 | au_writel(au_readl(USB_HOST_CONFIG) | USBH_ENABLE_INIT, USB_HOST_CONFIG); |
| 51 | au_sync(); |
| 52 | udelay(1000); |
Jordan Crouse | 76fa9a2 | 2006-01-20 14:06:09 -0800 | [diff] [blame] | 53 | } |
| 54 | |
Manuel Lauss | 53c81a3 | 2008-06-23 09:08:29 +0200 | [diff] [blame] | 55 | static void au1xxx_stop_ehc(void) |
Jordan Crouse | 76fa9a2 | 2006-01-20 14:06:09 -0800 | [diff] [blame] | 56 | { |
Manuel Lauss | 53c81a3 | 2008-06-23 09:08:29 +0200 | [diff] [blame] | 57 | unsigned long c; |
Jordan Crouse | 76fa9a2 | 2006-01-20 14:06:09 -0800 | [diff] [blame] | 58 | |
| 59 | /* Disable mem */ |
Manuel Lauss | 53c81a3 | 2008-06-23 09:08:29 +0200 | [diff] [blame] | 60 | au_writel(au_readl(USB_HOST_CONFIG) & ~USBH_DISABLE, USB_HOST_CONFIG); |
| 61 | au_sync(); |
Jordan Crouse | 76fa9a2 | 2006-01-20 14:06:09 -0800 | [diff] [blame] | 62 | udelay(1000); |
Manuel Lauss | 53c81a3 | 2008-06-23 09:08:29 +0200 | [diff] [blame] | 63 | |
| 64 | /* Disable EHC clock. If the HS PHY is unused disable it too. */ |
| 65 | c = au_readl(USB_HOST_CONFIG) & ~USB_MCFG_EHCCLKEN; |
| 66 | if (!(c & USB_MCFG_UCECLKEN)) /* UDC disabled? */ |
| 67 | c &= ~USB_MCFG_PHYPLLEN; /* yes: disable HS PHY PLL */ |
| 68 | au_writel(c, USB_HOST_CONFIG); |
| 69 | au_sync(); |
Jordan Crouse | 76fa9a2 | 2006-01-20 14:06:09 -0800 | [diff] [blame] | 70 | } |
| 71 | |
Manuel Lauss | 9757de3 | 2010-03-08 20:43:32 +0100 | [diff] [blame] | 72 | static int au1xxx_ehci_setup(struct usb_hcd *hcd) |
| 73 | { |
| 74 | struct ehci_hcd *ehci = hcd_to_ehci(hcd); |
| 75 | int ret = ehci_init(hcd); |
| 76 | |
| 77 | ehci->need_io_watchdog = 0; |
| 78 | return ret; |
| 79 | } |
| 80 | |
Jordan Crouse | 76fa9a2 | 2006-01-20 14:06:09 -0800 | [diff] [blame] | 81 | static const struct hc_driver ehci_au1xxx_hc_driver = { |
Manuel Lauss | 53c81a3 | 2008-06-23 09:08:29 +0200 | [diff] [blame] | 82 | .description = hcd_name, |
| 83 | .product_desc = "Au1xxx EHCI", |
| 84 | .hcd_priv_size = sizeof(struct ehci_hcd), |
Jordan Crouse | 76fa9a2 | 2006-01-20 14:06:09 -0800 | [diff] [blame] | 85 | |
| 86 | /* |
| 87 | * generic hardware linkage |
| 88 | */ |
Manuel Lauss | 53c81a3 | 2008-06-23 09:08:29 +0200 | [diff] [blame] | 89 | .irq = ehci_irq, |
| 90 | .flags = HCD_MEMORY | HCD_USB2, |
Jordan Crouse | 76fa9a2 | 2006-01-20 14:06:09 -0800 | [diff] [blame] | 91 | |
| 92 | /* |
| 93 | * basic lifecycle operations |
Mike Nuss | c907d3b | 2007-08-20 18:21:15 -0700 | [diff] [blame] | 94 | * |
| 95 | * FIXME -- ehci_init() doesn't do enough here. |
| 96 | * See ehci-ppc-soc for a complete implementation. |
Jordan Crouse | 76fa9a2 | 2006-01-20 14:06:09 -0800 | [diff] [blame] | 97 | */ |
Manuel Lauss | 9757de3 | 2010-03-08 20:43:32 +0100 | [diff] [blame] | 98 | .reset = au1xxx_ehci_setup, |
Manuel Lauss | 53c81a3 | 2008-06-23 09:08:29 +0200 | [diff] [blame] | 99 | .start = ehci_run, |
| 100 | .stop = ehci_stop, |
| 101 | .shutdown = ehci_shutdown, |
Jordan Crouse | 76fa9a2 | 2006-01-20 14:06:09 -0800 | [diff] [blame] | 102 | |
| 103 | /* |
| 104 | * managing i/o requests and associated device resources |
| 105 | */ |
Manuel Lauss | 53c81a3 | 2008-06-23 09:08:29 +0200 | [diff] [blame] | 106 | .urb_enqueue = ehci_urb_enqueue, |
| 107 | .urb_dequeue = ehci_urb_dequeue, |
| 108 | .endpoint_disable = ehci_endpoint_disable, |
Alan Stern | b18ffd4 | 2009-05-27 18:21:56 -0400 | [diff] [blame] | 109 | .endpoint_reset = ehci_endpoint_reset, |
Jordan Crouse | 76fa9a2 | 2006-01-20 14:06:09 -0800 | [diff] [blame] | 110 | |
| 111 | /* |
| 112 | * scheduling support |
| 113 | */ |
Manuel Lauss | 53c81a3 | 2008-06-23 09:08:29 +0200 | [diff] [blame] | 114 | .get_frame_number = ehci_get_frame, |
Jordan Crouse | 76fa9a2 | 2006-01-20 14:06:09 -0800 | [diff] [blame] | 115 | |
| 116 | /* |
| 117 | * root hub support |
| 118 | */ |
Manuel Lauss | 53c81a3 | 2008-06-23 09:08:29 +0200 | [diff] [blame] | 119 | .hub_status_data = ehci_hub_status_data, |
| 120 | .hub_control = ehci_hub_control, |
| 121 | .bus_suspend = ehci_bus_suspend, |
| 122 | .bus_resume = ehci_bus_resume, |
| 123 | .relinquish_port = ehci_relinquish_port, |
| 124 | .port_handed_over = ehci_port_handed_over, |
Alan Stern | 914b701 | 2009-06-29 10:47:30 -0400 | [diff] [blame] | 125 | |
| 126 | .clear_tt_buffer_complete = ehci_clear_tt_buffer_complete, |
Jordan Crouse | 76fa9a2 | 2006-01-20 14:06:09 -0800 | [diff] [blame] | 127 | }; |
| 128 | |
Daniel Mack | d14feb5 | 2006-06-23 21:36:07 +0100 | [diff] [blame] | 129 | static int ehci_hcd_au1xxx_drv_probe(struct platform_device *pdev) |
Jordan Crouse | 76fa9a2 | 2006-01-20 14:06:09 -0800 | [diff] [blame] | 130 | { |
Manuel Lauss | 53c81a3 | 2008-06-23 09:08:29 +0200 | [diff] [blame] | 131 | struct usb_hcd *hcd; |
| 132 | struct ehci_hcd *ehci; |
H Hartley Sweeten | 1f141ca | 2009-12-14 18:22:42 -0500 | [diff] [blame] | 133 | struct resource *res; |
Jordan Crouse | 76fa9a2 | 2006-01-20 14:06:09 -0800 | [diff] [blame] | 134 | int ret; |
| 135 | |
Jordan Crouse | 76fa9a2 | 2006-01-20 14:06:09 -0800 | [diff] [blame] | 136 | if (usb_disabled()) |
| 137 | return -ENODEV; |
| 138 | |
Manuel Lauss | 53c81a3 | 2008-06-23 09:08:29 +0200 | [diff] [blame] | 139 | #if defined(CONFIG_SOC_AU1200) && defined(CONFIG_DMA_COHERENT) |
| 140 | /* Au1200 AB USB does not support coherent memory */ |
| 141 | if (!(read_c0_prid() & 0xff)) { |
| 142 | printk(KERN_INFO "%s: this is chip revision AB!\n", pdev->name); |
| 143 | printk(KERN_INFO "%s: update your board or re-configure" |
| 144 | " the kernel\n", pdev->name); |
| 145 | return -ENODEV; |
| 146 | } |
| 147 | #endif |
| 148 | |
| 149 | if (pdev->resource[1].flags != IORESOURCE_IRQ) { |
| 150 | pr_debug("resource[1] is not IORESOURCE_IRQ"); |
| 151 | return -ENOMEM; |
| 152 | } |
| 153 | hcd = usb_create_hcd(&ehci_au1xxx_hc_driver, &pdev->dev, "Au1xxx"); |
| 154 | if (!hcd) |
| 155 | return -ENOMEM; |
| 156 | |
H Hartley Sweeten | 1f141ca | 2009-12-14 18:22:42 -0500 | [diff] [blame] | 157 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
| 158 | hcd->rsrc_start = res->start; |
| 159 | hcd->rsrc_len = resource_size(res); |
Manuel Lauss | 53c81a3 | 2008-06-23 09:08:29 +0200 | [diff] [blame] | 160 | |
| 161 | if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, hcd_name)) { |
| 162 | pr_debug("request_mem_region failed"); |
| 163 | ret = -EBUSY; |
| 164 | goto err1; |
| 165 | } |
| 166 | |
| 167 | hcd->regs = ioremap(hcd->rsrc_start, hcd->rsrc_len); |
| 168 | if (!hcd->regs) { |
| 169 | pr_debug("ioremap failed"); |
| 170 | ret = -ENOMEM; |
| 171 | goto err2; |
| 172 | } |
| 173 | |
| 174 | au1xxx_start_ehc(); |
| 175 | |
| 176 | ehci = hcd_to_ehci(hcd); |
| 177 | ehci->caps = hcd->regs; |
Jan Andersson | c430131 | 2011-05-03 20:11:57 +0200 | [diff] [blame] | 178 | ehci->regs = hcd->regs + |
| 179 | HC_LENGTH(ehci, readl(&ehci->caps->hc_capbase)); |
Manuel Lauss | 53c81a3 | 2008-06-23 09:08:29 +0200 | [diff] [blame] | 180 | /* cache this readonly data; minimize chip reads */ |
| 181 | ehci->hcs_params = readl(&ehci->caps->hcs_params); |
| 182 | |
| 183 | ret = usb_add_hcd(hcd, pdev->resource[1].start, |
| 184 | IRQF_DISABLED | IRQF_SHARED); |
| 185 | if (ret == 0) { |
| 186 | platform_set_drvdata(pdev, hcd); |
| 187 | return ret; |
| 188 | } |
| 189 | |
| 190 | au1xxx_stop_ehc(); |
| 191 | iounmap(hcd->regs); |
| 192 | err2: |
| 193 | release_mem_region(hcd->rsrc_start, hcd->rsrc_len); |
| 194 | err1: |
| 195 | usb_put_hcd(hcd); |
Jordan Crouse | 76fa9a2 | 2006-01-20 14:06:09 -0800 | [diff] [blame] | 196 | return ret; |
| 197 | } |
| 198 | |
Daniel Mack | d14feb5 | 2006-06-23 21:36:07 +0100 | [diff] [blame] | 199 | static int ehci_hcd_au1xxx_drv_remove(struct platform_device *pdev) |
Jordan Crouse | 76fa9a2 | 2006-01-20 14:06:09 -0800 | [diff] [blame] | 200 | { |
Daniel Mack | d14feb5 | 2006-06-23 21:36:07 +0100 | [diff] [blame] | 201 | struct usb_hcd *hcd = platform_get_drvdata(pdev); |
Jordan Crouse | 76fa9a2 | 2006-01-20 14:06:09 -0800 | [diff] [blame] | 202 | |
Manuel Lauss | 53c81a3 | 2008-06-23 09:08:29 +0200 | [diff] [blame] | 203 | usb_remove_hcd(hcd); |
| 204 | iounmap(hcd->regs); |
| 205 | release_mem_region(hcd->rsrc_start, hcd->rsrc_len); |
| 206 | usb_put_hcd(hcd); |
| 207 | au1xxx_stop_ehc(); |
| 208 | platform_set_drvdata(pdev, NULL); |
| 209 | |
Jordan Crouse | 76fa9a2 | 2006-01-20 14:06:09 -0800 | [diff] [blame] | 210 | return 0; |
| 211 | } |
| 212 | |
Manuel Lauss | 42bfc7b | 2008-06-23 09:09:37 +0200 | [diff] [blame] | 213 | #ifdef CONFIG_PM |
Manuel Lauss | 807fcb5 | 2009-07-29 19:13:13 +0200 | [diff] [blame] | 214 | static int ehci_hcd_au1xxx_drv_suspend(struct device *dev) |
Jordan Crouse | 76fa9a2 | 2006-01-20 14:06:09 -0800 | [diff] [blame] | 215 | { |
Manuel Lauss | 807fcb5 | 2009-07-29 19:13:13 +0200 | [diff] [blame] | 216 | struct usb_hcd *hcd = dev_get_drvdata(dev); |
Manuel Lauss | 42bfc7b | 2008-06-23 09:09:37 +0200 | [diff] [blame] | 217 | struct ehci_hcd *ehci = hcd_to_ehci(hcd); |
| 218 | unsigned long flags; |
Manuel Lauss | a7535ac | 2011-05-05 16:35:24 +0200 | [diff] [blame] | 219 | int rc = 0; |
Manuel Lauss | 42bfc7b | 2008-06-23 09:09:37 +0200 | [diff] [blame] | 220 | |
| 221 | if (time_before(jiffies, ehci->next_statechange)) |
| 222 | msleep(10); |
| 223 | |
| 224 | /* Root hub was already suspended. Disable irq emission and |
Alan Stern | 16032c4 | 2010-05-12 18:21:35 -0400 | [diff] [blame] | 225 | * mark HW unaccessible. The PM and USB cores make sure that |
| 226 | * the root hub is either suspended or stopped. |
Manuel Lauss | 42bfc7b | 2008-06-23 09:09:37 +0200 | [diff] [blame] | 227 | */ |
Alan Stern | 4147200 | 2010-06-25 14:02:14 -0400 | [diff] [blame] | 228 | ehci_prepare_ports_for_controller_suspend(ehci, device_may_wakeup(dev)); |
Yin Kangkai | 148fc55 | 2011-01-28 12:04:35 +0800 | [diff] [blame] | 229 | spin_lock_irqsave(&ehci->lock, flags); |
Manuel Lauss | 42bfc7b | 2008-06-23 09:09:37 +0200 | [diff] [blame] | 230 | ehci_writel(ehci, 0, &ehci->regs->intr_enable); |
| 231 | (void)ehci_readl(ehci, &ehci->regs->intr_enable); |
| 232 | |
Manuel Lauss | 42bfc7b | 2008-06-23 09:09:37 +0200 | [diff] [blame] | 233 | clear_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags); |
Manuel Lauss | 42bfc7b | 2008-06-23 09:09:37 +0200 | [diff] [blame] | 234 | spin_unlock_irqrestore(&ehci->lock, flags); |
| 235 | |
| 236 | // could save FLADJ in case of Vaux power loss |
| 237 | // ... we'd only use it to handle clock skew |
| 238 | |
Manuel Lauss | a7535ac | 2011-05-05 16:35:24 +0200 | [diff] [blame] | 239 | au1xxx_stop_ehc(); |
| 240 | |
Manuel Lauss | 42bfc7b | 2008-06-23 09:09:37 +0200 | [diff] [blame] | 241 | return rc; |
| 242 | } |
| 243 | |
Manuel Lauss | 807fcb5 | 2009-07-29 19:13:13 +0200 | [diff] [blame] | 244 | static int ehci_hcd_au1xxx_drv_resume(struct device *dev) |
Manuel Lauss | 42bfc7b | 2008-06-23 09:09:37 +0200 | [diff] [blame] | 245 | { |
Manuel Lauss | 807fcb5 | 2009-07-29 19:13:13 +0200 | [diff] [blame] | 246 | struct usb_hcd *hcd = dev_get_drvdata(dev); |
Manuel Lauss | 42bfc7b | 2008-06-23 09:09:37 +0200 | [diff] [blame] | 247 | struct ehci_hcd *ehci = hcd_to_ehci(hcd); |
| 248 | |
| 249 | au1xxx_start_ehc(); |
| 250 | |
| 251 | // maybe restore FLADJ |
| 252 | |
| 253 | if (time_before(jiffies, ehci->next_statechange)) |
| 254 | msleep(100); |
| 255 | |
| 256 | /* Mark hardware accessible again as we are out of D3 state by now */ |
| 257 | set_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags); |
| 258 | |
| 259 | /* If CF is still set, we maintained PCI Vaux power. |
| 260 | * Just undo the effect of ehci_pci_suspend(). |
| 261 | */ |
| 262 | if (ehci_readl(ehci, &ehci->regs->configured_flag) == FLAG_CF) { |
| 263 | int mask = INTR_MASK; |
| 264 | |
Alan Stern | 16032c4 | 2010-05-12 18:21:35 -0400 | [diff] [blame] | 265 | ehci_prepare_ports_for_controller_resume(ehci); |
Manuel Lauss | 42bfc7b | 2008-06-23 09:09:37 +0200 | [diff] [blame] | 266 | if (!hcd->self.root_hub->do_remote_wakeup) |
| 267 | mask &= ~STS_PCD; |
| 268 | ehci_writel(ehci, mask, &ehci->regs->intr_enable); |
| 269 | ehci_readl(ehci, &ehci->regs->intr_enable); |
| 270 | return 0; |
| 271 | } |
| 272 | |
| 273 | ehci_dbg(ehci, "lost power, restarting\n"); |
| 274 | usb_root_hub_lost_power(hcd->self.root_hub); |
| 275 | |
| 276 | /* Else reset, to cope with power loss or flush-to-storage |
| 277 | * style "resume" having let BIOS kick in during reboot. |
| 278 | */ |
| 279 | (void) ehci_halt(ehci); |
| 280 | (void) ehci_reset(ehci); |
| 281 | |
| 282 | /* emptying the schedule aborts any urbs */ |
| 283 | spin_lock_irq(&ehci->lock); |
| 284 | if (ehci->reclaim) |
| 285 | end_unlink_async(ehci); |
| 286 | ehci_work(ehci); |
| 287 | spin_unlock_irq(&ehci->lock); |
| 288 | |
| 289 | ehci_writel(ehci, ehci->command, &ehci->regs->command); |
| 290 | ehci_writel(ehci, FLAG_CF, &ehci->regs->configured_flag); |
| 291 | ehci_readl(ehci, &ehci->regs->command); /* unblock posted writes */ |
| 292 | |
| 293 | /* here we "know" root ports should always stay powered */ |
| 294 | ehci_port_power(ehci, 1); |
| 295 | |
| 296 | hcd->state = HC_STATE_SUSPENDED; |
Jordan Crouse | 76fa9a2 | 2006-01-20 14:06:09 -0800 | [diff] [blame] | 297 | |
| 298 | return 0; |
| 299 | } |
Jordan Crouse | 76fa9a2 | 2006-01-20 14:06:09 -0800 | [diff] [blame] | 300 | |
Alexey Dobriyan | 4714521 | 2009-12-14 18:00:08 -0800 | [diff] [blame] | 301 | static const struct dev_pm_ops au1xxx_ehci_pmops = { |
Manuel Lauss | 807fcb5 | 2009-07-29 19:13:13 +0200 | [diff] [blame] | 302 | .suspend = ehci_hcd_au1xxx_drv_suspend, |
| 303 | .resume = ehci_hcd_au1xxx_drv_resume, |
| 304 | }; |
| 305 | |
| 306 | #define AU1XXX_EHCI_PMOPS &au1xxx_ehci_pmops |
| 307 | |
Manuel Lauss | 42bfc7b | 2008-06-23 09:09:37 +0200 | [diff] [blame] | 308 | #else |
Manuel Lauss | 807fcb5 | 2009-07-29 19:13:13 +0200 | [diff] [blame] | 309 | #define AU1XXX_EHCI_PMOPS NULL |
Manuel Lauss | 42bfc7b | 2008-06-23 09:09:37 +0200 | [diff] [blame] | 310 | #endif |
Manuel Lauss | 53c81a3 | 2008-06-23 09:08:29 +0200 | [diff] [blame] | 311 | |
Daniel Mack | d14feb5 | 2006-06-23 21:36:07 +0100 | [diff] [blame] | 312 | static struct platform_driver ehci_hcd_au1xxx_driver = { |
Manuel Lauss | 53c81a3 | 2008-06-23 09:08:29 +0200 | [diff] [blame] | 313 | .probe = ehci_hcd_au1xxx_drv_probe, |
| 314 | .remove = ehci_hcd_au1xxx_drv_remove, |
| 315 | .shutdown = usb_hcd_platform_shutdown, |
Daniel Mack | d14feb5 | 2006-06-23 21:36:07 +0100 | [diff] [blame] | 316 | .driver = { |
Manuel Lauss | 53c81a3 | 2008-06-23 09:08:29 +0200 | [diff] [blame] | 317 | .name = "au1xxx-ehci", |
| 318 | .owner = THIS_MODULE, |
Manuel Lauss | 807fcb5 | 2009-07-29 19:13:13 +0200 | [diff] [blame] | 319 | .pm = AU1XXX_EHCI_PMOPS, |
Daniel Mack | d14feb5 | 2006-06-23 21:36:07 +0100 | [diff] [blame] | 320 | } |
Jordan Crouse | 76fa9a2 | 2006-01-20 14:06:09 -0800 | [diff] [blame] | 321 | }; |
Manuel Lauss | 53c81a3 | 2008-06-23 09:08:29 +0200 | [diff] [blame] | 322 | |
| 323 | MODULE_ALIAS("platform:au1xxx-ehci"); |