From 2f47c8c5556e91f309e24162263ebacff6973007 Mon Sep 17 00:00:00 2001 From: Hans-Christian Egtvedt Date: Tue, 24 Mar 2009 13:59:23 +0100 Subject: [PATCH] avr32: at32ap700x: setup DMA for AC97C in the machine code This patch will adjust the setup the DMA controller for the AC97 Controller in the at32ap700x machine code. This setup matches the new ALSA driver for the AC97C. The struct ac97c_platform_data has been moved into its own header file located in the sound include path. Tested on ATSTK1006 + ATSTK1000. This patch will setup the AC97 controller properly for the adjusted machine code. Both EVKLCD10x and Hammerhead board has been updated. Tested on EVKLCD10x, and copied to Hammerhead board. Signed-off-by: Hans-Christian Egtvedt [haavard.skinnemoen@atmel.com: fold with board code update] Signed-off-by: Haavard Skinnemoen --- arch/avr32/boards/atngw100/evklcd10x.c | 9 ++-- arch/avr32/boards/hammerhead/setup.c | 4 +- arch/avr32/mach-at32ap/at32ap700x.c | 51 ++++++++++++++------- arch/avr32/mach-at32ap/include/mach/board.h | 10 ++-- 4 files changed, 45 insertions(+), 29 deletions(-) diff --git a/arch/avr32/boards/atngw100/evklcd10x.c b/arch/avr32/boards/atngw100/evklcd10x.c index ae699120540..00337112c5a 100644 --- a/arch/avr32/boards/atngw100/evklcd10x.c +++ b/arch/avr32/boards/atngw100/evklcd10x.c @@ -23,11 +23,10 @@ #include #include +#include + static struct ac97c_platform_data __initdata ac97c0_data = { - .dma_rx_periph_id = 3, - .dma_tx_periph_id = 4, - .dma_controller_id = 0, - .reset_pin = GPIO_PIN_PB(19), + .reset_pin = GPIO_PIN_PB(19), }; #ifdef CONFIG_BOARD_ATNGW100_EVKLCD10X_VGA @@ -167,7 +166,7 @@ static int __init atevklcd10x_init(void) fbmem_start, fbmem_size, ATMEL_LCDC_ALT_18BIT | ATMEL_LCDC_PE_DVAL); - at32_add_device_ac97c(0, &ac97c0_data); + at32_add_device_ac97c(0, &ac97c0_data, AC97C_BOTH); return 0; } diff --git a/arch/avr32/boards/hammerhead/setup.c b/arch/avr32/boards/hammerhead/setup.c index 4d2fe82b202..a5c2da25c4f 100644 --- a/arch/avr32/boards/hammerhead/setup.c +++ b/arch/avr32/boards/hammerhead/setup.c @@ -29,6 +29,8 @@ #include #include +#include + #include "../../mach-at32ap/clock.h" #include "flash.h" @@ -233,7 +235,7 @@ static int __init hammerhead_init(void) i2c_register_board_info(0, i2c_info, ARRAY_SIZE(i2c_info)); #ifdef CONFIG_BOARD_HAMMERHEAD_SND - at32_add_device_ac97c(0, &ac97c_data); + at32_add_device_ac97c(0, &ac97c_data, AC97C_BOTH); #endif /* Select the Touchscreen interrupt pin mode */ diff --git a/arch/avr32/mach-at32ap/at32ap700x.c b/arch/avr32/mach-at32ap/at32ap700x.c index 1bc6389b20b..62501d64322 100644 --- a/arch/avr32/mach-at32ap/at32ap700x.c +++ b/arch/avr32/mach-at32ap/at32ap700x.c @@ -27,6 +27,7 @@ #include #include +#include #include