]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - cpu/arm926ejs/at91/at91sam9263_devices.c
at91: Add CAN init function
[karo-tx-uboot.git] / cpu / arm926ejs / at91 / at91sam9263_devices.c
index 0f2613e7b8cf00b3ecb540c0ff9c299547bb10c0..f72efdfe80703e95410e537257716ebd2e7c4161 100644 (file)
@@ -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