| .. | .. |
|---|
| 97 | 97 | switch (ohci->num_ports) { |
|---|
| 98 | 98 | default: |
|---|
| 99 | 99 | dev_err(&dev->dev, "Unsupported amount of ports: %d\n", ohci->num_ports); |
|---|
| 100 | + fallthrough; |
|---|
| 100 | 101 | case 3: |
|---|
| 101 | 102 | pm |= CCR_PM_USBPW3; |
|---|
| 103 | + fallthrough; |
|---|
| 102 | 104 | case 2: |
|---|
| 103 | 105 | pm |= CCR_PM_USBPW2; |
|---|
| 106 | + fallthrough; |
|---|
| 104 | 107 | case 1: |
|---|
| 105 | 108 | pm |= CCR_PM_USBPW1; |
|---|
| 106 | 109 | } |
|---|
| .. | .. |
|---|
| 153 | 156 | |
|---|
| 154 | 157 | /* generic hardware linkage */ |
|---|
| 155 | 158 | .irq = ohci_irq, |
|---|
| 156 | | - .flags = HCD_USB11 | HCD_MEMORY | HCD_LOCAL_MEM, |
|---|
| 159 | + .flags = HCD_USB11 | HCD_MEMORY, |
|---|
| 157 | 160 | |
|---|
| 158 | 161 | /* basic lifecycle operations */ |
|---|
| 159 | 162 | .start = ohci_tmio_start, |
|---|
| .. | .. |
|---|
| 227 | 230 | goto err_ioremap_regs; |
|---|
| 228 | 231 | } |
|---|
| 229 | 232 | |
|---|
| 230 | | - ret = dma_declare_coherent_memory(&dev->dev, sram->start, sram->start, |
|---|
| 231 | | - resource_size(sram), DMA_MEMORY_EXCLUSIVE); |
|---|
| 232 | | - if (ret) |
|---|
| 233 | | - goto err_dma_declare; |
|---|
| 234 | | - |
|---|
| 235 | 233 | if (cell->enable) { |
|---|
| 236 | 234 | ret = cell->enable(dev); |
|---|
| 237 | 235 | if (ret) |
|---|
| .. | .. |
|---|
| 241 | 239 | tmio_start_hc(dev); |
|---|
| 242 | 240 | ohci = hcd_to_ohci(hcd); |
|---|
| 243 | 241 | ohci_hcd_init(ohci); |
|---|
| 242 | + |
|---|
| 243 | + ret = usb_hcd_setup_local_mem(hcd, sram->start, sram->start, |
|---|
| 244 | + resource_size(sram)); |
|---|
| 245 | + if (ret < 0) |
|---|
| 246 | + goto err_enable; |
|---|
| 244 | 247 | |
|---|
| 245 | 248 | ret = usb_add_hcd(hcd, irq, 0); |
|---|
| 246 | 249 | if (ret) |
|---|
| .. | .. |
|---|
| 257 | 260 | if (cell->disable) |
|---|
| 258 | 261 | cell->disable(dev); |
|---|
| 259 | 262 | err_enable: |
|---|
| 260 | | - dma_release_declared_memory(&dev->dev); |
|---|
| 261 | | -err_dma_declare: |
|---|
| 262 | 263 | iounmap(hcd->regs); |
|---|
| 263 | 264 | err_ioremap_regs: |
|---|
| 264 | 265 | iounmap(tmio->ccr); |
|---|
| .. | .. |
|---|
| 279 | 280 | tmio_stop_hc(dev); |
|---|
| 280 | 281 | if (cell->disable) |
|---|
| 281 | 282 | cell->disable(dev); |
|---|
| 282 | | - dma_release_declared_memory(&dev->dev); |
|---|
| 283 | 283 | iounmap(hcd->regs); |
|---|
| 284 | 284 | iounmap(tmio->ccr); |
|---|
| 285 | 285 | usb_put_hcd(hcd); |
|---|