On Tue, 10 Mar 2020 at 21:04, Guenter Roeck <li...@roeck-us.net> 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 <li...@roeck-us.net>
> ---
> 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

Reply via email to