forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-10 10ebd8556b7990499c896a550e3d416b444211e6
kernel/arch/arm/mach-mmp/devices.c
....@@ -1,9 +1,6 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * 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.
74 */
85
96 #include <linux/init.h>
....@@ -14,7 +11,7 @@
1411 #include <asm/irq.h>
1512 #include "irqs.h"
1613 #include "devices.h"
17
-#include "cputype.h"
14
+#include <linux/soc/mmp/cputype.h>
1815 #include "regs-usb.h"
1916
2017 int __init pxa_register_device(struct pxa_device_desc *desc,
....@@ -240,6 +237,27 @@
240237 #if IS_ENABLED(CONFIG_USB_SUPPORT)
241238 static u64 __maybe_unused usb_dma_mask = ~(u32)0;
242239
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
+
243261 #if IS_ENABLED(CONFIG_USB_MV_UDC)
244262 struct resource pxa168_u2o_resources[] = {
245263 /* regbase */
....@@ -277,21 +295,12 @@
277295
278296 #if IS_ENABLED(CONFIG_USB_EHCI_MV_U2O)
279297 struct resource pxa168_u2oehci_resources[] = {
280
- /* regbase */
281298 [0] = {
282
- .start = PXA168_U2O_REGBASE + U2x_CAPREGS_OFFSET,
299
+ .start = PXA168_U2O_REGBASE,
283300 .end = PXA168_U2O_REGBASE + USB_REG_RANGE,
284301 .flags = IORESOURCE_MEM,
285
- .name = "capregs",
286302 },
287
- /* phybase */
288303 [1] = {
289
- .start = PXA168_U2O_PHYBASE,
290
- .end = PXA168_U2O_PHYBASE + USB_PHY_RANGE,
291
- .flags = IORESOURCE_MEM,
292
- .name = "phyregs",
293
- },
294
- [2] = {
295304 .start = IRQ_PXA168_USB1,
296305 .end = IRQ_PXA168_USB1,
297306 .flags = IORESOURCE_IRQ,