diff options
Diffstat (limited to 'arch/arm/mach-at91/board-sam9263ek.c')
-rw-r--r-- | arch/arm/mach-at91/board-sam9263ek.c | 19 |
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 57d52528f224..e6268b3cbe8d 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[] = { | |||
400 | } | 400 | } |
401 | }; | 401 | }; |
402 | 402 | ||
403 | /* | ||
404 | * CAN | ||
405 | */ | ||
406 | static void sam9263ek_transceiver_switch(int on) | ||
407 | { | ||
408 | if (on) { | ||
409 | at91_set_gpio_output(AT91_PIN_PA18, 1); /* CANRXEN */ | ||
410 | at91_set_gpio_output(AT91_PIN_PA19, 0); /* CANRS */ | ||
411 | } else { | ||
412 | at91_set_gpio_output(AT91_PIN_PA18, 0); /* CANRXEN */ | ||
413 | at91_set_gpio_output(AT91_PIN_PA19, 1); /* CANRS */ | ||
414 | } | ||
415 | } | ||
416 | |||
417 | static struct at91_can_data ek_can_data = { | ||
418 | .transceiver_switch = sam9263ek_transceiver_switch, | ||
419 | }; | ||
403 | 420 | ||
404 | static void __init ek_board_init(void) | 421 | static void __init ek_board_init(void) |
405 | { | 422 | { |
@@ -431,6 +448,8 @@ static void __init ek_board_init(void) | |||
431 | /* LEDs */ | 448 | /* LEDs */ |
432 | at91_gpio_leds(ek_leds, ARRAY_SIZE(ek_leds)); | 449 | at91_gpio_leds(ek_leds, ARRAY_SIZE(ek_leds)); |
433 | at91_pwm_leds(ek_pwm_led, ARRAY_SIZE(ek_pwm_led)); | 450 | at91_pwm_leds(ek_pwm_led, ARRAY_SIZE(ek_pwm_led)); |
451 | /* CAN */ | ||
452 | at91_add_device_can(&ek_can_data); | ||
434 | } | 453 | } |
435 | 454 | ||
436 | MACHINE_START(AT91SAM9263EK, "Atmel AT91SAM9263-EK") | 455 | MACHINE_START(AT91SAM9263EK, "Atmel AT91SAM9263-EK") |