Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 181b250c authored by Keshava Munegowda's avatar Keshava Munegowda Committed by Felipe Balbi
Browse files

arm: omap: usb: create common enums and structures for ehci and ohci



Create the ehci and ohci specific platform data structures.
The port enum values are made common for both ehci and ohci.

Signed-off-by: default avatarKeshava Munegowda <keshava_mgowda@ti.com>
Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
parent a8480ea0
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -653,11 +653,11 @@ static void enable_board_wakeup_source(void)
		OMAP_WAKEUP_EN | OMAP_PIN_INPUT_PULLUP);
}

static const struct ehci_hcd_omap_platform_data ehci_pdata __initconst = {
static const struct usbhs_omap_board_data usbhs_bdata __initconst = {

	.port_mode[0] = EHCI_HCD_OMAP_MODE_PHY,
	.port_mode[1] = EHCI_HCD_OMAP_MODE_PHY,
	.port_mode[2] = EHCI_HCD_OMAP_MODE_UNKNOWN,
	.port_mode[0] = OMAP_EHCI_PORT_MODE_PHY,
	.port_mode[1] = OMAP_EHCI_PORT_MODE_PHY,
	.port_mode[2] = OMAP_USBHS_PORT_MODE_UNUSED,

	.phy_reset  = true,
	.reset_gpio_port[0]  = 57,
@@ -816,7 +816,7 @@ static void __init omap_3430sdp_init(void)
	board_flash_init(sdp_flash_partitions, chip_sel_3430);
	sdp3430_display_init();
	enable_board_wakeup_source();
	usb_ehci_init(&ehci_pdata);
	usb_ehci_init(&usbhs_bdata);
}

MACHINE_START(OMAP_3430SDP, "OMAP3430 3430SDP board")
+5 −5
Original line number Diff line number Diff line
@@ -54,11 +54,11 @@ static void enable_board_wakeup_source(void)
		OMAP_WAKEUP_EN | OMAP_PIN_INPUT_PULLUP);
}

static const struct ehci_hcd_omap_platform_data ehci_pdata __initconst = {
static const struct usbhs_omap_board_data usbhs_bdata __initconst = {

	.port_mode[0] = EHCI_HCD_OMAP_MODE_PHY,
	.port_mode[1] = EHCI_HCD_OMAP_MODE_PHY,
	.port_mode[2] = EHCI_HCD_OMAP_MODE_UNKNOWN,
	.port_mode[0] = OMAP_EHCI_PORT_MODE_PHY,
	.port_mode[1] = OMAP_EHCI_PORT_MODE_PHY,
	.port_mode[2] = OMAP_USBHS_PORT_MODE_UNUSED,

	.phy_reset  = true,
	.reset_gpio_port[0]  = 126,
@@ -211,7 +211,7 @@ static void __init omap_sdp_init(void)
	board_smc91x_init();
	board_flash_init(sdp_flash_partitions, chip_sel_sdp);
	enable_board_wakeup_source();
	usb_ehci_init(&ehci_pdata);
	usb_ehci_init(&usbhs_bdata);
}

MACHINE_START(OMAP_3630SDP, "OMAP 3630SDP board")
+5 −5
Original line number Diff line number Diff line
@@ -251,10 +251,10 @@ static void __init omap_4430sdp_init_irq(void)
	gic_init_irq();
}

static const struct ehci_hcd_omap_platform_data ehci_pdata __initconst = {
	.port_mode[0]	= EHCI_HCD_OMAP_MODE_PHY,
	.port_mode[1]	= EHCI_HCD_OMAP_MODE_UNKNOWN,
	.port_mode[2]	= EHCI_HCD_OMAP_MODE_UNKNOWN,
static const struct usbhs_omap_board_data usbhs_bdata __initconst = {
	.port_mode[0]	= OMAP_EHCI_PORT_MODE_PHY,
	.port_mode[1]	= OMAP_USBHS_PORT_MODE_UNUSED,
	.port_mode[2]	= OMAP_USBHS_PORT_MODE_UNUSED,
	.phy_reset	= false,
	.reset_gpio_port[0]  = -EINVAL,
	.reset_gpio_port[1]  = -EINVAL,
@@ -584,7 +584,7 @@ static void __init omap_4430sdp_init(void)
	else
		gpio_direction_output(OMAP4SDP_MDM_PWR_EN_GPIO, 1);

	usb_ehci_init(&ehci_pdata);
	usb_ehci_init(&usbhs_bdata);
	usb_musb_init(&musb_board_data);

	status = omap_ethernet_init();
+5 −5
Original line number Diff line number Diff line
@@ -59,10 +59,10 @@ static void __init am3517_crane_init_irq(void)
	omap_init_irq();
}

static struct ehci_hcd_omap_platform_data ehci_pdata __initdata = {
	.port_mode[0] = EHCI_HCD_OMAP_MODE_PHY,
	.port_mode[1] = EHCI_HCD_OMAP_MODE_UNKNOWN,
	.port_mode[2] = EHCI_HCD_OMAP_MODE_UNKNOWN,
static struct usbhs_omap_board_data usbhs_bdata __initdata = {
	.port_mode[0] = OMAP_EHCI_PORT_MODE_PHY,
	.port_mode[1] = OMAP_USBHS_PORT_MODE_UNUSED,
	.port_mode[2] = OMAP_USBHS_PORT_MODE_UNUSED,

	.phy_reset  = true,
	.reset_gpio_port[0]  = GPIO_USB_NRESET,
@@ -103,7 +103,7 @@ static void __init am3517_crane_init(void)
		return;
	}

	usb_ehci_init(&ehci_pdata);
	usb_ehci_init(&usbhs_bdata);
}

MACHINE_START(CRANEBOARD, "AM3517/05 CRANEBOARD")
+6 −6
Original line number Diff line number Diff line
@@ -430,15 +430,15 @@ static __init void am3517_evm_musb_init(void)
	usb_musb_init(&musb_board_data);
}

static const struct ehci_hcd_omap_platform_data ehci_pdata __initconst = {
	.port_mode[0] = EHCI_HCD_OMAP_MODE_PHY,
static const struct usbhs_omap_board_data usbhs_bdata __initconst = {
	.port_mode[0] = OMAP_EHCI_PORT_MODE_PHY,
#if defined(CONFIG_PANEL_SHARP_LQ043T1DG01) || \
		defined(CONFIG_PANEL_SHARP_LQ043T1DG01_MODULE)
	.port_mode[1] = EHCI_HCD_OMAP_MODE_UNKNOWN,
	.port_mode[1] = OMAP_USBHS_PORT_MODE_UNUSED,
#else
	.port_mode[1] = EHCI_HCD_OMAP_MODE_PHY,
	.port_mode[1] = OMAP_EHCI_PORT_MODE_PHY,
#endif
	.port_mode[2] = EHCI_HCD_OMAP_MODE_UNKNOWN,
	.port_mode[2] = OMAP_USBHS_PORT_MODE_UNUSED,

	.phy_reset  = true,
	.reset_gpio_port[0]  = 57,
@@ -502,7 +502,7 @@ static void __init am3517_evm_init(void)

	/* Configure GPIO for EHCI port */
	omap_mux_init_gpio(57, OMAP_PIN_OUTPUT);
	usb_ehci_init(&ehci_pdata);
	usb_ehci_init(&usbhs_bdata);
	am3517_evm_hecc_init(&am3517_evm_hecc_pdata);
	/* DSS */
	am3517_evm_display_init();
Loading