[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 2/3] hw/arm/fsl-imx6ul: Wire up USB controllers
From: |
Peter Maydell |
Subject: |
Re: [PATCH v2 2/3] hw/arm/fsl-imx6ul: Wire up USB controllers |
Date: |
Thu, 12 Mar 2020 13:19:41 +0000 |
On Tue, 10 Mar 2020 at 21:04, Guenter Roeck <address@hidden> wrote:
>
> IMX6UL USB controllers are quite similar to IMX7 USB controllers.
> Wire them up the same way.
>
> The only real difference is that wiring up phy devices is necessary
> to avoid phy reset timeouts in the Linux kernel.
>
> Signed-off-by: Guenter Roeck <address@hidden>
> ---
> v2: Use USB PHY emulation
>
> hw/arm/fsl-imx6ul.c | 33 +++++++++++++++++++++++++++++++++
> include/hw/arm/fsl-imx6ul.h | 9 +++++++++
> 2 files changed, 42 insertions(+)
>
> diff --git a/hw/arm/fsl-imx6ul.c b/hw/arm/fsl-imx6ul.c
> @@ -456,6 +467,28 @@ static void fsl_imx6ul_realize(DeviceState *dev, Error
> **errp)
> FSL_IMX6UL_ENETn_TIMER_IRQ[i]));
> }
>
> + /* USB */
> + for (i = 0; i < FSL_IMX6UL_NUM_USBS; i++) {
> + static const int FSL_IMX6UL_USBn_IRQ[] = {
> + FSL_IMX6UL_USB2_IRQ,
> + FSL_IMX6UL_USB1_IRQ,
> + };
Do we really want to wire up USB1 to USB2_IRQ and USB2 to USB1_IRQ ?
If so, a comment explaining that it is deliberate would be useful.
Side note: not used here, but in the header file we define:
FSL_IMX6UL_USB1_IRQ = 42,
FSL_IMX6UL_USB2_IRQ = 43,
FSL_IMX6UL_USB_PHY1_IRQ = 44,
FSL_IMX6UL_USB_PHY2_IRQ = 44,
Is that last one correct, or a cut-n-paste error that should be "45" ?
thanks
-- PMM
[PATCH v2 1/3] hw/usb: Add basic i.MX USB Phy support, Guenter Roeck, 2020/03/10
[PATCH v2 3/3] hw/arm/fsl-imx6: Wire up USB controllers, Guenter Roeck, 2020/03/10
Re: [PATCH v2 0/3] Wire up USB controllers in i.MX6 emulations, no-reply, 2020/03/10