summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-at91
diff options
context:
space:
mode:
authorMarc Kleine-Budde <mkl@pengutronix.de>2009-09-16 23:37:33 +0000
committerDavid S. Miller <davem@davemloft.net>2009-09-22 14:45:09 -0700
commita7a1a05f9dc0308b1710c5a9545bb98ca250bb8d (patch)
tree8e467226e3594f1496eac2363695e3e4d8aaf247 /arch/arm/mach-at91
parent58a587dc2abd436a6a8d0de729d9ed7e40ce0ac9 (diff)
downloadkernel-crypto-a7a1a05f9dc0308b1710c5a9545bb98ca250bb8d.tar.gz
kernel-crypto-a7a1a05f9dc0308b1710c5a9545bb98ca250bb8d.tar.xz
kernel-crypto-a7a1a05f9dc0308b1710c5a9545bb98ca250bb8d.zip
at91sam9263ek: activate at91 CAN controller
This patch activates the at91 CAN controller for the at91sam9263ek development board. Signed-off-by: Hans J. Koch <hjk@linutronix.de> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Acked-by: Wolfgang Grandegger <wg@grandegger.com> Acked-by: Andrew Victor <linux@maxim.org.za> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/arm/mach-at91')
-rw-r--r--arch/arm/mach-at91/board-sam9263ek.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/arch/arm/mach-at91/board-sam9263ek.c b/arch/arm/mach-at91/board-sam9263ek.c
index 57d52528f22..e6268b3cbe8 100644
--- a/arch/arm/mach-at91/board-sam9263ek.c
+++ b/arch/arm/mach-at91/board-sam9263ek.c
@@ -400,6 +400,23 @@ static struct gpio_led ek_pwm_led[] = {
}
};
+/*
+ * CAN
+ */
+static void sam9263ek_transceiver_switch(int on)
+{
+ if (on) {
+ at91_set_gpio_output(AT91_PIN_PA18, 1); /* CANRXEN */
+ at91_set_gpio_output(AT91_PIN_PA19, 0); /* CANRS */
+ } else {
+ at91_set_gpio_output(AT91_PIN_PA18, 0); /* CANRXEN */
+ at91_set_gpio_output(AT91_PIN_PA19, 1); /* CANRS */
+ }
+}
+
+static struct at91_can_data ek_can_data = {
+ .transceiver_switch = sam9263ek_transceiver_switch,
+};
static void __init ek_board_init(void)
{
@@ -431,6 +448,8 @@ static void __init ek_board_init(void)
/* LEDs */
at91_gpio_leds(ek_leds, ARRAY_SIZE(ek_leds));
at91_pwm_leds(ek_pwm_led, ARRAY_SIZE(ek_pwm_led));
+ /* CAN */
+ at91_add_device_can(&ek_can_data);
}
MACHINE_START(AT91SAM9263EK, "Atmel AT91SAM9263-EK")