| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * linux/arch/arm/mach-mmp/devices.c |
|---|
| 3 | | - * |
|---|
| 4 | | - * This program is free software; you can redistribute it and/or modify |
|---|
| 5 | | - * it under the terms of the GNU General Public License version 2 as |
|---|
| 6 | | - * published by the Free Software Foundation. |
|---|
| 7 | 4 | */ |
|---|
| 8 | 5 | |
|---|
| 9 | 6 | #include <linux/init.h> |
|---|
| .. | .. |
|---|
| 14 | 11 | #include <asm/irq.h> |
|---|
| 15 | 12 | #include "irqs.h" |
|---|
| 16 | 13 | #include "devices.h" |
|---|
| 17 | | -#include "cputype.h" |
|---|
| 14 | +#include <linux/soc/mmp/cputype.h> |
|---|
| 18 | 15 | #include "regs-usb.h" |
|---|
| 19 | 16 | |
|---|
| 20 | 17 | int __init pxa_register_device(struct pxa_device_desc *desc, |
|---|
| .. | .. |
|---|
| 240 | 237 | #if IS_ENABLED(CONFIG_USB_SUPPORT) |
|---|
| 241 | 238 | static u64 __maybe_unused usb_dma_mask = ~(u32)0; |
|---|
| 242 | 239 | |
|---|
| 240 | +#if IS_ENABLED(CONFIG_PHY_PXA_USB) |
|---|
| 241 | +struct resource pxa168_usb_phy_resources[] = { |
|---|
| 242 | + [0] = { |
|---|
| 243 | + .start = PXA168_U2O_PHYBASE, |
|---|
| 244 | + .end = PXA168_U2O_PHYBASE + USB_PHY_RANGE, |
|---|
| 245 | + .flags = IORESOURCE_MEM, |
|---|
| 246 | + }, |
|---|
| 247 | +}; |
|---|
| 248 | + |
|---|
| 249 | +struct platform_device pxa168_device_usb_phy = { |
|---|
| 250 | + .name = "pxa-usb-phy", |
|---|
| 251 | + .id = -1, |
|---|
| 252 | + .resource = pxa168_usb_phy_resources, |
|---|
| 253 | + .num_resources = ARRAY_SIZE(pxa168_usb_phy_resources), |
|---|
| 254 | + .dev = { |
|---|
| 255 | + .dma_mask = &usb_dma_mask, |
|---|
| 256 | + .coherent_dma_mask = 0xffffffff, |
|---|
| 257 | + } |
|---|
| 258 | +}; |
|---|
| 259 | +#endif /* CONFIG_PHY_PXA_USB */ |
|---|
| 260 | + |
|---|
| 243 | 261 | #if IS_ENABLED(CONFIG_USB_MV_UDC) |
|---|
| 244 | 262 | struct resource pxa168_u2o_resources[] = { |
|---|
| 245 | 263 | /* regbase */ |
|---|
| .. | .. |
|---|
| 277 | 295 | |
|---|
| 278 | 296 | #if IS_ENABLED(CONFIG_USB_EHCI_MV_U2O) |
|---|
| 279 | 297 | struct resource pxa168_u2oehci_resources[] = { |
|---|
| 280 | | - /* regbase */ |
|---|
| 281 | 298 | [0] = { |
|---|
| 282 | | - .start = PXA168_U2O_REGBASE + U2x_CAPREGS_OFFSET, |
|---|
| 299 | + .start = PXA168_U2O_REGBASE, |
|---|
| 283 | 300 | .end = PXA168_U2O_REGBASE + USB_REG_RANGE, |
|---|
| 284 | 301 | .flags = IORESOURCE_MEM, |
|---|
| 285 | | - .name = "capregs", |
|---|
| 286 | 302 | }, |
|---|
| 287 | | - /* phybase */ |
|---|
| 288 | 303 | [1] = { |
|---|
| 289 | | - .start = PXA168_U2O_PHYBASE, |
|---|
| 290 | | - .end = PXA168_U2O_PHYBASE + USB_PHY_RANGE, |
|---|
| 291 | | - .flags = IORESOURCE_MEM, |
|---|
| 292 | | - .name = "phyregs", |
|---|
| 293 | | - }, |
|---|
| 294 | | - [2] = { |
|---|
| 295 | 304 | .start = IRQ_PXA168_USB1, |
|---|
| 296 | 305 | .end = IRQ_PXA168_USB1, |
|---|
| 297 | 306 | .flags = IORESOURCE_IRQ, |
|---|