From: Marc Kleine-Budde <mkl-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
To: netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Cc: Socketcan-core-0fE9KPoRgkgATYTw5x5z8w@public.gmane.org,
Marc Kleine-Budde <mkl-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>,
wg-5Yr1BZd7O62+XT7JhA+gdA@public.gmane.org,
Andrew Victor <linux-PelNFVqkFnVyf+4FbqDuWQ@public.gmane.org>,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Subject: [PATCH 2/3] at91sam9263ek: activate at91 CAN controller
Date: Thu, 17 Sep 2009 11:37:33 +0200 [thread overview]
Message-ID: <1253180254-11910-3-git-send-email-mkl@pengutronix.de> (raw)
In-Reply-To: <1253180254-11910-2-git-send-email-mkl-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
This patch activates the at91 CAN controller for the at91sam9263ek
development board.
Signed-off-by: Hans J. Koch <hjk-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>
Signed-off-by: Marc Kleine-Budde <mkl-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
---
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")
--
1.6.4.3
next prev parent reply other threads:[~2009-09-17 9:37 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-17 9:37 (unknown), Marc Kleine-Budde
[not found] ` <1253180254-11910-1-git-send-email-mkl-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2009-09-17 9:37 ` [PATCH 1/3] at91sam9263: add at91_can device to generic device definition Marc Kleine-Budde
[not found] ` <1253180254-11910-2-git-send-email-mkl-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2009-09-17 9:37 ` Marc Kleine-Budde [this message]
2009-09-17 9:37 ` [PATCH 3/3] at91_can: add driver for Atmel's CAN controller on AT91SAM9263 Marc Kleine-Budde
2009-09-17 9:48 ` Wolfgang Grandegger
2009-09-22 22:09 ` David Miller
2009-09-21 21:44 ` Andrew Victor
[not found] ` <1253180254-11910-3-git-send-email-mkl-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2009-09-17 13:14 ` [PATCH 2/3] at91sam9263ek: activate at91 CAN controller Wolfgang Grandegger
2009-09-22 22:09 ` David Miller
2009-09-21 21:27 ` Andrew Victor
2009-09-17 13:14 ` [PATCH 1/3] at91sam9263: add at91_can device to generic device definition Wolfgang Grandegger
2009-09-22 22:08 ` David Miller
2009-09-17 9:50 ` Wolfgang Grandegger
[not found] ` <4AB20679.2040602-5Yr1BZd7O62+XT7JhA+gdA@public.gmane.org>
2009-09-17 10:04 ` [PATCH V2 0/3] at91_can: add support for Atmel's CAN controller on AT91SAM9263 Marc Kleine-Budde
2009-09-17 11:33 ` Marc Kleine-Budde
2009-09-21 21:31 ` Andrew Victor
2009-09-21 21:40 ` Russell King - ARM Linux
[not found] ` <cd73a99e0909211431k37429a70o4efaac7104f7d526-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-09-22 22:07 ` Marc Kleine-Budde
-- strict thread matches above, loose matches on Subject: below --
2009-09-16 9:46 [PATCH " Marc Kleine-Budde
2009-09-16 9:46 ` [PATCH 1/3] at91sam9263: add at91_can device to generic device definition Marc Kleine-Budde
[not found] ` <1253094405-3216-2-git-send-email-mkl-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2009-09-16 9:46 ` [PATCH 2/3] at91sam9263ek: activate at91 CAN controller Marc Kleine-Budde
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1253180254-11910-3-git-send-email-mkl@pengutronix.de \
--to=mkl-bicnvbalz9megne8c9+irq@public.gmane.org \
--cc=Socketcan-core-0fE9KPoRgkgATYTw5x5z8w@public.gmane.org \
--cc=linux-PelNFVqkFnVyf+4FbqDuWQ@public.gmane.org \
--cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=wg-5Yr1BZd7O62+XT7JhA+gdA@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).