[U-Boot] [PATCH 2/5] imx:mx6slevk add usb support

Fabio Estevam festevam at gmail.com
Sat Nov 1 14:44:15 CET 2014


On Sat, Nov 1, 2014 at 12:19 AM, Peng Fan <Peng.Fan at freescale.com> wrote:

>  }
> +
> +#ifdef CONFIG_USB_EHCI_MX6
> +iomux_v3_cfg_t const usb_otg1_pads[] = {
> +       MX6_PAD_KEY_COL4__USB_USBOTG1_PWR | MUX_PAD_CTRL(NO_PAD_CTRL),


This can be 'static'.

> +int board_ehci_hcd_init(int port)
> +{
> +       switch (port) {
> +       case 0:
> +               imx_iomux_v3_setup_multiple_pads(usb_otg1_pads,
> +                                                ARRAY_SIZE(usb_otg1_pads));
> +               break;
> +       case 1:
> +               imx_iomux_v3_setup_multiple_pads(usb_otg2_pads,
> +                                                ARRAY_SIZE(usb_otg2_pads));
> +               break;
> +       default:
> +               printf("MXC USB port %d not yet supported\n", port);
> +               return 1;

It would be better to return -EINVAL instead.


More information about the U-Boot mailing list