aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-at91
diff options
context:
space:
mode:
authorsedji gaouaou <sedji.gaouaou@atmel.com>2009-08-06 10:20:22 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2009-09-06 15:57:26 -0400
commitd656f07a7405e788e1275d0238b67f593615f2bb (patch)
tree0f68594dfb6258e2180f9cfba0b92ad00557cc18 /arch/arm/mach-at91
parent0c30df6fe0bd1e3845357e793dc1bfd908751c45 (diff)
ARM: 5640/1: This patch modifies the support of AC97 on the at91sam9263 ek board
This patch modifies the support of AC97 on the at91sam9263 ek board, so it would share the code with AVR32. Plus it removes a typo in at91sam9263_devices.c. Signed-off-by: Sedji Gaouaou <sedji.gaouaou@atmel.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-at91')
-rw-r--r--arch/arm/mach-at91/at91sam9263_devices.c14
-rw-r--r--arch/arm/mach-at91/board-sam9263ek.c2
-rw-r--r--arch/arm/mach-at91/include/mach/board.h6
3 files changed, 10 insertions, 12 deletions
diff --git a/arch/arm/mach-at91/at91sam9263_devices.c b/arch/arm/mach-at91/at91sam9263_devices.c
index b7f233242315..55719a974276 100644
--- a/arch/arm/mach-at91/at91sam9263_devices.c
+++ b/arch/arm/mach-at91/at91sam9263_devices.c
@@ -707,9 +707,9 @@ void __init at91_add_device_spi(struct spi_board_info *devices, int nr_devices)
707 * AC97 707 * AC97
708 * -------------------------------------------------------------------- */ 708 * -------------------------------------------------------------------- */
709 709
710#if defined(CONFIG_SND_AT91_AC97) || defined(CONFIG_SND_AT91_AC97_MODULE) 710#if defined(CONFIG_SND_ATMEL_AC97C) || defined(CONFIG_SND_ATMEL_AC97C_MODULE)
711static u64 ac97_dmamask = DMA_BIT_MASK(32); 711static u64 ac97_dmamask = DMA_BIT_MASK(32);
712static struct atmel_ac97_data ac97_data; 712static struct ac97c_platform_data ac97_data;
713 713
714static struct resource ac97_resources[] = { 714static struct resource ac97_resources[] = {
715 [0] = { 715 [0] = {
@@ -725,8 +725,8 @@ static struct resource ac97_resources[] = {
725}; 725};
726 726
727static struct platform_device at91sam9263_ac97_device = { 727static struct platform_device at91sam9263_ac97_device = {
728 .name = "ac97c", 728 .name = "atmel_ac97c",
729 .id = 1, 729 .id = 0,
730 .dev = { 730 .dev = {
731 .dma_mask = &ac97_dmamask, 731 .dma_mask = &ac97_dmamask,
732 .coherent_dma_mask = DMA_BIT_MASK(32), 732 .coherent_dma_mask = DMA_BIT_MASK(32),
@@ -736,7 +736,7 @@ static struct platform_device at91sam9263_ac97_device = {
736 .num_resources = ARRAY_SIZE(ac97_resources), 736 .num_resources = ARRAY_SIZE(ac97_resources),
737}; 737};
738 738
739void __init at91_add_device_ac97(struct atmel_ac97_data *data) 739void __init at91_add_device_ac97(struct ac97c_platform_data *data)
740{ 740{
741 if (!data) 741 if (!data)
742 return; 742 return;
@@ -750,11 +750,11 @@ void __init at91_add_device_ac97(struct atmel_ac97_data *data)
750 if (data->reset_pin) 750 if (data->reset_pin)
751 at91_set_gpio_output(data->reset_pin, 0); 751 at91_set_gpio_output(data->reset_pin, 0);
752 752
753 ac97_data = *ek_data; 753 ac97_data = *data;
754 platform_device_register(&at91sam9263_ac97_device); 754 platform_device_register(&at91sam9263_ac97_device);
755} 755}
756#else 756#else
757void __init at91_add_device_ac97(struct atmel_ac97_data *data) {} 757void __init at91_add_device_ac97(struct ac97c_platform_data *data) {}
758#endif 758#endif
759 759
760 760
diff --git a/arch/arm/mach-at91/board-sam9263ek.c b/arch/arm/mach-at91/board-sam9263ek.c
index 57d52528f224..3b669b78e45b 100644
--- a/arch/arm/mach-at91/board-sam9263ek.c
+++ b/arch/arm/mach-at91/board-sam9263ek.c
@@ -365,7 +365,7 @@ static void __init ek_add_device_buttons(void) {}
365/* 365/*
366 * AC97 366 * AC97
367 */ 367 */
368static struct atmel_ac97_data ek_ac97_data = { 368static struct ac97c_platform_data ek_ac97_data = {
369 .reset_pin = AT91_PIN_PA13, 369 .reset_pin = AT91_PIN_PA13,
370}; 370};
371 371
diff --git a/arch/arm/mach-at91/include/mach/board.h b/arch/arm/mach-at91/include/mach/board.h
index 74801d275cdc..13f27a4b882d 100644
--- a/arch/arm/mach-at91/include/mach/board.h
+++ b/arch/arm/mach-at91/include/mach/board.h
@@ -37,6 +37,7 @@
37#include <linux/leds.h> 37#include <linux/leds.h>
38#include <linux/spi/spi.h> 38#include <linux/spi/spi.h>
39#include <linux/usb/atmel_usba_udc.h> 39#include <linux/usb/atmel_usba_udc.h>
40#include <sound/atmel-ac97c.h>
40 41
41 /* USB Device */ 42 /* USB Device */
42struct at91_udc_data { 43struct at91_udc_data {
@@ -174,10 +175,7 @@ struct atmel_lcdfb_info;
174extern void __init at91_add_device_lcdc(struct atmel_lcdfb_info *data); 175extern void __init at91_add_device_lcdc(struct atmel_lcdfb_info *data);
175 176
176 /* AC97 */ 177 /* AC97 */
177struct atmel_ac97_data { 178extern void __init at91_add_device_ac97(struct ac97c_platform_data *data);
178 u8 reset_pin; /* reset */
179};
180extern void __init at91_add_device_ac97(struct atmel_ac97_data *data);
181 179
182 /* ISI */ 180 /* ISI */
183extern void __init at91_add_device_isi(void); 181extern void __init at91_add_device_isi(void);