summaryrefslogtreecommitdiff
path: root/drivers/usb
diff options
context:
space:
mode:
authorSamuel Holland <samuel@sholland.org>2022-10-31 07:15:12 +0300
committerMarek Vasut <marex@denx.de>2022-11-04 01:24:09 +0300
commitf4917b4933458a5e5c6da7e6e2e74137e62cf596 (patch)
treeb4cdaf2ee7d58e0e02fe015af3d134457c3e46bd /drivers/usb
parent36bc9b6113ca96ca5c0d821195adede38395befd (diff)
downloadu-boot-f4917b4933458a5e5c6da7e6e2e74137e62cf596.tar.xz
usb: ohci: Use a flexible array member for portstatus
The struct is only used to overlay the MMIO region, so the behavior is the same. This obsoletes the Kconfig option for the number of ports. Signed-off-by: Samuel Holland <samuel@sholland.org>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/host/Kconfig5
-rw-r--r--drivers/usb/host/ohci.h10
2 files changed, 1 insertions, 14 deletions
diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig
index 1aabe062fb..4efdd708c2 100644
--- a/drivers/usb/host/Kconfig
+++ b/drivers/usb/host/Kconfig
@@ -365,11 +365,6 @@ config SYS_USB_OHCI_SLOT_NAME
string "Display name for the OHCI controller"
depends on USB_OHCI_NEW && !DM_USB
-config SYS_USB_OHCI_MAX_ROOT_PORTS
- int "Maximal number of ports of the root hub"
- depends on USB_OHCI_NEW
- default 1 if ARCH_SUNXI
-
config SYS_OHCI_SWAP_REG_ACCESS
bool "Perform byte swapping on OHCI controller register accesses"
depends on USB_OHCI_NEW
diff --git a/drivers/usb/host/ohci.h b/drivers/usb/host/ohci.h
index 7699f2e6b1..87ef19074b 100644
--- a/drivers/usb/host/ohci.h
+++ b/drivers/usb/host/ohci.h
@@ -146,14 +146,6 @@ struct ohci_hcca {
u8 reserved_for_hc[116];
} __attribute__((aligned(256)));
-
-/*
- * Maximum number of root hub ports.
- */
-#ifndef CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS
-#define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS 1
-#endif
-
/*
* This is the structure of the OHCI controller's memory mapped I/O
* region. This is Memory Mapped I/O. You must use the ohci_readl() and
@@ -186,7 +178,7 @@ struct ohci_regs {
__u32 a;
__u32 b;
__u32 status;
- __u32 portstatus[CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS];
+ __u32 portstatus[];
} roothub;
} __attribute__((aligned(32)));