diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-09-25 10:22:11 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-09-25 10:22:11 -0400 |
commit | 5c3cc2084dd9dc26b258f88abb629550090956e0 (patch) | |
tree | 78bad2d2f412e0700384268f065823879f8ef1da /arch | |
parent | 851b147e4411df6a1e7e90e2a609773c277eefd2 (diff) | |
parent | b8273570f802a7658827dcb077b0b517ba75a289 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (94 commits)
genetlink: fix netns vs. netlink table locking (2)
3c59x: Get rid of "Trying to free already-free IRQ"
tunnel: eliminate recursion field
ems_pci: fix size of CAN controllers BAR mapping for CPC-PCI v2
net: fix htmldocs sunrpc, clnt.c
Phonet: error on broadcast sending (unimplemented)
Phonet: fix race for port number in concurrent bind()
pktgen: better scheduler friendliness
pktgen: T_TERMINATE flag is unused
ipv4: check optlen for IP_MULTICAST_IF option
ath9k: Initialize txgain and rxgain for newer AR9287 chipsets.
iwlagn: fix panic in iwl{5000,4965}_rx_reply_tx
ath9k: Fix RFKILL bugs
drivers/net/wireless: Use usb_endpoint_dir_out
cfg80211: don't overwrite privacy setting
wl12xx: fix kconfig/link errors
rt2x00: fix the definition of rt2x00crypto_rx_insert_iv
iwlwifi: reduce noise when skb allocation fails
iwlwifi: do not send sync command while holding spinlock
mac80211: fix DTIM setting
...
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-at91/at91sam9263_devices.c | 36 | ||||
-rw-r--r-- | arch/arm/mach-at91/board-sam9263ek.c | 19 | ||||
-rw-r--r-- | arch/arm/mach-at91/include/mach/board.h | 6 |
3 files changed, 61 insertions, 0 deletions
diff --git a/arch/arm/mach-at91/at91sam9263_devices.c b/arch/arm/mach-at91/at91sam9263_devices.c index 55719a97427..fb5c23af101 100644 --- a/arch/arm/mach-at91/at91sam9263_devices.c +++ b/arch/arm/mach-at91/at91sam9263_devices.c | |||
@@ -757,6 +757,42 @@ void __init at91_add_device_ac97(struct ac97c_platform_data *data) | |||
757 | void __init at91_add_device_ac97(struct ac97c_platform_data *data) {} | 757 | void __init at91_add_device_ac97(struct ac97c_platform_data *data) {} |
758 | #endif | 758 | #endif |
759 | 759 | ||
760 | /* -------------------------------------------------------------------- | ||
761 | * CAN Controller | ||
762 | * -------------------------------------------------------------------- */ | ||
763 | |||
764 | #if defined(CONFIG_CAN_AT91) || defined(CONFIG_CAN_AT91_MODULE) | ||
765 | static struct resource can_resources[] = { | ||
766 | [0] = { | ||
767 | .start = AT91SAM9263_BASE_CAN, | ||
768 | .end = AT91SAM9263_BASE_CAN + SZ_16K - 1, | ||
769 | .flags = IORESOURCE_MEM, | ||
770 | }, | ||
771 | [1] = { | ||
772 | .start = AT91SAM9263_ID_CAN, | ||
773 | .end = AT91SAM9263_ID_CAN, | ||
774 | .flags = IORESOURCE_IRQ, | ||
775 | }, | ||
776 | }; | ||
777 | |||
778 | static struct platform_device at91sam9263_can_device = { | ||
779 | .name = "at91_can", | ||
780 | .id = -1, | ||
781 | .resource = can_resources, | ||
782 | .num_resources = ARRAY_SIZE(can_resources), | ||
783 | }; | ||
784 | |||
785 | void __init at91_add_device_can(struct at91_can_data *data) | ||
786 | { | ||
787 | at91_set_A_periph(AT91_PIN_PA13, 0); /* CANTX */ | ||
788 | at91_set_A_periph(AT91_PIN_PA14, 0); /* CANRX */ | ||
789 | at91sam9263_can_device.dev.platform_data = data; | ||
790 | |||
791 | platform_device_register(&at91sam9263_can_device); | ||
792 | } | ||
793 | #else | ||
794 | void __init at91_add_device_can(struct at91_can_data *data) {} | ||
795 | #endif | ||
760 | 796 | ||
761 | /* -------------------------------------------------------------------- | 797 | /* -------------------------------------------------------------------- |
762 | * LCD Controller | 798 | * LCD Controller |
diff --git a/arch/arm/mach-at91/board-sam9263ek.c b/arch/arm/mach-at91/board-sam9263ek.c index 26f1aa6049a..2d867fb0630 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") |
diff --git a/arch/arm/mach-at91/include/mach/board.h b/arch/arm/mach-at91/include/mach/board.h index 583f38a38df..2f4fcedc02b 100644 --- a/arch/arm/mach-at91/include/mach/board.h +++ b/arch/arm/mach-at91/include/mach/board.h | |||
@@ -188,6 +188,12 @@ extern void __init at91_add_device_isi(void); | |||
188 | /* Touchscreen Controller */ | 188 | /* Touchscreen Controller */ |
189 | extern void __init at91_add_device_tsadcc(void); | 189 | extern void __init at91_add_device_tsadcc(void); |
190 | 190 | ||
191 | /* CAN */ | ||
192 | struct at91_can_data { | ||
193 | void (*transceiver_switch)(int on); | ||
194 | }; | ||
195 | extern void __init at91_add_device_can(struct at91_can_data *data); | ||
196 | |||
191 | /* LEDs */ | 197 | /* LEDs */ |
192 | extern void __init at91_init_leds(u8 cpu_led, u8 timer_led); | 198 | extern void __init at91_init_leds(u8 cpu_led, u8 timer_led); |
193 | extern void __init at91_gpio_leds(struct gpio_led *leds, int nr); | 199 | extern void __init at91_gpio_leds(struct gpio_led *leds, int nr); |