summaryrefslogtreecommitdiff
path: root/cpu/arm926ejs/at91sam9/usb.c
diff options
context:
space:
mode:
authorStelian Pop <stelian@popies.net>2008-03-26 20:52:32 +0100
committerJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>2008-04-01 01:45:50 +0200
commit983c1db04c1dd0f92e02f06d29f0c65a3d9a2687 (patch)
tree59c4e30276a49cf468cdea9a9ef2b6258238acb6 /cpu/arm926ejs/at91sam9/usb.c
parent177e8a5ac81bbc531a1d54abdb47f2860266c3aa (diff)
downloadu-boot-imx-983c1db04c1dd0f92e02f06d29f0c65a3d9a2687.zip
u-boot-imx-983c1db04c1dd0f92e02f06d29f0c65a3d9a2687.tar.gz
u-boot-imx-983c1db04c1dd0f92e02f06d29f0c65a3d9a2687.tar.bz2
Port AT91CAP9 to the new headers
Adapt the existing AT91CAP9 code to the new headers and APIs. Signed-off-by: Stelian Pop <stelian@popies.net>
Diffstat (limited to 'cpu/arm926ejs/at91sam9/usb.c')
-rw-r--r--cpu/arm926ejs/at91sam9/usb.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/cpu/arm926ejs/at91sam9/usb.c b/cpu/arm926ejs/at91sam9/usb.c
index 09292a6..d678897 100644
--- a/cpu/arm926ejs/at91sam9/usb.c
+++ b/cpu/arm926ejs/at91sam9/usb.c
@@ -26,12 +26,14 @@
#if defined(CONFIG_USB_OHCI_NEW) && defined(CFG_USB_OHCI_CPU_INIT)
#include <asm/arch/hardware.h>
+#include <asm/arch/io.h>
+#include <asm/arch/at91_pmc.h>
int usb_cpu_init(void)
{
/* Enable USB host clock. */
- AT91C_BASE_PMC->PMC_SCER = AT91C_PMC_UHP;
- AT91C_BASE_PMC->PMC_PCER = 1 << AT91C_ID_UHP;
+ at91_sys_write(AT91_PMC_PCER, 1 << AT91_ID_UHP);
+ at91_sys_write(AT91_PMC_SCER, AT91_PMC_UHP);
return 0;
}
@@ -39,8 +41,8 @@ int usb_cpu_init(void)
int usb_cpu_stop(void)
{
/* Disable USB host clock. */
- AT91C_BASE_PMC->PMC_PCDR = 1 << AT91C_ID_UHP;
- AT91C_BASE_PMC->PMC_SCDR = AT91C_PMC_UHP;
+ at91_sys_write(AT91_PMC_PCDR, 1 << AT91_ID_UHP);
+ at91_sys_write(AT91_PMC_SCDR, AT91_PMC_UHP);
return 0;
}