mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-24 21:54:01 +00:00
board: colibri_imx7: fix usb start on solo
This fixes the following crash when run on a Colibri iMX7S aka solo: Colibri iMX7 # usb start starting USB... Bus usb@30b10000: USB EHCI 1.00 Bus usb@30b20000: The i.MX 7Solo has only one single USB OTG1 but no USB host port. Trying to initialize the nonexisting port just crashes. While at it also drop board_usb_phy_mode() which is also no longer used in the driver model age. Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
This commit is contained in:
parent
dbc5633963
commit
4625ff6521
2 changed files with 8 additions and 31 deletions
|
@ -319,42 +319,18 @@ int ft_board_setup(void *blob, struct bd_info *bd)
|
|||
#endif
|
||||
|
||||
#ifdef CONFIG_USB_EHCI_MX7
|
||||
static iomux_v3_cfg_t const usb_otg2_pads[] = {
|
||||
MX7D_PAD_UART3_CTS_B__USB_OTG2_PWR | MUX_PAD_CTRL(NO_PAD_CTRL),
|
||||
};
|
||||
|
||||
int board_ehci_hcd_init(int port)
|
||||
int board_fix_fdt(void *rw_fdt_blob)
|
||||
{
|
||||
switch (port) {
|
||||
case 0:
|
||||
break;
|
||||
case 1:
|
||||
if (is_cpu_type(MXC_CPU_MX7S))
|
||||
return -ENODEV;
|
||||
/* i.MX 7Solo has only one single USB OTG1 but no USB host port */
|
||||
if (is_cpu_type(MXC_CPU_MX7S)) {
|
||||
int offset = fdt_path_offset(rw_fdt_blob, "/soc/bus@30800000/usb@30b20000");
|
||||
|
||||
imx_iomux_v3_setup_multiple_pads(usb_otg2_pads,
|
||||
ARRAY_SIZE(usb_otg2_pads));
|
||||
break;
|
||||
default:
|
||||
return -EINVAL;
|
||||
return fdt_status_disabled(rw_fdt_blob, offset);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int board_usb_phy_mode(int port)
|
||||
{
|
||||
switch (port) {
|
||||
case 0:
|
||||
if (gpio_get_value(USB_CDET_GPIO))
|
||||
return USB_INIT_DEVICE;
|
||||
else
|
||||
return USB_INIT_HOST;
|
||||
case 1:
|
||||
default:
|
||||
return USB_INIT_HOST;
|
||||
}
|
||||
}
|
||||
|
||||
#if defined(CONFIG_BOARD_LATE_INIT)
|
||||
int board_late_init(void)
|
||||
{
|
||||
|
@ -373,4 +349,4 @@ int board_late_init(void)
|
|||
}
|
||||
#endif /* CONFIG_BOARD_LATE_INIT */
|
||||
|
||||
#endif
|
||||
#endif /* CONFIG_USB_EHCI_MX7 */
|
||||
|
|
|
@ -10,6 +10,7 @@ CONFIG_TARGET_COLIBRI_IMX7=y
|
|||
CONFIG_IMX_RDC=y
|
||||
CONFIG_IMX_BOOTAUX=y
|
||||
CONFIG_IMX_HAB=y
|
||||
CONFIG_OF_BOARD_FIXUP=y
|
||||
CONFIG_SYS_MEMTEST_START=0x80000000
|
||||
CONFIG_SYS_MEMTEST_END=0x8c000000
|
||||
CONFIG_DISTRO_DEFAULTS=y
|
||||
|
|
Loading…
Reference in a new issue