diff options
author | Bin Meng <bmeng.cn@gmail.com> | 2017-07-19 21:50:05 +0800 |
---|---|---|
committer | Marek Vasut <marex@denx.de> | 2017-07-28 23:34:23 +0200 |
commit | 99c225568890df8fd224a4944d98599a5b2b721d (patch) | |
tree | f362a579736cc96a4cb0b51fc60fd7c34b765dcb /drivers/usb/host/ehci.h | |
parent | 29313428744112ad8f601c86e29440a386aa6543 (diff) | |
download | u-boot-99c225568890df8fd224a4944d98599a5b2b721d.tar.gz |
usb: ehci: Get rid of CONFIG_SYS_USB_EHCI_MAX_ROOT_PORTS
EHC reports supported maximum number of ports in the HCSPARAMS
register, so it's unnecessary to use a hardcoded config option
CONFIG_SYS_USB_EHCI_MAX_ROOT_PORTS.
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Stefan Roese <sr@denx.de>
Tested-by: Stefan Roese <sr@denx.de>
Diffstat (limited to 'drivers/usb/host/ehci.h')
-rw-r--r-- | drivers/usb/host/ehci.h | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/usb/host/ehci.h b/drivers/usb/host/ehci.h index 2ab830df51..7c39becd24 100644 --- a/drivers/usb/host/ehci.h +++ b/drivers/usb/host/ehci.h @@ -11,9 +11,8 @@ #include <usb.h> -#if !defined(CONFIG_SYS_USB_EHCI_MAX_ROOT_PORTS) -#define CONFIG_SYS_USB_EHCI_MAX_ROOT_PORTS 2 -#endif +/* Section 2.2.3 - N_PORTS */ +#define MAX_HC_PORTS 15 /* * Register Space. @@ -62,7 +61,7 @@ struct ehci_hcor { uint32_t _reserved_1_[6]; uint32_t or_configflag; #define FLAG_CF (1 << 0) /* true: we'll support "high speed" */ - uint32_t or_portsc[CONFIG_SYS_USB_EHCI_MAX_ROOT_PORTS]; + uint32_t or_portsc[MAX_HC_PORTS]; #define PORTSC_PSPD(x) (((x) >> 26) & 0x3) #define PORTSC_PSPD_FS 0x0 #define PORTSC_PSPD_LS 0x1 |