From mboxrd@z Thu Jan 1 00:00:00 1970 From: wg@grandegger.com (Wolfgang Grandegger) Date: Thu, 17 Sep 2009 15:14:55 +0200 Subject: [PATCH 2/3] at91sam9263ek: activate at91 CAN controller In-Reply-To: <1253180254-11910-3-git-send-email-mkl@pengutronix.de> References: <1253180254-11910-1-git-send-email-mkl@pengutronix.de> <1253180254-11910-2-git-send-email-mkl@pengutronix.de> <1253180254-11910-3-git-send-email-mkl@pengutronix.de> Message-ID: <4AB2364F.60700@grandegger.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org Marc Kleine-Budde wrote: > This patch activates the at91 CAN controller for the at91sam9263ek > development board. > > Signed-off-by: Hans J. Koch > Signed-off-by: Marc Kleine-Budde > --- > 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 57d5252..e6268b3 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") Acked-by: Wolfgang Grandegger From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wolfgang Grandegger Subject: Re: [PATCH 2/3] at91sam9263ek: activate at91 CAN controller Date: Thu, 17 Sep 2009 15:14:55 +0200 Message-ID: <4AB2364F.60700@grandegger.com> References: <1253180254-11910-1-git-send-email-mkl@pengutronix.de> <1253180254-11910-2-git-send-email-mkl@pengutronix.de> <1253180254-11910-3-git-send-email-mkl@pengutronix.de> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: Socketcan-core-0fE9KPoRgkgATYTw5x5z8w@public.gmane.org, netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Andrew Victor , linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org To: Marc Kleine-Budde Return-path: In-Reply-To: <1253180254-11910-3-git-send-email-mkl-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: socketcan-core-bounces-0fE9KPoRgkgATYTw5x5z8w@public.gmane.org Errors-To: socketcan-core-bounces-0fE9KPoRgkgATYTw5x5z8w@public.gmane.org List-Id: netdev.vger.kernel.org Marc Kleine-Budde wrote: > This patch activates the at91 CAN controller for the at91sam9263ek > development board. > > Signed-off-by: Hans J. Koch > Signed-off-by: Marc Kleine-Budde > --- > 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 57d5252..e6268b3 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") Acked-by: Wolfgang Grandegger