
Hi Marek,
On Sat, Jul 3, 2021 at 10:04 PM Marek Vasut marex@denx.de wrote:
Retrieving the USB base addresses from DT would be preferred, yes, but the current code does not do that.
I implemented exactly that in mx6_parse_dt_addrs() , see: 4dcfa3bcbcb ("usb: ehci-mx6: Parse USB PHY and MISC offsets from DT")
We are talking about USB_BASE_ADDR, right?
imx6/imx7/imxrt provide the USB_BASE_ADDR as define.
If we remove the imx6 definition from arch/arm/include/asm/arch-mx6/imx-regs.h the ehci-mx6: driver fails to build.
I didn't want to change ehci-mx6 in this aspect, so that's why I used Frieder's patch that passes USB_BASE_ADDR via define for i.MX8MM too.
Is this an acceptable solution?
Without providing these defines:
drivers/usb/host/ehci-mx6.c:254:62: error: ‘USB_BASE_ADDR’ undeclared (first use in this function); did you mean ‘SRC_BASE_ADDR’? 254 | struct usbnc_regs *usbnc = (struct usbnc_regs *)(uintptr_t)(USB_BASE_ADDR +
I suspect you need CONFIG_PHY for mx8m .
CONFIG_PHY is already selected by imx8mm_evk_defconfig.
Thanks,
Fabio Estevam