diff mbox

[U-Boot,2/6] ARM: atmel: sama5d4: add usb device initial code

Message ID 1417600943-7566-3-git-send-email-voice.shen@atmel.com
State Accepted, archived
Delegated to: Andreas Bießmann
Headers show

Commit Message

Bo Shen Dec. 3, 2014, 10:02 a.m. UTC
Signed-off-by: Bo Shen <voice.shen@atmel.com>
---

 arch/arm/cpu/armv7/at91/sama5d4_devices.c | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

Comments

Andreas Bießmann Jan. 19, 2015, 2:03 p.m. UTC | #1
Dear Bo Shen,

Bo Shen <voice.shen@atmel.com> writes:
>Signed-off-by: Bo Shen <voice.shen@atmel.com>
>---
>
> arch/arm/cpu/armv7/at91/sama5d4_devices.c | 16 ++++++++++++++++
> 1 file changed, 16 insertions(+)

applied to u-boot-atmel/master, thanks!

Best regards,
Andreas Bießmann
diff mbox

Patch

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