summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cpu/arm926ejs/at91/at91cap9_devices.c15
-rw-r--r--cpu/arm926ejs/at91/at91sam9263_devices.c15
-rw-r--r--include/asm-arm/arch-at91/at91_common.h1
3 files changed, 31 insertions, 0 deletions
diff --git a/cpu/arm926ejs/at91/at91cap9_devices.c b/cpu/arm926ejs/at91/at91cap9_devices.c
index c0024acf04e..39e405fee13 100644
--- a/cpu/arm926ejs/at91/at91cap9_devices.c
+++ b/cpu/arm926ejs/at91/at91cap9_devices.c
@@ -3,6 +3,10 @@
* Stelian Pop <stelian.pop@leadtechdesign.com>
* Lead Tech Design <www.leadtechdesign.com>
*
+ * (C) Copyright 2009
+ * Daniel Gorsulowski <daniel.gorsulowski@esd.eu>
+ * esd electronic system design gmbh <www.esd.eu>
+ *
* See file CREDITS for list of people who contributed to this
* project.
*
@@ -174,3 +178,14 @@ void at91_macb_hw_init(void)
#endif
}
#endif
+
+#ifdef CONFIG_AT91_CAN
+void at91_can_hw_init(void)
+{
+ at91_set_A_periph(AT91_PIN_PA12, 0); /* CAN_TX */
+ at91_set_A_periph(AT91_PIN_PA13, 1); /* CAN_RX */
+
+ /* Enable clock */
+ at91_sys_write(AT91_PMC_PCER, 1 << AT91CAP9_ID_CAN);
+}
+#endif
diff --git a/cpu/arm926ejs/at91/at91sam9263_devices.c b/cpu/arm926ejs/at91/at91sam9263_devices.c
index 0f2613e7b8c..f72efdfe807 100644
--- a/cpu/arm926ejs/at91/at91sam9263_devices.c
+++ b/cpu/arm926ejs/at91/at91sam9263_devices.c
@@ -3,6 +3,10 @@
* Stelian Pop <stelian.pop@leadtechdesign.com>
* Lead Tech Design <www.leadtechdesign.com>
*
+ * (C) Copyright 2009
+ * Daniel Gorsulowski <daniel.gorsulowski@esd.eu>
+ * esd electronic system design gmbh <www.esd.eu>
+ *
* See file CREDITS for list of people who contributed to this
* project.
*
@@ -182,3 +186,14 @@ void at91_uhp_hw_init(void)
at91_set_gpio_output(AT91_PIN_PA24, 0);
}
#endif
+
+#ifdef CONFIG_AT91_CAN
+void at91_can_hw_init(void)
+{
+ at91_set_A_periph(AT91_PIN_PA13, 0); /* CAN_TX */
+ at91_set_A_periph(AT91_PIN_PA14, 1); /* CAN_RX */
+
+ /* Enable clock */
+ at91_sys_write(AT91_PMC_PCER, 1 << AT91SAM9263_ID_CAN);
+}
+#endif
diff --git a/include/asm-arm/arch-at91/at91_common.h b/include/asm-arm/arch-at91/at91_common.h
index 9c4e0197155..01840eede41 100644
--- a/include/asm-arm/arch-at91/at91_common.h
+++ b/include/asm-arm/arch-at91/at91_common.h
@@ -25,6 +25,7 @@
#ifndef AT91_COMMON_H
#define AT91_COMMON_H
+void at91_can_hw_init(void);
void at91_macb_hw_init(void);
void at91_serial_hw_init(void);
void at91_serial0_hw_init(void);