From 4a271cb1b4ffdf33073c0dc8ee1e185c037275f4 Mon Sep 17 00:00:00 2001 From: Julius Werner Date: Sat, 14 Sep 2013 14:02:52 +0530 Subject: exynos: usb: Switch USB VBUS GPIOs to be device tree configured Some Exynos boards, such as the SMDK5250, control USB port power through a GPIO pin. For now this had been hardcoded in the exynos5-dt board file, but not all boards use the same pin, requiring local changes to support different boards. This patch moves the GPIO initialization into the USB host controller drivers which they belong to, and uses the samsung,vbus-gpio parameter in the device tree to configure it. Signed-off-by: Julius Werner Signed-off-by: Vivek Gautam Cc: Simon Glass Cc: Minkyu Kang Cc: Marek Vasut --- board/samsung/smdk5250/exynos5-dt.c | 19 ------------------- 1 file changed, 19 deletions(-) (limited to 'board') diff --git a/board/samsung/smdk5250/exynos5-dt.c b/board/samsung/smdk5250/exynos5-dt.c index bb4a82f449..6bcc883b10 100644 --- a/board/samsung/smdk5250/exynos5-dt.c +++ b/board/samsung/smdk5250/exynos5-dt.c @@ -61,22 +61,6 @@ struct local_info { static struct local_info local; -#ifdef CONFIG_USB_EHCI_EXYNOS -int board_usb_vbus_init(void) -{ - struct exynos5_gpio_part1 *gpio1 = (struct exynos5_gpio_part1 *) - samsung_get_base_gpio_part1(); - - /* Enable VBUS power switch */ - s5p_gpio_direction_output(&gpio1->x2, 6, 1); - - /* VBUS turn ON time */ - mdelay(3); - - return 0; -} -#endif - #ifdef CONFIG_SOUND_MAX98095 static void board_enable_audio_codec(void) { @@ -122,9 +106,6 @@ int board_init(void) if (board_init_cros_ec_devices(gd->fdt_blob)) return -1; -#ifdef CONFIG_USB_EHCI_EXYNOS - board_usb_vbus_init(); -#endif #ifdef CONFIG_SOUND_MAX98095 board_enable_audio_codec(); #endif -- cgit v1.2.1 From ec89e0a68a72c6fe930637f29bb8dd3fd4835dce Mon Sep 17 00:00:00 2001 From: Julius Werner Date: Sat, 14 Sep 2013 14:02:53 +0530 Subject: exynos: dts: Add USB VBUS GPIOs to the device tree This patch adds a new samsung,vbus-gpio parameter to the device tree, in preparation of replacing the currently hardcoded VBUS GPIO mechanism in exynos5-dt.c with a device tree controlled solution, just as it already exists in the Linux kernel. Signed-off-by: Julius Werner Signed-off-by: Vivek Gautam Cc: Simon Glass Cc: Minkyu Kang Cc: Marek Vasut --- board/samsung/dts/exynos5250-smdk5250.dts | 4 ++++ board/samsung/dts/exynos5250-snow.dts | 8 ++++++++ 2 files changed, 12 insertions(+) (limited to 'board') diff --git a/board/samsung/dts/exynos5250-smdk5250.dts b/board/samsung/dts/exynos5250-smdk5250.dts index b1bba9662e..c4ed3467cb 100644 --- a/board/samsung/dts/exynos5250-smdk5250.dts +++ b/board/samsung/dts/exynos5250-smdk5250.dts @@ -144,4 +144,8 @@ mmc@12230000 { status = "disabled"; }; + + ehci@12110000 { + samsung,vbus-gpio = <&gpio 0xbe 0>; /* X26 */ + }; }; diff --git a/board/samsung/dts/exynos5250-snow.dts b/board/samsung/dts/exynos5250-snow.dts index 12cd67e49c..091cdb9e86 100644 --- a/board/samsung/dts/exynos5250-snow.dts +++ b/board/samsung/dts/exynos5250-snow.dts @@ -109,6 +109,14 @@ status = "disabled"; }; + ehci@12110000 { + samsung,vbus-gpio = <&gpio 0xb1 0>; /* X11 */ + }; + + xhci@12000000 { + samsung,vbus-gpio = <&gpio 0xbf 0>; /* X27 */ + }; + tmu@10060000 { samsung,min-temp = <25>; samsung,max-temp = <125>; -- cgit v1.2.1 From 968055321e7dc215e20c886d1706a3936fe02b22 Mon Sep 17 00:00:00 2001 From: Dan Murphy Date: Mon, 26 Aug 2013 08:54:53 -0500 Subject: OMAP5-uevm: USB: Add xHCI host contoller support Add the call back into the board file for to enable the SMPS10 VBUS regulator. Signed-off-by: Dan Murphy --- board/ti/omap5_uevm/evm.c | 74 ++++++++++++++++++++++++++++++++--------------- 1 file changed, 51 insertions(+), 23 deletions(-) (limited to 'board') diff --git a/board/ti/omap5_uevm/evm.c b/board/ti/omap5_uevm/evm.c index 47063309e5..5fc3473ecc 100644 --- a/board/ti/omap5_uevm/evm.c +++ b/board/ti/omap5_uevm/evm.c @@ -14,7 +14,7 @@ #include "mux_data.h" -#ifdef CONFIG_USB_EHCI +#if defined(CONFIG_USB_EHCI) || defined(CONFIG_USB_XHCI_OMAP) #include #include #include @@ -72,6 +72,35 @@ int board_eth_init(bd_t *bis) return 0; } +#if defined(CONFIG_USB_EHCI) || defined(CONFIG_USB_XHCI_OMAP) +static void enable_host_clocks(void) +{ + int auxclk; + int hs_clk_ctrl_val = (OPTFCLKEN_HSIC60M_P3_CLK | + OPTFCLKEN_HSIC480M_P3_CLK | + OPTFCLKEN_HSIC60M_P2_CLK | + OPTFCLKEN_HSIC480M_P2_CLK | + OPTFCLKEN_UTMI_P3_CLK | OPTFCLKEN_UTMI_P2_CLK); + + /* Enable port 2 and 3 clocks*/ + setbits_le32((*prcm)->cm_l3init_hsusbhost_clkctrl, hs_clk_ctrl_val); + + /* Enable port 2 and 3 usb host ports tll clocks*/ + setbits_le32((*prcm)->cm_l3init_hsusbtll_clkctrl, + (OPTFCLKEN_USB_CH1_CLK_ENABLE | OPTFCLKEN_USB_CH2_CLK_ENABLE)); +#ifdef CONFIG_USB_XHCI_OMAP + /* Enable the USB OTG Super speed clocks */ + setbits_le32((*prcm)->cm_l3init_usb_otg_ss_clkctrl, + (OPTFCLKEN_REFCLK960M | OTG_SS_CLKCTRL_MODULEMODE_HW)); +#endif + + auxclk = readl((*prcm)->scrm_auxclk1); + /* Request auxilary clock */ + auxclk |= AUXCLK_ENABLE_MASK; + writel(auxclk, (*prcm)->scrm_auxclk1); +} +#endif + /** * @brief misc_init_r - Configure EVM board specific configurations * such as power configurations, ethernet initialization as phase2 of @@ -84,6 +113,7 @@ int misc_init_r(void) #ifdef CONFIG_PALMAS_POWER palmas_init_settings(); #endif + return 0; } @@ -129,26 +159,9 @@ static struct omap_usbhs_board_data usbhs_bdata = { .port_mode[2] = OMAP_EHCI_PORT_MODE_HSIC, }; -static void enable_host_clocks(void) -{ - int hs_clk_ctrl_val = (OPTFCLKEN_HSIC60M_P3_CLK | - OPTFCLKEN_HSIC480M_P3_CLK | - OPTFCLKEN_HSIC60M_P2_CLK | - OPTFCLKEN_HSIC480M_P2_CLK | - OPTFCLKEN_UTMI_P3_CLK | OPTFCLKEN_UTMI_P2_CLK); - - /* Enable port 2 and 3 clocks*/ - setbits_le32((*prcm)->cm_l3init_hsusbhost_clkctrl, hs_clk_ctrl_val); - - /* Enable port 2 and 3 usb host ports tll clocks*/ - setbits_le32((*prcm)->cm_l3init_hsusbtll_clkctrl, - (OPTFCLKEN_USB_CH1_CLK_ENABLE | OPTFCLKEN_USB_CH2_CLK_ENABLE)); -} - int ehci_hcd_init(int index, struct ehci_hccr **hccr, struct ehci_hcor **hcor) { int ret; - int auxclk; int reg; uint8_t device_mac[6]; @@ -171,11 +184,6 @@ int ehci_hcd_init(int index, struct ehci_hccr **hccr, struct ehci_hcor **hcor) eth_setenv_enetaddr("usbethaddr", device_mac); } - auxclk = readl((*prcm)->scrm_auxclk1); - /* Request auxilary clock */ - auxclk |= AUXCLK_ENABLE_MASK; - writel(auxclk, (*prcm)->scrm_auxclk1); - ret = omap_ehci_hcd_init(&usbhs_bdata, hccr, hcor); if (ret < 0) { puts("Failed to initialize ehci\n"); @@ -203,3 +211,23 @@ void usb_hub_reset_devices(int port) } } #endif + +#ifdef CONFIG_USB_XHCI_OMAP +/** + * @brief board_usb_init - Configure EVM board specific configurations + * for the LDO's and clocks for the USB blocks. + * + * @return 0 + */ +int board_usb_init(void) +{ + int ret; +#ifdef CONFIG_PALMAS_USB_SS_PWR + ret = palmas_enable_ss_ldo(); +#endif + + enable_host_clocks(); + + return 0; +} +#endif -- cgit v1.2.1 From 7132869d4c9e03180226146b27c8c4266ceab351 Mon Sep 17 00:00:00 2001 From: Troy Kisky Date: Wed, 25 Sep 2013 18:41:16 -0700 Subject: mx6: iomux: add GPR1 defines for use with nitrogen6x Select GPIO1 as the USB OTG ID pin for Nitrogen6x Signed-off-by: Troy Kisky --- board/boundary/nitrogen6x/nitrogen6x.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'board') diff --git a/board/boundary/nitrogen6x/nitrogen6x.c b/board/boundary/nitrogen6x/nitrogen6x.c index 17129081b7..daa3fc8478 100644 --- a/board/boundary/nitrogen6x/nitrogen6x.c +++ b/board/boundary/nitrogen6x/nitrogen6x.c @@ -706,6 +706,13 @@ int overwrite_console(void) int board_init(void) { + struct iomuxc_base_regs *const iomuxc_regs + = (struct iomuxc_base_regs *)IOMUXC_BASE_ADDR; + + clrsetbits_le32(&iomuxc_regs->gpr[1], + IOMUXC_GPR1_OTG_ID_MASK, + IOMUXC_GPR1_OTG_ID_GPIO1); + /* address of boot parameters */ gd->bd->bi_boot_params = PHYS_SDRAM + 0x100; -- cgit v1.2.1 From 08ce074e56a1499e7b3c6a1134904b90d1c6c2e9 Mon Sep 17 00:00:00 2001 From: Troy Kisky Date: Wed, 25 Sep 2013 18:41:17 -0700 Subject: nitrogen6x: add otg usb host/device mode support Signed-off-by: Troy Kisky --- board/boundary/nitrogen6x/nitrogen6x.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'board') diff --git a/board/boundary/nitrogen6x/nitrogen6x.c b/board/boundary/nitrogen6x/nitrogen6x.c index daa3fc8478..53cb8dffd0 100644 --- a/board/boundary/nitrogen6x/nitrogen6x.c +++ b/board/boundary/nitrogen6x/nitrogen6x.c @@ -30,6 +30,7 @@ #include DECLARE_GLOBAL_DATA_PTR; +#define GP_USB_OTG_PWR IMX_GPIO_NR(3, 22) #define UART_PAD_CTRL (PAD_CTL_PUS_100K_UP | \ PAD_CTL_SPEED_MED | PAD_CTL_DSE_40ohm | \ @@ -179,6 +180,14 @@ iomux_v3_cfg_t const enet_pads2[] = { MX6_PAD_RGMII_RX_CTL__RGMII_RX_CTL | MUX_PAD_CTRL(ENET_PAD_CTRL), }; +static iomux_v3_cfg_t const misc_pads[] = { + MX6_PAD_GPIO_1__USB_OTG_ID | MUX_PAD_CTRL(WEAK_PULLUP), + MX6_PAD_KEY_COL4__USBOH3_USBOTG_OC | MUX_PAD_CTRL(WEAK_PULLUP), + MX6_PAD_EIM_D30__USBOH3_USBH1_OC | MUX_PAD_CTRL(WEAK_PULLUP), + /* OTG Power enable */ + MX6_PAD_EIM_D22__GPIO_3_22 | MUX_PAD_CTRL(OUTPUT_40OHM), +}; + /* wl1271 pads on nitrogen6x */ iomux_v3_cfg_t const wl12xx_pads[] = { (MX6_PAD_NANDF_CS1__GPIO_6_14 & ~MUX_PAD_CTRL_MASK) @@ -250,6 +259,15 @@ int board_ehci_hcd_init(int port) return 0; } + +int board_ehci_power(int port, int on) +{ + if (port) + return 0; + gpio_set_value(GP_USB_OTG_PWR, on); + return 0; +} + #endif #ifdef CONFIG_FSL_ESDHC @@ -369,6 +387,11 @@ int board_eth_init(bd_t *bis) free(bus); } #endif + +#ifdef CONFIG_MV_UDC + /* For otg ethernet*/ + usb_eth_initialize(bis); +#endif return 0; } @@ -685,6 +708,7 @@ int board_early_init_f(void) gpio_direction_input(WL12XX_WL_IRQ_GP); gpio_direction_output(WL12XX_WL_ENABLE_GP, 0); gpio_direction_output(WL12XX_BT_ENABLE_GP, 0); + gpio_direction_output(GP_USB_OTG_PWR, 0); /* OTG power off */ imx_iomux_v3_setup_multiple_pads(wl12xx_pads, ARRAY_SIZE(wl12xx_pads)); setup_buttons(); @@ -713,6 +737,8 @@ int board_init(void) IOMUXC_GPR1_OTG_ID_MASK, IOMUXC_GPR1_OTG_ID_GPIO1); + imx_iomux_v3_setup_multiple_pads(misc_pads, ARRAY_SIZE(misc_pads)); + /* address of boot parameters */ gd->bd->bi_boot_params = PHYS_SDRAM + 0x100; -- cgit v1.2.1 From 16297cfb2a20c9d89834cd9e31edac5184a777a1 Mon Sep 17 00:00:00 2001 From: Mateusz Zalega Date: Fri, 4 Oct 2013 19:22:26 +0200 Subject: usb: new board-specific USB init interface This commit unifies board-specific USB initialization implementations under one symbol (usb_board_init), declaration of which is available in usb.h. New API allows selective initialization of USB controllers whenever needed. Signed-off-by: Mateusz Zalega Signed-off-by: Kyungmin Park Reviewed-by: Lukasz Majewski Cc: Marek Vasut Cc: Lukasz Majewski --- board/amcc/canyonlands/canyonlands.c | 5 +++-- board/balloon3/balloon3.c | 7 ++++--- board/compulab/cm_t35/cm_t35.c | 2 +- board/esd/apc405/apc405.c | 8 ++++---- board/esd/pmc440/pmc440.c | 8 ++++---- board/htkw/mcx/mcx.c | 2 +- board/icpdas/lp8x4x/lp8x4x.c | 7 ++++--- board/nvidia/common/board.c | 4 +++- board/samsung/trats/trats.c | 5 +++-- board/technexion/twister/twister.c | 2 +- board/teejet/mt_ventoux/mt_ventoux.c | 2 +- board/ti/beagle/beagle.c | 2 +- board/ti/omap5_uevm/evm.c | 2 +- board/ti/panda/panda.c | 2 +- board/toradex/colibri_pxa270/colibri_pxa270.c | 7 ++++--- board/trizepsiv/conxs.c | 7 ++++--- board/vpac270/vpac270.c | 7 ++++--- 17 files changed, 44 insertions(+), 35 deletions(-) (limited to 'board') diff --git a/board/amcc/canyonlands/canyonlands.c b/board/amcc/canyonlands/canyonlands.c index cc36f4587c..395095e459 100644 --- a/board/amcc/canyonlands/canyonlands.c +++ b/board/amcc/canyonlands/canyonlands.c @@ -16,6 +16,7 @@ #include #include #include +#include extern flash_info_t flash_info[CONFIG_SYS_MAX_FLASH_BANKS]; /* info for FLASH chips */ @@ -188,7 +189,7 @@ int board_early_init_f(void) } #if defined(CONFIG_USB_OHCI_NEW) && defined(CONFIG_SYS_USB_OHCI_BOARD_INIT) -int usb_board_init(void) +int board_usb_init(int index, enum board_usb_init_type init) { struct board_bcsr *bcsr_data = (struct board_bcsr *)CONFIG_SYS_BCSR_BASE; @@ -229,7 +230,7 @@ int usb_board_stop(void) return 0; } -int usb_board_init_fail(void) +int board_usb_cleanup(int index, enum board_usb_init_type init) { return usb_board_stop(); } diff --git a/board/balloon3/balloon3.c b/board/balloon3/balloon3.c index ecbac16d59..19c0e023a0 100644 --- a/board/balloon3/balloon3.c +++ b/board/balloon3/balloon3.c @@ -13,6 +13,7 @@ #include #include #include +#include DECLARE_GLOBAL_DATA_PTR; @@ -59,7 +60,7 @@ void dram_init_banksize(void) } #ifdef CONFIG_CMD_USB -int usb_board_init(void) +int board_usb_init(int index, enum board_usb_init_type init) { writel((readl(UHCHR) | UHCHR_PCPL | UHCHR_PSPL) & ~(UHCHR_SSEP0 | UHCHR_SSEP1 | UHCHR_SSEP2 | UHCHR_SSE), @@ -90,9 +91,9 @@ int usb_board_init(void) return 0; } -void usb_board_init_fail(void) +int board_usb_cleanup(int index, enum board_usb_init_type init) { - return; + return 0; } void usb_board_stop(void) diff --git a/board/compulab/cm_t35/cm_t35.c b/board/compulab/cm_t35/cm_t35.c index 3caa5be845..7626abc02e 100644 --- a/board/compulab/cm_t35/cm_t35.c +++ b/board/compulab/cm_t35/cm_t35.c @@ -591,7 +591,7 @@ int ehci_hcd_init(int index, struct ehci_hccr **hccr, struct ehci_hcor **hcor) twl4030_i2c_write_u8(TWL4030_CHIP_GPIO, offset, 0xC0); udelay(1); - return omap_ehci_hcd_init(&usbhs_bdata, hccr, hcor); + return omap_ehci_hcd_init(index, &usbhs_bdata, hccr, hcor); } int ehci_hcd_stop(void) diff --git a/board/esd/apc405/apc405.c b/board/esd/apc405/apc405.c index f13f088d55..79341f5fdb 100644 --- a/board/esd/apc405/apc405.c +++ b/board/esd/apc405/apc405.c @@ -17,6 +17,7 @@ #include #include #include +#include DECLARE_GLOBAL_DATA_PTR; @@ -428,7 +429,7 @@ void reset_phy(void) } #if defined(CONFIG_USB_OHCI_NEW) && defined(CONFIG_SYS_USB_OHCI_BOARD_INIT) -int usb_board_init(void) +int board_usb_init(int index, enum board_usb_init_type init) { return 0; } @@ -453,9 +454,8 @@ int usb_board_stop(void) return 0; } -int usb_board_init_fail(void) +int board_usb_cleanup(int index, enum board_usb_init_type init) { - usb_board_stop(); - return 0; + return usb_board_stop(); } #endif /* defined(CONFIG_USB_OHCI) && defined(CONFIG_SYS_USB_OHCI_BOARD_INIT) */ diff --git a/board/esd/pmc440/pmc440.c b/board/esd/pmc440/pmc440.c index 549b3b73ce..44b86da380 100644 --- a/board/esd/pmc440/pmc440.c +++ b/board/esd/pmc440/pmc440.c @@ -27,6 +27,7 @@ #endif #include #include +#include #include "fpga.h" #include "pmc440.h" @@ -821,7 +822,7 @@ int bootstrap_eeprom_read (unsigned dev_addr, unsigned offset, } #if defined(CONFIG_USB_OHCI_NEW) && defined(CONFIG_SYS_USB_OHCI_BOARD_INIT) -int usb_board_init(void) +int board_usb_init(int index, enum board_usb_init_type init) { char *act = getenv("usbact"); int i; @@ -845,10 +846,9 @@ int usb_board_stop(void) return 0; } -int usb_board_init_fail(void) +int board_usb_cleanup(int index, enum board_usb_init_type init) { - usb_board_stop(); - return 0; + return usb_board_stop(); } #endif /* defined(CONFIG_USB_OHCI) && defined(CONFIG_SYS_USB_OHCI_BOARD_INIT) */ diff --git a/board/htkw/mcx/mcx.c b/board/htkw/mcx/mcx.c index 653d7ea71d..6f85b47a0f 100644 --- a/board/htkw/mcx/mcx.c +++ b/board/htkw/mcx/mcx.c @@ -42,7 +42,7 @@ static struct omap_usbhs_board_data usbhs_bdata = { int ehci_hcd_init(int index, struct ehci_hccr **hccr, struct ehci_hcor **hcor) { - return omap_ehci_hcd_init(&usbhs_bdata, hccr, hcor); + return omap_ehci_hcd_init(index, &usbhs_bdata, hccr, hcor); } int ehci_hcd_stop(int index) diff --git a/board/icpdas/lp8x4x/lp8x4x.c b/board/icpdas/lp8x4x/lp8x4x.c index 1b68ef332a..a96bed6aaa 100644 --- a/board/icpdas/lp8x4x/lp8x4x.c +++ b/board/icpdas/lp8x4x/lp8x4x.c @@ -15,6 +15,7 @@ #include #include #include +#include DECLARE_GLOBAL_DATA_PTR; @@ -58,7 +59,7 @@ int board_mmc_init(bd_t *bis) #endif #ifdef CONFIG_CMD_USB -int usb_board_init(void) +int board_usb_init(int index, enum board_usb_init_type init) { writel((UHCHR | UHCHR_PCPL | UHCHR_PSPL) & ~(UHCHR_SSEP0 | UHCHR_SSEP1 | UHCHR_SSEP2 | UHCHR_SSE), @@ -89,9 +90,9 @@ int usb_board_init(void) return 0; } -void usb_board_init_fail(void) +int board_usb_cleanup(int index, enum board_usb_init_type init) { - return; + return 0; } void usb_board_stop(void) diff --git a/board/nvidia/common/board.c b/board/nvidia/common/board.c index 126e56e97a..1972527e7d 100644 --- a/board/nvidia/common/board.c +++ b/board/nvidia/common/board.c @@ -32,6 +32,7 @@ #ifdef CONFIG_USB_EHCI_TEGRA #include #include +#include #endif #ifdef CONFIG_TEGRA_MMC #include @@ -153,8 +154,9 @@ int board_init(void) #ifdef CONFIG_USB_EHCI_TEGRA pin_mux_usb(); - board_usb_init(gd->fdt_blob); + usb_process_devicetree(gd->fdt_blob); #endif + #ifdef CONFIG_LCD tegra_lcd_check_next_stage(gd->fdt_blob, 0); #endif diff --git a/board/samsung/trats/trats.c b/board/samsung/trats/trats.c index 7f61d17abb..58d925ff1c 100644 --- a/board/samsung/trats/trats.c +++ b/board/samsung/trats/trats.c @@ -26,6 +26,7 @@ #include #include #include +#include #include #include "setup.h" @@ -495,10 +496,10 @@ struct s3c_plat_otg_data s5pc210_otg_data = { .usb_flags = PHY0_SLEEP, }; -void board_usb_init(void) +int board_usb_init(int index, enum board_usb_init_type init) { debug("USB_udc_probe\n"); - s3c_udc_probe(&s5pc210_otg_data); + return s3c_udc_probe(&s5pc210_otg_data); } #endif diff --git a/board/technexion/twister/twister.c b/board/technexion/twister/twister.c index cd91d8fea0..6f2ff55a12 100644 --- a/board/technexion/twister/twister.c +++ b/board/technexion/twister/twister.c @@ -53,7 +53,7 @@ static struct omap_usbhs_board_data usbhs_bdata = { int ehci_hcd_init(int index, struct ehci_hccr **hccr, struct ehci_hcor **hcor) { - return omap_ehci_hcd_init(&usbhs_bdata, hccr, hcor); + return omap_ehci_hcd_init(index, &usbhs_bdata, hccr, hcor); } int ehci_hcd_stop(int index) diff --git a/board/teejet/mt_ventoux/mt_ventoux.c b/board/teejet/mt_ventoux/mt_ventoux.c index b4e01d1562..df873f52a3 100644 --- a/board/teejet/mt_ventoux/mt_ventoux.c +++ b/board/teejet/mt_ventoux/mt_ventoux.c @@ -104,7 +104,7 @@ static struct omap_usbhs_board_data usbhs_bdata = { int ehci_hcd_init(int index, struct ehci_hccr **hccr, struct ehci_hcor **hcor) { - return omap_ehci_hcd_init(&usbhs_bdata, hccr, hcor); + return omap_ehci_hcd_init(index, &usbhs_bdata, hccr, hcor); } int ehci_hcd_stop(int index) diff --git a/board/ti/beagle/beagle.c b/board/ti/beagle/beagle.c index 62e9beaef3..41fed54fdb 100644 --- a/board/ti/beagle/beagle.c +++ b/board/ti/beagle/beagle.c @@ -523,7 +523,7 @@ static struct omap_usbhs_board_data usbhs_bdata = { int ehci_hcd_init(int index, struct ehci_hccr **hccr, struct ehci_hcor **hcor) { - return omap_ehci_hcd_init(&usbhs_bdata, hccr, hcor); + return omap_ehci_hcd_init(index, &usbhs_bdata, hccr, hcor); } int ehci_hcd_stop(int index) diff --git a/board/ti/omap5_uevm/evm.c b/board/ti/omap5_uevm/evm.c index 5fc3473ecc..228df29b42 100644 --- a/board/ti/omap5_uevm/evm.c +++ b/board/ti/omap5_uevm/evm.c @@ -184,7 +184,7 @@ int ehci_hcd_init(int index, struct ehci_hccr **hccr, struct ehci_hcor **hcor) eth_setenv_enetaddr("usbethaddr", device_mac); } - ret = omap_ehci_hcd_init(&usbhs_bdata, hccr, hcor); + ret = omap_ehci_hcd_init(index, &usbhs_bdata, hccr, hcor); if (ret < 0) { puts("Failed to initialize ehci\n"); return ret; diff --git a/board/ti/panda/panda.c b/board/ti/panda/panda.c index bc3c29220e..3724e816c2 100644 --- a/board/ti/panda/panda.c +++ b/board/ti/panda/panda.c @@ -279,7 +279,7 @@ int ehci_hcd_init(int index, struct ehci_hccr **hccr, struct ehci_hcor **hcor) utmi_clk |= HSUSBHOST_CLKCTRL_CLKSEL_UTMI_P1_MASK; sr32((void *)CM_L3INIT_HSUSBHOST_CLKCTRL, 0, 32, utmi_clk); - ret = omap_ehci_hcd_init(&usbhs_bdata, hccr, hcor); + ret = omap_ehci_hcd_init(index, &usbhs_bdata, hccr, hcor); if (ret < 0) return ret; diff --git a/board/toradex/colibri_pxa270/colibri_pxa270.c b/board/toradex/colibri_pxa270/colibri_pxa270.c index c1e2562348..b70c1e38c8 100644 --- a/board/toradex/colibri_pxa270/colibri_pxa270.c +++ b/board/toradex/colibri_pxa270/colibri_pxa270.c @@ -13,6 +13,7 @@ #include #include #include +#include DECLARE_GLOBAL_DATA_PTR; @@ -39,7 +40,7 @@ int dram_init(void) } #ifdef CONFIG_CMD_USB -int usb_board_init(void) +int board_usb_init(int index, enum board_usb_init_type init) { writel((readl(UHCHR) | UHCHR_PCPL | UHCHR_PSPL) & ~(UHCHR_SSEP0 | UHCHR_SSEP1 | UHCHR_SSEP2 | UHCHR_SSE), @@ -70,9 +71,9 @@ int usb_board_init(void) return 0; } -void usb_board_init_fail(void) +int board_usb_cleanup(int index, enum board_usb_init_type init) { - return; + return 0; } void usb_board_stop(void) diff --git a/board/trizepsiv/conxs.c b/board/trizepsiv/conxs.c index c0c318f328..830d5a86f1 100644 --- a/board/trizepsiv/conxs.c +++ b/board/trizepsiv/conxs.c @@ -21,6 +21,7 @@ #include #include #include +#include DECLARE_GLOBAL_DATA_PTR; @@ -42,7 +43,7 @@ extern struct serial_device serial_stuart_device; * Miscelaneous platform dependent initialisations */ -int usb_board_init(void) +int board_usb_init(int index, enum board_usb_init_type init) { writel((readl(UHCHR) | UHCHR_PCPL | UHCHR_PSPL) & ~(UHCHR_SSEP0 | UHCHR_SSEP1 | UHCHR_SSEP2 | UHCHR_SSE), @@ -69,9 +70,9 @@ int usb_board_init(void) return 0; } -void usb_board_init_fail(void) +int board_usb_cleanup(int index, enum board_usb_init_type init) { - return; + return 0; } void usb_board_stop(void) diff --git a/board/vpac270/vpac270.c b/board/vpac270/vpac270.c index 616736f5c4..fab4636ad9 100644 --- a/board/vpac270/vpac270.c +++ b/board/vpac270/vpac270.c @@ -13,6 +13,7 @@ #include #include #include +#include DECLARE_GLOBAL_DATA_PTR; @@ -66,7 +67,7 @@ int board_mmc_init(bd_t *bis) #endif #ifdef CONFIG_CMD_USB -int usb_board_init(void) +int board_usb_init(int index, enum board_usb_init_type init) { writel((UHCHR | UHCHR_PCPL | UHCHR_PSPL) & ~(UHCHR_SSEP0 | UHCHR_SSEP1 | UHCHR_SSEP2 | UHCHR_SSE), @@ -97,9 +98,9 @@ int usb_board_init(void) return 0; } -void usb_board_init_fail(void) +int board_usb_cleanup(int index, enum board_usb_init_type init) { - return; + return 0; } void usb_board_stop(void) -- cgit v1.2.1 From d6eae7b0b172b3ef31a3f816ce946857f382ac4e Mon Sep 17 00:00:00 2001 From: Lukasz Majewski Date: Tue, 8 Oct 2013 14:30:41 +0200 Subject: usb:g_dnl: Add name parameter to g_dnl_bind_fixup function New parameter, namely *name has been added to g_dnl_bind_fixup(). It is necessary (for compatibility reasons) to assign new USB idProduct and idVendor for different usb functions. Signed-off-by: Lukasz Majewski Cc: Marek Vasut --- board/siemens/common/factoryset.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'board') diff --git a/board/siemens/common/factoryset.c b/board/siemens/common/factoryset.c index eda9141c54..fbe79973e3 100644 --- a/board/siemens/common/factoryset.c +++ b/board/siemens/common/factoryset.c @@ -275,7 +275,7 @@ int factoryset_setenv(void) return ret; } -int g_dnl_bind_fixup(struct usb_device_descriptor *dev) +int g_dnl_bind_fixup(struct usb_device_descriptor *dev, const char *name) { put_unaligned(factory_dat.usb_vendor_id, &dev->idVendor); put_unaligned(factory_dat.usb_product_id, &dev->idProduct); -- cgit v1.2.1 From ce2757b66a040702250845e7887e3503adfd8ce0 Mon Sep 17 00:00:00 2001 From: Lukasz Majewski Date: Tue, 8 Oct 2013 14:30:45 +0200 Subject: samsung:common:thor: Define common Samsung code to handle THOR usb descriptor setup Special, common to Samsung, function for altering usb descriptor's idVendor and idProduct has been added. For compatibility reasons (Win vs Linux) the THOR idProduct must be different than the one for DFU/UMS. Signed-off-by: Lukasz Majewski --- board/samsung/common/Makefile | 1 + board/samsung/common/thor.c | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 board/samsung/common/thor.c (limited to 'board') diff --git a/board/samsung/common/Makefile b/board/samsung/common/Makefile index 9e48a7b6e5..ad7564cddf 100644 --- a/board/samsung/common/Makefile +++ b/board/samsung/common/Makefile @@ -10,6 +10,7 @@ include $(TOPDIR)/config.mk LIB = $(obj)libsamsung.o COBJS-$(CONFIG_SOFT_I2C_MULTI_BUS) += multi_i2c.o +COBJS-$(CONFIG_THOR_FUNCTION) += thor.o SRCS := $(COBJS-y:.o=.c) OBJS := $(addprefix $(obj),$(COBJS-y)) diff --git a/board/samsung/common/thor.c b/board/samsung/common/thor.c new file mode 100644 index 0000000000..1c7630df08 --- /dev/null +++ b/board/samsung/common/thor.c @@ -0,0 +1,21 @@ +/* + * Copyright (C) 2013 Samsung Electronics + * Lukasz Majewski + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +#include +#include + +int g_dnl_bind_fixup(struct usb_device_descriptor *dev, const char *name) +{ + if (!strcmp(name, "usb_dnl_thor")) { + put_unaligned(CONFIG_G_DNL_THOR_VENDOR_NUM, &dev->idVendor); + put_unaligned(CONFIG_G_DNL_THOR_PRODUCT_NUM, &dev->idProduct); + } else { + put_unaligned(CONFIG_G_DNL_VENDOR_NUM, &dev->idVendor); + put_unaligned(CONFIG_G_DNL_PRODUCT_NUM, &dev->idProduct); + } + return 0; +} -- cgit v1.2.1 From b2168211893013925b2d1975276cc9442bae83cb Mon Sep 17 00:00:00 2001 From: Dan Murphy Date: Fri, 11 Oct 2013 12:28:15 -0500 Subject: usb: omap5: Update the board_usb_init api Recent patches declares board_usb_init function prototype for a new usb architecture. Turning on the OMAP_XHCI defines cause a redefinition compiler failure. So update the board_usb_init to the latest prototype. Signed-off-by: Dan Murphy --- board/ti/omap5_uevm/evm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'board') diff --git a/board/ti/omap5_uevm/evm.c b/board/ti/omap5_uevm/evm.c index 228df29b42..6a01200625 100644 --- a/board/ti/omap5_uevm/evm.c +++ b/board/ti/omap5_uevm/evm.c @@ -219,7 +219,7 @@ void usb_hub_reset_devices(int port) * * @return 0 */ -int board_usb_init(void) +int board_usb_init(int index, enum board_usb_init_type init) { int ret; #ifdef CONFIG_PALMAS_USB_SS_PWR -- cgit v1.2.1 From 834e91af432479e3808e9cbd1d38199f724fc5aa Mon Sep 17 00:00:00 2001 From: Dan Murphy Date: Fri, 11 Oct 2013 12:28:17 -0500 Subject: usb: dra7xx: Add support for dra7xx xhci USB host Add the support for the dra7xx xhci usb host. dra7xx does not contain an EHCI controller so the headers can be removed from the board file. The xHCI host on dra7xx is connected to a usb2 phy so need to add support to enable those clocks. Signed-off-by: Dan Murphy --- board/ti/dra7xx/evm.c | 6 ------ board/ti/dra7xx/mux_data.h | 1 + 2 files changed, 1 insertion(+), 6 deletions(-) (limited to 'board') diff --git a/board/ti/dra7xx/evm.c b/board/ti/dra7xx/evm.c index 9a114e2a75..9657c75f23 100644 --- a/board/ti/dra7xx/evm.c +++ b/board/ti/dra7xx/evm.c @@ -17,12 +17,6 @@ #include "mux_data.h" -#ifdef CONFIG_USB_EHCI -#include -#include -#include -#endif - #ifdef CONFIG_DRIVER_TI_CPSW #include #endif diff --git a/board/ti/dra7xx/mux_data.h b/board/ti/dra7xx/mux_data.h index 6965cc57d2..38de9d5a8b 100644 --- a/board/ti/dra7xx/mux_data.h +++ b/board/ti/dra7xx/mux_data.h @@ -61,5 +61,6 @@ const struct pad_conf_entry core_padconf_array_essential[] = { {GPMC_A4, (IEN | PDIS | M1)}, /* QSPI1_CS3 */ {GPMC_CS2, (IEN | PTU | PDIS | M1)}, /* QSPI1_CS0 */ {GPMC_CS3, (IEN | PTU | PDIS | M1)}, /* QSPI1_CS1*/ + {USB2_DRVVBUS, (M0 | IEN | FSC) }, }; #endif /* _MUX_DATA_DRA7XX_H_ */ -- cgit v1.2.1 From ea02b653c20413b41170ebaca141bd3ffbb200c8 Mon Sep 17 00:00:00 2001 From: Dan Murphy Date: Fri, 11 Oct 2013 12:28:19 -0500 Subject: ARM: omap5-evm: Move MAC creation to misc_init Move the MAC creation from the USB init to an function that is called on every boot. This will then populate the usbethaddr mac that kernel driver can pick up from the device tree blob. Signed-off-by: Dan Murphy --- board/ti/omap5_uevm/evm.c | 39 ++++++++++++++++++++------------------- 1 file changed, 20 insertions(+), 19 deletions(-) (limited to 'board') diff --git a/board/ti/omap5_uevm/evm.c b/board/ti/omap5_uevm/evm.c index 6a01200625..0044c229b0 100644 --- a/board/ti/omap5_uevm/evm.c +++ b/board/ti/omap5_uevm/evm.c @@ -110,10 +110,30 @@ static void enable_host_clocks(void) */ int misc_init_r(void) { + int reg; + uint8_t device_mac[6]; + #ifdef CONFIG_PALMAS_POWER palmas_init_settings(); #endif + if (!getenv("usbethaddr")) { + reg = DIE_ID_REG_BASE + DIE_ID_REG_OFFSET; + + /* + * create a fake MAC address from the processor ID code. + * first byte is 0x02 to signify locally administered. + */ + device_mac[0] = 0x02; + device_mac[1] = readl(reg + 0x10) & 0xff; + device_mac[2] = readl(reg + 0xC) & 0xff; + device_mac[3] = readl(reg + 0x8) & 0xff; + device_mac[4] = readl(reg) & 0xff; + device_mac[5] = (readl(reg) >> 8) & 0xff; + + eth_setenv_enetaddr("usbethaddr", device_mac); + } + return 0; } @@ -162,28 +182,9 @@ static struct omap_usbhs_board_data usbhs_bdata = { int ehci_hcd_init(int index, struct ehci_hccr **hccr, struct ehci_hcor **hcor) { int ret; - int reg; - uint8_t device_mac[6]; enable_host_clocks(); - if (!getenv("usbethaddr")) { - reg = DIE_ID_REG_BASE + DIE_ID_REG_OFFSET; - - /* - * create a fake MAC address from the processor ID code. - * first byte is 0x02 to signify locally administered. - */ - device_mac[0] = 0x02; - device_mac[1] = readl(reg + 0x10) & 0xff; - device_mac[2] = readl(reg + 0xC) & 0xff; - device_mac[3] = readl(reg + 0x8) & 0xff; - device_mac[4] = readl(reg) & 0xff; - device_mac[5] = (readl(reg) >> 8) & 0xff; - - eth_setenv_enetaddr("usbethaddr", device_mac); - } - ret = omap_ehci_hcd_init(index, &usbhs_bdata, hccr, hcor); if (ret < 0) { puts("Failed to initialize ehci\n"); -- cgit v1.2.1 From bba679144d25b91bcd7befff5a96728a30875f54 Mon Sep 17 00:00:00 2001 From: Troy Kisky Date: Thu, 10 Oct 2013 15:27:55 -0700 Subject: usb: rename board_usb_init_type to usb_init_type This will be used by usb_lowlevel_init so it will no longer be used by only board specific functions. Move definition of enum usb_init_type higher in file so that it will be available for usb_low_level_init. Signed-off-by: Troy Kisky --- board/amcc/canyonlands/canyonlands.c | 4 ++-- board/balloon3/balloon3.c | 4 ++-- board/esd/apc405/apc405.c | 4 ++-- board/esd/pmc440/pmc440.c | 4 ++-- board/icpdas/lp8x4x/lp8x4x.c | 4 ++-- board/samsung/trats/trats.c | 2 +- board/toradex/colibri_pxa270/colibri_pxa270.c | 4 ++-- board/trizepsiv/conxs.c | 4 ++-- board/vpac270/vpac270.c | 4 ++-- 9 files changed, 17 insertions(+), 17 deletions(-) (limited to 'board') diff --git a/board/amcc/canyonlands/canyonlands.c b/board/amcc/canyonlands/canyonlands.c index 395095e459..2b5f1a62cc 100644 --- a/board/amcc/canyonlands/canyonlands.c +++ b/board/amcc/canyonlands/canyonlands.c @@ -189,7 +189,7 @@ int board_early_init_f(void) } #if defined(CONFIG_USB_OHCI_NEW) && defined(CONFIG_SYS_USB_OHCI_BOARD_INIT) -int board_usb_init(int index, enum board_usb_init_type init) +int board_usb_init(int index, enum usb_init_type init) { struct board_bcsr *bcsr_data = (struct board_bcsr *)CONFIG_SYS_BCSR_BASE; @@ -230,7 +230,7 @@ int usb_board_stop(void) return 0; } -int board_usb_cleanup(int index, enum board_usb_init_type init) +int board_usb_cleanup(int index, enum usb_init_type init) { return usb_board_stop(); } diff --git a/board/balloon3/balloon3.c b/board/balloon3/balloon3.c index 19c0e023a0..04e0574658 100644 --- a/board/balloon3/balloon3.c +++ b/board/balloon3/balloon3.c @@ -60,7 +60,7 @@ void dram_init_banksize(void) } #ifdef CONFIG_CMD_USB -int board_usb_init(int index, enum board_usb_init_type init) +int board_usb_init(int index, enum usb_init_type init) { writel((readl(UHCHR) | UHCHR_PCPL | UHCHR_PSPL) & ~(UHCHR_SSEP0 | UHCHR_SSEP1 | UHCHR_SSEP2 | UHCHR_SSE), @@ -91,7 +91,7 @@ int board_usb_init(int index, enum board_usb_init_type init) return 0; } -int board_usb_cleanup(int index, enum board_usb_init_type init) +int board_usb_cleanup(int index, enum usb_init_type init) { return 0; } diff --git a/board/esd/apc405/apc405.c b/board/esd/apc405/apc405.c index 79341f5fdb..5cc1d0d9d6 100644 --- a/board/esd/apc405/apc405.c +++ b/board/esd/apc405/apc405.c @@ -429,7 +429,7 @@ void reset_phy(void) } #if defined(CONFIG_USB_OHCI_NEW) && defined(CONFIG_SYS_USB_OHCI_BOARD_INIT) -int board_usb_init(int index, enum board_usb_init_type init) +int board_usb_init(int index, enum usb_init_type init) { return 0; } @@ -454,7 +454,7 @@ int usb_board_stop(void) return 0; } -int board_usb_cleanup(int index, enum board_usb_init_type init) +int board_usb_cleanup(int index, enum usb_init_type init) { return usb_board_stop(); } diff --git a/board/esd/pmc440/pmc440.c b/board/esd/pmc440/pmc440.c index 44b86da380..88fc5f77b6 100644 --- a/board/esd/pmc440/pmc440.c +++ b/board/esd/pmc440/pmc440.c @@ -822,7 +822,7 @@ int bootstrap_eeprom_read (unsigned dev_addr, unsigned offset, } #if defined(CONFIG_USB_OHCI_NEW) && defined(CONFIG_SYS_USB_OHCI_BOARD_INIT) -int board_usb_init(int index, enum board_usb_init_type init) +int board_usb_init(int index, enum usb_init_type init) { char *act = getenv("usbact"); int i; @@ -846,7 +846,7 @@ int usb_board_stop(void) return 0; } -int board_usb_cleanup(int index, enum board_usb_init_type init) +int board_usb_cleanup(int index, enum usb_init_type init) { return usb_board_stop(); } diff --git a/board/icpdas/lp8x4x/lp8x4x.c b/board/icpdas/lp8x4x/lp8x4x.c index a96bed6aaa..92dd4ff97a 100644 --- a/board/icpdas/lp8x4x/lp8x4x.c +++ b/board/icpdas/lp8x4x/lp8x4x.c @@ -59,7 +59,7 @@ int board_mmc_init(bd_t *bis) #endif #ifdef CONFIG_CMD_USB -int board_usb_init(int index, enum board_usb_init_type init) +int board_usb_init(int index, enum usb_init_type init) { writel((UHCHR | UHCHR_PCPL | UHCHR_PSPL) & ~(UHCHR_SSEP0 | UHCHR_SSEP1 | UHCHR_SSEP2 | UHCHR_SSE), @@ -90,7 +90,7 @@ int board_usb_init(int index, enum board_usb_init_type init) return 0; } -int board_usb_cleanup(int index, enum board_usb_init_type init) +int board_usb_cleanup(int index, enum usb_init_type init) { return 0; } diff --git a/board/samsung/trats/trats.c b/board/samsung/trats/trats.c index 58d925ff1c..d31d511e39 100644 --- a/board/samsung/trats/trats.c +++ b/board/samsung/trats/trats.c @@ -496,7 +496,7 @@ struct s3c_plat_otg_data s5pc210_otg_data = { .usb_flags = PHY0_SLEEP, }; -int board_usb_init(int index, enum board_usb_init_type init) +int board_usb_init(int index, enum usb_init_type init) { debug("USB_udc_probe\n"); return s3c_udc_probe(&s5pc210_otg_data); diff --git a/board/toradex/colibri_pxa270/colibri_pxa270.c b/board/toradex/colibri_pxa270/colibri_pxa270.c index b70c1e38c8..8d95e4d174 100644 --- a/board/toradex/colibri_pxa270/colibri_pxa270.c +++ b/board/toradex/colibri_pxa270/colibri_pxa270.c @@ -40,7 +40,7 @@ int dram_init(void) } #ifdef CONFIG_CMD_USB -int board_usb_init(int index, enum board_usb_init_type init) +int board_usb_init(int index, enum usb_init_type init) { writel((readl(UHCHR) | UHCHR_PCPL | UHCHR_PSPL) & ~(UHCHR_SSEP0 | UHCHR_SSEP1 | UHCHR_SSEP2 | UHCHR_SSE), @@ -71,7 +71,7 @@ int board_usb_init(int index, enum board_usb_init_type init) return 0; } -int board_usb_cleanup(int index, enum board_usb_init_type init) +int board_usb_cleanup(int index, enum usb_init_type init) { return 0; } diff --git a/board/trizepsiv/conxs.c b/board/trizepsiv/conxs.c index 830d5a86f1..1ddf05dcdd 100644 --- a/board/trizepsiv/conxs.c +++ b/board/trizepsiv/conxs.c @@ -43,7 +43,7 @@ extern struct serial_device serial_stuart_device; * Miscelaneous platform dependent initialisations */ -int board_usb_init(int index, enum board_usb_init_type init) +int board_usb_init(int index, enum usb_init_type init) { writel((readl(UHCHR) | UHCHR_PCPL | UHCHR_PSPL) & ~(UHCHR_SSEP0 | UHCHR_SSEP1 | UHCHR_SSEP2 | UHCHR_SSE), @@ -70,7 +70,7 @@ int board_usb_init(int index, enum board_usb_init_type init) return 0; } -int board_usb_cleanup(int index, enum board_usb_init_type init) +int board_usb_cleanup(int index, enum usb_init_type init) { return 0; } diff --git a/board/vpac270/vpac270.c b/board/vpac270/vpac270.c index fab4636ad9..8d777df846 100644 --- a/board/vpac270/vpac270.c +++ b/board/vpac270/vpac270.c @@ -67,7 +67,7 @@ int board_mmc_init(bd_t *bis) #endif #ifdef CONFIG_CMD_USB -int board_usb_init(int index, enum board_usb_init_type init) +int board_usb_init(int index, enum usb_init_type init) { writel((UHCHR | UHCHR_PCPL | UHCHR_PSPL) & ~(UHCHR_SSEP0 | UHCHR_SSEP1 | UHCHR_SSEP2 | UHCHR_SSE), @@ -98,7 +98,7 @@ int board_usb_init(int index, enum board_usb_init_type init) return 0; } -int board_usb_cleanup(int index, enum board_usb_init_type init) +int board_usb_cleanup(int index, enum usb_init_type init) { return 0; } -- cgit v1.2.1 From 06d513ecb61a6711157707ebe10b968aacc0f2a8 Mon Sep 17 00:00:00 2001 From: Troy Kisky Date: Thu, 10 Oct 2013 15:27:56 -0700 Subject: usb: add enum usb_init_type parameter to usb_lowlevel_init This parameter will later be used to verify OTG ports. Signed-off-by: Troy Kisky --- board/mpl/common/usb_uhci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'board') diff --git a/board/mpl/common/usb_uhci.c b/board/mpl/common/usb_uhci.c index ff7ce828c6..6bbb527dab 100644 --- a/board/mpl/common/usb_uhci.c +++ b/board/mpl/common/usb_uhci.c @@ -584,7 +584,7 @@ void handle_usb_interrupt(void) /* init uhci */ -int usb_lowlevel_init(int index, void **controller) +int usb_lowlevel_init(int index, enum usb_init_type init, void **controller) { unsigned char temp; int busdevfunc; -- cgit v1.2.1 From 127efc4fe8cfc3ed525650b1ccbad9c3402e8d5d Mon Sep 17 00:00:00 2001 From: Troy Kisky Date: Thu, 10 Oct 2013 15:27:57 -0700 Subject: usb: ehci-hcd: add enum usb_init_type parameter to ehci_hcd_init. This paramter will later be used to initialize OTG ports in host or device mode. Signed-off-by: Troy Kisky --- board/compulab/cm_t35/cm_t35.c | 3 ++- board/htkw/mcx/mcx.c | 3 ++- board/technexion/twister/twister.c | 3 ++- board/teejet/mt_ventoux/mt_ventoux.c | 3 ++- board/ti/beagle/beagle.c | 3 ++- board/ti/omap5_uevm/evm.c | 3 ++- board/ti/panda/panda.c | 3 ++- 7 files changed, 14 insertions(+), 7 deletions(-) (limited to 'board') diff --git a/board/compulab/cm_t35/cm_t35.c b/board/compulab/cm_t35/cm_t35.c index 7626abc02e..19945c105e 100644 --- a/board/compulab/cm_t35/cm_t35.c +++ b/board/compulab/cm_t35/cm_t35.c @@ -565,7 +565,8 @@ struct omap_usbhs_board_data usbhs_bdata = { }; #define SB_T35_USB_HUB_RESET_GPIO 167 -int ehci_hcd_init(int index, struct ehci_hccr **hccr, struct ehci_hcor **hcor) +int ehci_hcd_init(int index, enum usb_init_type init, + struct ehci_hccr **hccr, struct ehci_hcor **hcor) { u8 val; int offset; diff --git a/board/htkw/mcx/mcx.c b/board/htkw/mcx/mcx.c index 6f85b47a0f..4330cf0ddb 100644 --- a/board/htkw/mcx/mcx.c +++ b/board/htkw/mcx/mcx.c @@ -40,7 +40,8 @@ static struct omap_usbhs_board_data usbhs_bdata = { .port_mode[2] = OMAP_USBHS_PORT_MODE_UNUSED, }; -int ehci_hcd_init(int index, struct ehci_hccr **hccr, struct ehci_hcor **hcor) +int ehci_hcd_init(int index, enum usb_init_type init, + struct ehci_hccr **hccr, struct ehci_hcor **hcor) { return omap_ehci_hcd_init(index, &usbhs_bdata, hccr, hcor); } diff --git a/board/technexion/twister/twister.c b/board/technexion/twister/twister.c index 6f2ff55a12..054e7ccded 100644 --- a/board/technexion/twister/twister.c +++ b/board/technexion/twister/twister.c @@ -51,7 +51,8 @@ static struct omap_usbhs_board_data usbhs_bdata = { .port_mode[2] = OMAP_USBHS_PORT_MODE_UNUSED, }; -int ehci_hcd_init(int index, struct ehci_hccr **hccr, struct ehci_hcor **hcor) +int ehci_hcd_init(int index, enum usb_init_type init, + struct ehci_hccr **hccr, struct ehci_hcor **hcor) { return omap_ehci_hcd_init(index, &usbhs_bdata, hccr, hcor); } diff --git a/board/teejet/mt_ventoux/mt_ventoux.c b/board/teejet/mt_ventoux/mt_ventoux.c index df873f52a3..c32d554ea4 100644 --- a/board/teejet/mt_ventoux/mt_ventoux.c +++ b/board/teejet/mt_ventoux/mt_ventoux.c @@ -102,7 +102,8 @@ static struct omap_usbhs_board_data usbhs_bdata = { .port_mode[2] = OMAP_USBHS_PORT_MODE_UNUSED, }; -int ehci_hcd_init(int index, struct ehci_hccr **hccr, struct ehci_hcor **hcor) +int ehci_hcd_init(int index, enum usb_init_type init, + struct ehci_hccr **hccr, struct ehci_hcor **hcor) { return omap_ehci_hcd_init(index, &usbhs_bdata, hccr, hcor); } diff --git a/board/ti/beagle/beagle.c b/board/ti/beagle/beagle.c index 41fed54fdb..9669a32fc1 100644 --- a/board/ti/beagle/beagle.c +++ b/board/ti/beagle/beagle.c @@ -521,7 +521,8 @@ static struct omap_usbhs_board_data usbhs_bdata = { .port_mode[2] = OMAP_USBHS_PORT_MODE_UNUSED }; -int ehci_hcd_init(int index, struct ehci_hccr **hccr, struct ehci_hcor **hcor) +int ehci_hcd_init(int index, enum usb_init_type init, + struct ehci_hccr **hccr, struct ehci_hcor **hcor) { return omap_ehci_hcd_init(index, &usbhs_bdata, hccr, hcor); } diff --git a/board/ti/omap5_uevm/evm.c b/board/ti/omap5_uevm/evm.c index 0044c229b0..9458104604 100644 --- a/board/ti/omap5_uevm/evm.c +++ b/board/ti/omap5_uevm/evm.c @@ -179,7 +179,8 @@ static struct omap_usbhs_board_data usbhs_bdata = { .port_mode[2] = OMAP_EHCI_PORT_MODE_HSIC, }; -int ehci_hcd_init(int index, struct ehci_hccr **hccr, struct ehci_hcor **hcor) +int ehci_hcd_init(int index, enum usb_init_type init, + struct ehci_hccr **hccr, struct ehci_hcor **hcor) { int ret; diff --git a/board/ti/panda/panda.c b/board/ti/panda/panda.c index 3724e816c2..c104024b10 100644 --- a/board/ti/panda/panda.c +++ b/board/ti/panda/panda.c @@ -269,7 +269,8 @@ static struct omap_usbhs_board_data usbhs_bdata = { .port_mode[2] = OMAP_USBHS_PORT_MODE_UNUSED, }; -int ehci_hcd_init(int index, struct ehci_hccr **hccr, struct ehci_hcor **hcor) +int ehci_hcd_init(int index, enum usb_init_type init, + struct ehci_hccr **hccr, struct ehci_hcor **hcor) { int ret; unsigned int utmi_clk; -- cgit v1.2.1