提交 a7a1a05f 编写于 作者: M Marc Kleine-Budde 提交者: David S. Miller

at91sam9263ek: activate at91 CAN controller

This patch activates the at91 CAN controller for the at91sam9263ek
development board.
Signed-off-by: NHans J. Koch <hjk@linutronix.de>
Signed-off-by: NMarc Kleine-Budde <mkl@pengutronix.de>
Acked-by: NWolfgang Grandegger <wg@grandegger.com>
Acked-by: NAndrew Victor <linux@maxim.org.za>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 58a587dc
......@@ -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")
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册