usb: dwc2_udc_otg: Read MAX_HW_ENDPOINT from HWCFG4 register
authorPatrick Delaunay <patrick.delaunay@st.com>
Fri, 29 Mar 2019 14:42:19 +0000 (15:42 +0100)
committerMarek Vasut <marex@denx.de>
Sun, 21 Apr 2019 08:26:52 +0000 (10:26 +0200)
commit5bd97e80730bdda59656ca927d67d62fb2a4ecb6
tree38c08b8374b88914e318ca47b3a0125b9ee1752a
parent2d76160f049c42087011cfa0e6e878aa2ed6b406
usb: dwc2_udc_otg: Read MAX_HW_ENDPOINT from HWCFG4 register

Some DWC2 ip variant doesn't use 16 hardware endpoint as hardcoded
in the driver. Bits INEps [29:26] of HWCFG4 register allows to get
this information.

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Reviewed-by: Lukasz Majewski <lukma@denx.de>
drivers/usb/gadget/dwc2_udc_otg.c
drivers/usb/gadget/dwc2_udc_otg_priv.h
drivers/usb/gadget/dwc2_udc_otg_regs.h