]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
arm64: zynqmp: Use DWC3 generic driver and DM_USB
authorMichal Simek <michal.simek@xilinx.com>
Fri, 18 May 2018 11:15:08 +0000 (13:15 +0200)
committerMarek Vasut <marex@denx.de>
Fri, 18 May 2018 11:23:15 +0000 (13:23 +0200)
Remove harcoded XHCI lists and detect mode, speed based on DT.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Serial-changes: 2
- Remove also XHCI macros from hardware.h
- Remove additional new line in zcu106

21 files changed:
arch/arm/include/asm/arch-zynqmp/hardware.h
board/xilinx/zynqmp/zynqmp.c
configs/xilinx_zynqmp_zc1751_xm015_dc1_defconfig
configs/xilinx_zynqmp_zc1751_xm016_dc2_defconfig
configs/xilinx_zynqmp_zc1751_xm017_dc3_defconfig
configs/xilinx_zynqmp_zcu100_revC_defconfig
configs/xilinx_zynqmp_zcu102_rev1_0_defconfig
configs/xilinx_zynqmp_zcu102_revA_defconfig
configs/xilinx_zynqmp_zcu102_revB_defconfig
configs/xilinx_zynqmp_zcu104_revA_defconfig
configs/xilinx_zynqmp_zcu104_revC_defconfig
configs/xilinx_zynqmp_zcu106_revA_defconfig
configs/xilinx_zynqmp_zcu111_revA_defconfig
include/configs/xilinx_zynqmp_zc1751_xm015_dc1.h
include/configs/xilinx_zynqmp_zc1751_xm016_dc2.h
include/configs/xilinx_zynqmp_zc1751_xm017_dc3.h
include/configs/xilinx_zynqmp_zcu100.h
include/configs/xilinx_zynqmp_zcu102.h
include/configs/xilinx_zynqmp_zcu104.h
include/configs/xilinx_zynqmp_zcu106.h
include/configs/xilinx_zynqmp_zcu111.h

index dfd6097b4beb9791a9a1fa39996734df1add7102..acc68251be94275d37eda634164bb863f2b42082 100644 (file)
@@ -17,9 +17,6 @@
 
 #define ARASAN_NAND_BASEADDR   0xFF100000
 
-#define ZYNQMP_USB0_XHCI_BASEADDR      0xFE200000
-#define ZYNQMP_USB1_XHCI_BASEADDR      0xFE300000
-
 #define ZYNQMP_TCM_BASE_ADDR   0xFFE00000
 #define ZYNQMP_TCM_SIZE                0x40000
 
index 57c0d93aa1bc86ed8fff26112ca97622e8eae39f..e41fec32df3176c0440788378324868c92724d5d 100644 (file)
@@ -548,49 +548,3 @@ int checkboard(void)
        puts("Board: Xilinx ZynqMP\n");
        return 0;
 }
-
-#ifdef CONFIG_USB_DWC3
-static struct dwc3_device dwc3_device_data0 = {
-       .maximum_speed = USB_SPEED_HIGH,
-       .base = ZYNQMP_USB0_XHCI_BASEADDR,
-       .dr_mode = USB_DR_MODE_PERIPHERAL,
-       .index = 0,
-};
-
-static struct dwc3_device dwc3_device_data1 = {
-       .maximum_speed = USB_SPEED_HIGH,
-       .base = ZYNQMP_USB1_XHCI_BASEADDR,
-       .dr_mode = USB_DR_MODE_PERIPHERAL,
-       .index = 1,
-};
-
-int usb_gadget_handle_interrupts(int index)
-{
-       dwc3_uboot_handle_interrupt(index);
-       return 0;
-}
-
-int board_usb_init(int index, enum usb_init_type init)
-{
-       debug("%s: index %x\n", __func__, index);
-
-#if defined(CONFIG_USB_GADGET_DOWNLOAD)
-       g_dnl_set_serialnumber(CONFIG_SYS_CONFIG_NAME);
-#endif
-
-       switch (index) {
-       case 0:
-               return dwc3_uboot_init(&dwc3_device_data0);
-       case 1:
-               return dwc3_uboot_init(&dwc3_device_data1);
-       };
-
-       return -1;
-}
-
-int board_usb_cleanup(int index, enum usb_init_type init)
-{
-       dwc3_uboot_exit(index);
-       return 0;
-}
-#endif
index 3aa39306520f8d9d152843efd54697ad5e0cb7ef..f5a33342fa64164836c1e42f1479123d367c35a4 100644 (file)
@@ -83,6 +83,7 @@ CONFIG_USB_XHCI_DWC3=y
 CONFIG_USB_XHCI_ZYNQMP=y
 CONFIG_USB_DWC3=y
 CONFIG_USB_DWC3_GADGET=y
+CONFIG_USB_DWC3_GENERIC=y
 CONFIG_USB_ULPI_VIEWPORT=y
 CONFIG_USB_ULPI=y
 CONFIG_USB_STORAGE=y
index 1bd52ab791242f096ae0c4debb4f3a48f1926617..7f7ee558ee7ef25d14e8d826004ec263c142581d 100644 (file)
@@ -79,6 +79,7 @@ CONFIG_USB_XHCI_DWC3=y
 CONFIG_USB_XHCI_ZYNQMP=y
 CONFIG_USB_DWC3=y
 CONFIG_USB_DWC3_GADGET=y
+CONFIG_USB_DWC3_GENERIC=y
 CONFIG_USB_ULPI_VIEWPORT=y
 CONFIG_USB_ULPI=y
 CONFIG_USB_STORAGE=y
index e1e7d22a3a6292cb5856ce710c4547bdf3c24279..2add3bafe278997ac01a0ff86f126359f5395346 100644 (file)
@@ -75,6 +75,7 @@ CONFIG_USB_XHCI_DWC3=y
 CONFIG_USB_XHCI_ZYNQMP=y
 CONFIG_USB_DWC3=y
 CONFIG_USB_DWC3_GADGET=y
+CONFIG_USB_DWC3_GENERIC=y
 CONFIG_USB_ULPI_VIEWPORT=y
 CONFIG_USB_ULPI=y
 CONFIG_USB_STORAGE=y
index 3dd6ae9a0b3b83cf2d58eacc4decc834f23889fa..2a6a5a69cdfef27dce0df69322c5a78667c98c75 100644 (file)
@@ -73,6 +73,7 @@ CONFIG_USB_XHCI_DWC3=y
 CONFIG_USB_XHCI_ZYNQMP=y
 CONFIG_USB_DWC3=y
 CONFIG_USB_DWC3_GADGET=y
+CONFIG_USB_DWC3_GENERIC=y
 CONFIG_USB_ULPI_VIEWPORT=y
 CONFIG_USB_ULPI=y
 CONFIG_USB_STORAGE=y
index 0ddec99866970030b28a5c45743605af67ca9846..4cb3959f3626b655e1baddcfb64009839187b403 100644 (file)
@@ -93,6 +93,7 @@ CONFIG_USB_XHCI_DWC3=y
 CONFIG_USB_XHCI_ZYNQMP=y
 CONFIG_USB_DWC3=y
 CONFIG_USB_DWC3_GADGET=y
+CONFIG_USB_DWC3_GENERIC=y
 CONFIG_USB_ULPI_VIEWPORT=y
 CONFIG_USB_ULPI=y
 CONFIG_USB_STORAGE=y
index 94dc62a61643a229aa34ce33488acd057fd39088..e989d1635c3092ee361f97811ce8a7c7161d59dd 100644 (file)
@@ -91,6 +91,7 @@ CONFIG_USB_XHCI_DWC3=y
 CONFIG_USB_XHCI_ZYNQMP=y
 CONFIG_USB_DWC3=y
 CONFIG_USB_DWC3_GADGET=y
+CONFIG_USB_DWC3_GENERIC=y
 CONFIG_USB_ULPI_VIEWPORT=y
 CONFIG_USB_ULPI=y
 CONFIG_USB_STORAGE=y
index 8889f1909ac08c87607be361dc8c4770d4fcedf6..bd67df904a2df1b7371896af379a3e72f7f8101a 100644 (file)
@@ -91,6 +91,7 @@ CONFIG_USB_XHCI_DWC3=y
 CONFIG_USB_XHCI_ZYNQMP=y
 CONFIG_USB_DWC3=y
 CONFIG_USB_DWC3_GADGET=y
+CONFIG_USB_DWC3_GENERIC=y
 CONFIG_USB_ULPI_VIEWPORT=y
 CONFIG_USB_ULPI=y
 CONFIG_USB_STORAGE=y
index 3d3d941d375c379a2ef8a03f8ea90b34c7a37834..a76b9cf546226e0fea216012e78bf82111a4b617 100644 (file)
@@ -84,6 +84,7 @@ CONFIG_USB_XHCI_DWC3=y
 CONFIG_USB_XHCI_ZYNQMP=y
 CONFIG_USB_DWC3=y
 CONFIG_USB_DWC3_GADGET=y
+CONFIG_USB_DWC3_GENERIC=y
 CONFIG_USB_ULPI_VIEWPORT=y
 CONFIG_USB_ULPI=y
 CONFIG_USB_STORAGE=y
index 7c22d7f020ed29bd5f425f85361794760c93ec03..dcd4897f2fbd809081614a6ce0dae56d830cc07c 100644 (file)
@@ -84,6 +84,7 @@ CONFIG_USB_XHCI_DWC3=y
 CONFIG_USB_XHCI_ZYNQMP=y
 CONFIG_USB_DWC3=y
 CONFIG_USB_DWC3_GADGET=y
+CONFIG_USB_DWC3_GENERIC=y
 CONFIG_USB_ULPI_VIEWPORT=y
 CONFIG_USB_ULPI=y
 CONFIG_USB_STORAGE=y
index 017940e983616848c6c3a17cea864b66bb8d041b..a5fa33e366aec95201cca465f6271366cd92cf8c 100644 (file)
@@ -90,6 +90,7 @@ CONFIG_USB_XHCI_DWC3=y
 CONFIG_USB_XHCI_ZYNQMP=y
 CONFIG_USB_DWC3=y
 CONFIG_USB_DWC3_GADGET=y
+CONFIG_USB_DWC3_GENERIC=y
 CONFIG_USB_ULPI_VIEWPORT=y
 CONFIG_USB_ULPI=y
 CONFIG_USB_STORAGE=y
index 028a7b53284473a602df794084d637c80c885d1e..4d9b9156352321c92649b7cbda2316e1d4498cba 100644 (file)
@@ -84,6 +84,7 @@ CONFIG_USB_XHCI_DWC3=y
 CONFIG_USB_XHCI_ZYNQMP=y
 CONFIG_USB_DWC3=y
 CONFIG_USB_DWC3_GADGET=y
+CONFIG_USB_DWC3_GENERIC=y
 CONFIG_USB_ULPI_VIEWPORT=y
 CONFIG_USB_ULPI=y
 CONFIG_USB_STORAGE=y
index 852c2238de4abdeea884a87873e06898a1ea4ff5..f0ab3f1592225a289fc12f44e83c8dd8dda8f237 100644 (file)
@@ -11,7 +11,6 @@
 
 #define CONFIG_ZYNQ_SDHCI0
 #define CONFIG_ZYNQ_SDHCI1
-#define CONFIG_ZYNQMP_XHCI_LIST {ZYNQMP_USB0_XHCI_BASEADDR}
 
 #include <configs/xilinx_zynqmp.h>
 
index 2533ab860906b1445bf769f8e10304f81f998a76..bfebbb3cd19763d2b8087ac3036e5e258f5f19ed 100644 (file)
@@ -9,8 +9,6 @@
 #ifndef __CONFIG_ZYNQMP_ZC1751_XM016_DC2_H
 #define __CONFIG_ZYNQMP_ZC1751_XM016_DC2_H
 
-#define CONFIG_ZYNQMP_XHCI_LIST {ZYNQMP_USB1_XHCI_BASEADDR}
-
 #include <configs/xilinx_zynqmp.h>
 
 #endif /* __CONFIG_ZYNQMP_ZC1751_XM016_DC2_H */
index f7d4ab2800c99e942a4ba299eaf0b84d5a01776b..bd4a0c3178b87242ef7a915b2136f97bec173379 100644 (file)
@@ -11,9 +11,6 @@
 
 #define CONFIG_ZYNQ_SDHCI1
 
-#define CONFIG_ZYNQMP_XHCI_LIST {ZYNQMP_USB0_XHCI_BASEADDR, \
-                                ZYNQMP_USB1_XHCI_BASEADDR}
-
 #include <configs/xilinx_zynqmp.h>
 
 #endif /* __CONFIG_ZYNQMP_ZC1751_XM017_DC3_H */
index 029347da479ca33bfc638b8696f4de2f574516d2..b65d0c1cddd29d629d537daa94b6de29962a64f8 100644 (file)
@@ -24,9 +24,6 @@
                                {0, {{I2C_MUX_PCA9548, 0x75, 7} } }, \
                                }
 
-#define CONFIG_ZYNQMP_XHCI_LIST {ZYNQMP_USB0_XHCI_BASEADDR, \
-                                ZYNQMP_USB1_XHCI_BASEADDR}
-
 #define CONFIG_USB_HOST_ETHER
 #define CONFIG_USB_ETHER_ASIX
 
index c61e1b5e27c28495d7aad0172b22f122d3430a7f..ca11b97c7c4c11c491c9223d1d1e98621369a758 100644 (file)
@@ -35,8 +35,6 @@
 
 #define CONFIG_PCA953X
 
-#define CONFIG_ZYNQMP_XHCI_LIST {ZYNQMP_USB0_XHCI_BASEADDR}
-
 #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1
 #define CONFIG_ZYNQ_EEPROM_BUS         5
 #define CONFIG_ZYNQ_GEM_EEPROM_ADDR    0x54
index 8d417f45e014668676440d1022d36fc3568723b8..7e3b9ad7058b637996f5010123cd72e15e72bd53 100644 (file)
@@ -26,8 +26,6 @@
 
 #define CONFIG_PCA953X
 
-#define CONFIG_ZYNQMP_XHCI_LIST {ZYNQMP_USB0_XHCI_BASEADDR}
-
 #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1
 
 #include <configs/xilinx_zynqmp.h>
index 01ac12a53c178b9705d9ebd84c8d2c5798e42687..cc2d145ddd9435bdf2914bac2cff40078b4eb8d4 100644 (file)
@@ -35,8 +35,6 @@
 
 #define CONFIG_PCA953X
 
-#define CONFIG_ZYNQMP_XHCI_LIST {ZYNQMP_USB0_XHCI_BASEADDR}
-
 #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1
 #define CONFIG_ZYNQ_EEPROM_BUS         5
 #define CONFIG_ZYNQ_GEM_EEPROM_ADDR    0x54
index 3233b379798d1751f27963737ad569a21b779895..8f8cb4f087079ce41c8c8c3ea9d7f09be04f4c2c 100644 (file)
@@ -38,8 +38,6 @@
 
 #define CONFIG_PCA953X
 
-#define CONFIG_ZYNQMP_XHCI_LIST {ZYNQMP_USB0_XHCI_BASEADDR}
-
 #define CONFIG_SYS_I2C_EEPROM_ADDR_LEN 1
 #define CONFIG_ZYNQ_EEPROM_BUS         5
 #define CONFIG_ZYNQ_GEM_EEPROM_ADDR    0x54