arm: usb: dra7xx: xHCI registers based on USB port index
authorUri Mashiach <uri.mashiach@compulab.co.il>
Thu, 23 Feb 2017 13:39:36 +0000 (15:39 +0200)
committerTom Rini <trini@konsulko.com>
Mon, 8 May 2017 15:38:36 +0000 (11:38 -0400)
Modify the determination of the base address of xHCI registers of DRA7XX
targets.
Before the commit: by the target.
After the commit: by the USB port index.

Cc: Lokesh Vutla <lokeshvutla@ti.com>
Cc: Marek Vasut <marex@denx.de>
Cc: Roger Quadros <rogerq@ti.com>
Signed-off-by: Uri Mashiach <uri.mashiach@compulab.co.il>
Reviewed-by: Marek Vasut <marex@denx.de>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Roger Quadros <rogerq@ti.com>
Acked-by: Marek Vasut <marex@denx.de>
Acked-by: Marek Vasut <marex@denx.de>
configs/dra7xx_evm_defconfig
configs/dra7xx_hs_evm_defconfig
drivers/usb/host/Kconfig
include/linux/usb/xhci-omap.h

index 462e6ff4082298af9a0342cc89fbd25811b90d3e..b52885c12a6dd8a2dd3a45c31b5112daa1f7047d 100644 (file)
@@ -91,6 +91,7 @@ CONFIG_OMAP_TIMER=y
 CONFIG_USB=y
 CONFIG_USB_XHCI_HCD=y
 CONFIG_USB_XHCI_DWC3=y
+CONFIG_USB_XHCI_DRA7XX_INDEX=1
 CONFIG_USB_DWC3=y
 CONFIG_USB_DWC3_GADGET=y
 CONFIG_USB_DWC3_OMAP=y
index a348878342bcb6733f17a43ed24bdf3ca1cdd759..885ecae637d012f47d0642a98e7cb35b9c68ed0e 100644 (file)
@@ -96,6 +96,7 @@ CONFIG_OMAP_TIMER=y
 CONFIG_USB=y
 CONFIG_USB_XHCI_HCD=y
 CONFIG_USB_XHCI_DWC3=y
+CONFIG_USB_XHCI_DRA7XX_INDEX=1
 CONFIG_USB_DWC3=y
 CONFIG_USB_DWC3_GADGET=y
 CONFIG_USB_DWC3_OMAP=y
index 0bf8274405f1e097a275941d343229272b06bb04..fb5aa6f889189048edb2cb53c5149eb0be9ceec2 100644 (file)
@@ -44,6 +44,15 @@ config USB_XHCI_ZYNQMP
        help
          Enables support for the on-chip xHCI controller on Xilinx ZynqMP SoCs.
 
+config USB_XHCI_DRA7XX_INDEX
+       int "DRA7XX xHCI USB index"
+       range 0 1
+       default 0
+       depends on DRA7XX
+       help
+         Select the DRA7XX xHCI USB index.
+         Current supported values: 0, 1.
+
 endif # USB_XHCI_HCD
 
 config USB_EHCI_HCD
index 9de80d738ecde805b645fefef409537b48556d51..f038ddb66932cb53016f6cd475be0ca7c940f3bb 100644 (file)
 #ifndef _ASM_ARCH_XHCI_OMAP_H_
 #define _ASM_ARCH_XHCI_OMAP_H_
 
-#ifdef CONFIG_TARGET_DRA7XX_EVM
+#ifdef CONFIG_DRA7XX
+#if CONFIG_USB_XHCI_DRA7XX_INDEX == 1
 #define OMAP_XHCI_BASE 0x488d0000
 #define OMAP_OCP1_SCP_BASE 0x4A081000
 #define OMAP_OTG_WRAPPER_BASE 0x488c0000
-#elif defined CONFIG_TARGET_AM57XX_EVM
+#elif CONFIG_USB_XHCI_DRA7XX_INDEX == 0
 #define OMAP_XHCI_BASE 0x48890000
 #define OMAP_OCP1_SCP_BASE 0x4A084c00
 #define OMAP_OTG_WRAPPER_BASE 0x48880000
+#endif /* CONFIG_USB_XHCI_DRA7XX_INDEX == 1 */
 #elif defined CONFIG_AM43XX
 #define OMAP_XHCI_BASE 0x483d0000
 #define OMAP_OCP1_SCP_BASE 0x483E8000