at91sam9g45: add ehci support
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
parent
b01ded9a97
commit
3c2a1a6a99
|
@ -187,6 +187,7 @@ static struct clk *periph_clocks[] __initdata = {
|
|||
static struct clk_lookup periph_clocks_lookups[] = {
|
||||
/* One additional fake clock for ohci */
|
||||
CLKDEV_CON_ID("ohci_clk", &uhphs_clk),
|
||||
CLKDEV_CON_DEV_ID("ehci_clk", "atmel-ehci", &uhphs_clk),
|
||||
CLKDEV_CON_DEV_ID("mci_clk", "atmel_mci0", &mmc0_clk),
|
||||
CLKDEV_CON_DEV_ID("mci_clk", "atmel_mci1", &mmc1_clk),
|
||||
CLKDEV_CON_DEV_ID("spi_clk", "atmel_spi0", &spi0_clk),
|
||||
|
|
|
@ -55,6 +55,28 @@ void __init at91_add_device_usbh_ohci(struct at91_usbh_data *data)
|
|||
void __init at91_add_device_usbh_ohci(struct at91_usbh_data *data) {}
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_USB_EHCI)
|
||||
void __init at91_add_device_usbh_ehci(struct at91_usbh_data *data)
|
||||
{
|
||||
int i;
|
||||
|
||||
if (!data)
|
||||
return;
|
||||
|
||||
/* Enable VBus control for UHP ports */
|
||||
for (i = 0; i < data->ports; i++) {
|
||||
if (gpio_is_valid(data->vbus_pin[i]))
|
||||
at91_set_gpio_output(data->vbus_pin[i],
|
||||
data->vbus_pin_active_low[i]);
|
||||
}
|
||||
|
||||
add_generic_device("atmel-ehci", DEVICE_ID_SINGLE, NULL, AT91SAM9G45_EHCI_BASE,
|
||||
1024 * 1024, IORESOURCE_MEM, data);
|
||||
}
|
||||
#else
|
||||
void __init at91_add_device_usbh_ehci(struct at91_usbh_data *data) {}
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_DRIVER_NET_MACB)
|
||||
void at91_add_device_eth(int id, struct at91_ether_platform_data *data)
|
||||
{
|
||||
|
|
|
@ -32,6 +32,7 @@ struct at91_usbh_data {
|
|||
u8 vbus_pin_active_low[2]; /* vbus polarity */
|
||||
};
|
||||
extern void __init at91_add_device_usbh_ohci(struct at91_usbh_data *data);
|
||||
extern void __init at91_add_device_usbh_ehci(struct at91_usbh_data *data);
|
||||
|
||||
void atmel_nand_load_image(void *dest, int size, int pagesize, int blocksize);
|
||||
|
||||
|
|
Loading…
Reference in New Issue