summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorBo Shen <voice.shen@atmel.com>2014-12-03 18:02:19 +0800
committerAndreas Bießmann <andreas.devel@googlemail.com>2015-01-19 15:02:44 +0100
commit765ece8b133be0206353896677b671808b6aa7b4 (patch)
tree6550a9551a8e1e9ad829b0294a5425199b2ca276 /arch
parente05e46ed3c55b21ee56ea39aceab5601e6a62e3b (diff)
downloadu-boot-imx-765ece8b133be0206353896677b671808b6aa7b4.zip
u-boot-imx-765ece8b133be0206353896677b671808b6aa7b4.tar.gz
u-boot-imx-765ece8b133be0206353896677b671808b6aa7b4.tar.bz2
ARM: atmel: sama5d4: add usb device initial code
Signed-off-by: Bo Shen <voice.shen@atmel.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/cpu/armv7/at91/sama5d4_devices.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/arch/arm/cpu/armv7/at91/sama5d4_devices.c b/arch/arm/cpu/armv7/at91/sama5d4_devices.c
index 2708097..7469825 100644
--- a/arch/arm/cpu/armv7/at91/sama5d4_devices.c
+++ b/arch/arm/cpu/armv7/at91/sama5d4_devices.c
@@ -6,6 +6,10 @@
*/
#include <common.h>
+#include <asm/io.h>
+#include <asm/arch/at91_common.h>
+#include <asm/arch/at91_pmc.h>
+#include <asm/arch/clk.h>
#include <asm/arch/sama5d4.h>
char *get_cpu_name()
@@ -28,3 +32,15 @@ char *get_cpu_name()
else
return "Unknown CPU type";
}
+
+#ifdef CONFIG_USB_GADGET_ATMEL_USBA
+void at91_udp_hw_init(void)
+{
+ struct at91_pmc *pmc = (struct at91_pmc *)ATMEL_BASE_PMC;
+
+ /* Enable UPLL clock */
+ writel(AT91_PMC_UPLLEN | AT91_PMC_BIASEN, &pmc->uckr);
+ /* Enable UDPHS clock */
+ at91_periph_clk_enable(ATMEL_ID_UDPHS);
+}
+#endif