]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - drivers/usb/host/ohci-at91.c
arm: atmel: at91sam9n12ek: add usb host support
[karo-tx-uboot.git] / drivers / usb / host / ohci-at91.c
index 9e90d59087c8fd18c1be79e7fb4d4f801d5c83e9..05d6ff2b69e8b1fc91a5670953a6a6ca0f990b0e 100644 (file)
@@ -20,11 +20,14 @@ int usb_cpu_init(void)
 
 #if defined(CONFIG_AT91CAP9) || defined(CONFIG_AT91SAM9260) || \
     defined(CONFIG_AT91SAM9263) || defined(CONFIG_AT91SAM9G20) || \
-    defined(CONFIG_AT91SAM9261)
+       defined(CONFIG_AT91SAM9261) || defined(CONFIG_AT91SAM9N12)
        /* Enable PLLB */
        writel(get_pllb_init(), &pmc->pllbr);
        while ((readl(&pmc->sr) & AT91_PMC_LOCKB) != AT91_PMC_LOCKB)
                ;
+#ifdef CONFIG_AT91SAM9N12
+       writel(AT91_PMC_USBS_USB_PLLB | AT91_PMC_USB_DIV_2, &pmc->usb);
+#endif
 #elif defined(CONFIG_AT91SAM9G45) || defined(CONFIG_AT91SAM9M10G45) || \
        defined(CONFIG_AT91SAM9X5) || defined(CONFIG_SAMA5D3)
        /* Enable UPLL */
@@ -71,7 +74,11 @@ int usb_cpu_stop(void)
 #endif
 
 #if defined(CONFIG_AT91CAP9) || defined(CONFIG_AT91SAM9260) || \
-    defined(CONFIG_AT91SAM9263) || defined(CONFIG_AT91SAM9G20)
+       defined(CONFIG_AT91SAM9263) || defined(CONFIG_AT91SAM9G20) || \
+       defined(CONFIG_AT91SAM9N12)
+#ifdef CONFIG_AT91SAM9N12
+       writel(0, &pmc->usb);
+#endif
        /* Disable PLLB */
        writel(0, &pmc->pllbr);
        while ((readl(&pmc->sr) & AT91_PMC_LOCKB) != 0)