3 * Atmel Semiconductor <www.atmel.com>
4 * Written-by: Bo Shen <voice.shen@atmel.com>
6 * SPDX-License-Identifier: GPL-2.0+
12 #include <asm/arch/clk.h>
16 int ehci_hcd_init(int index, enum usb_init_type init,
17 struct ehci_hccr **hccr, struct ehci_hcor **hcor)
20 if (at91_upll_clk_enable())
23 /* Enable USB Host clock */
24 at91_periph_clk_enable(ATMEL_ID_UHPHS);
26 *hccr = (struct ehci_hccr *)ATMEL_BASE_EHCI;
27 *hcor = (struct ehci_hcor *)((uint32_t)*hccr +
28 HC_LENGTH(ehci_readl(&(*hccr)->cr_capbase)));
33 int ehci_hcd_stop(int index)
35 /* Disable USB Host Clock */
36 at91_periph_clk_disable(ATMEL_ID_UHPHS);
38 /* Disable UTMI PLL */
39 if (at91_upll_clk_disable())