aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--arch/avr32/boards/atstk1000/atstk1003.c2
-rw-r--r--arch/avr32/boards/atstk1000/atstk1004.c2
-rw-r--r--arch/avr32/kernel/time.c6
-rw-r--r--arch/avr32/mach-at32ap/at32ap700x.c47
-rw-r--r--drivers/misc/atmel-ssc.c1
-rw-r--r--drivers/mmc/host/atmel-mci.c1
-rw-r--r--include/asm-avr32/arch-at32ap/board.h10
7 files changed, 50 insertions, 19 deletions
diff --git a/arch/avr32/boards/atstk1000/atstk1003.c b/arch/avr32/boards/atstk1000/atstk1003.c
index ea109f435a8..591fc73b554 100644
--- a/arch/avr32/boards/atstk1000/atstk1003.c
+++ b/arch/avr32/boards/atstk1000/atstk1003.c
@@ -154,7 +154,7 @@ static int __init atstk1003_init(void)
at32_add_device_spi(1, spi1_board_info, ARRAY_SIZE(spi1_board_info));
#endif
#ifndef CONFIG_BOARD_ATSTK100X_SW2_CUSTOM
- at32_add_device_mci(0);
+ at32_add_device_mci(0, NULL);
#endif
at32_add_device_usba(0, NULL);
#ifndef CONFIG_BOARD_ATSTK100X_SW3_CUSTOM
diff --git a/arch/avr32/boards/atstk1000/atstk1004.c b/arch/avr32/boards/atstk1000/atstk1004.c
index c7236df74d7..d9c5e0a2125 100644
--- a/arch/avr32/boards/atstk1000/atstk1004.c
+++ b/arch/avr32/boards/atstk1000/atstk1004.c
@@ -137,7 +137,7 @@ static int __init atstk1004_init(void)
at32_add_device_spi(1, spi1_board_info, ARRAY_SIZE(spi1_board_info));
#endif
#ifndef CONFIG_BOARD_ATSTK100X_SW2_CUSTOM
- at32_add_device_mci(0);
+ at32_add_device_mci(0, NULL);
#endif
at32_add_device_lcdc(0, &atstk1000_lcdc_data,
fbmem_start, fbmem_size, 0);
diff --git a/arch/avr32/kernel/time.c b/arch/avr32/kernel/time.c
index abd954fb7ba..7e7f32771ae 100644
--- a/arch/avr32/kernel/time.c
+++ b/arch/avr32/kernel/time.c
@@ -43,6 +43,9 @@ static irqreturn_t timer_interrupt(int irq, void *dev_id)
{
struct clock_event_device *evdev = dev_id;
+ if (unlikely(!(intc_get_pending(0) & 1)))
+ return IRQ_NONE;
+
/*
* Disable the interrupt until the clockevent subsystem
* reprograms it.
@@ -55,7 +58,8 @@ static irqreturn_t timer_interrupt(int irq, void *dev_id)
static struct irqaction timer_irqaction = {
.handler = timer_interrupt,
- .flags = IRQF_TIMER | IRQF_DISABLED,
+ /* Oprofile uses the same irq as the timer, so allow it to be shared */
+ .flags = IRQF_TIMER | IRQF_DISABLED | IRQF_SHARED,
.name = "avr32_comparator",
};
diff --git a/arch/avr32/mach-at32ap/at32ap700x.c b/arch/avr32/mach-at32ap/at32ap700x.c
index 351e1b42f93..5f30b353a27 100644
--- a/arch/avr32/mach-at32ap/at32ap700x.c
+++ b/arch/avr32/mach-at32ap/at32ap700x.c
@@ -1285,7 +1285,6 @@ at32_add_device_mci(unsigned int id, struct mci_platform_data *data)
{
struct mci_platform_data _data;
struct platform_device *pdev;
- struct dw_dma_slave *dws;
if (id != 0)
return NULL;
@@ -1301,6 +1300,8 @@ at32_add_device_mci(unsigned int id, struct mci_platform_data *data)
if (!data) {
data = &_data;
memset(data, 0, sizeof(struct mci_platform_data));
+ data->detect_pin = GPIO_PIN_NONE;
+ data->wp_pin = GPIO_PIN_NONE;
}
if (platform_device_add_data(pdev, data,
@@ -1314,12 +1315,10 @@ at32_add_device_mci(unsigned int id, struct mci_platform_data *data)
select_peripheral(PA(14), PERIPH_A, 0); /* DATA2 */
select_peripheral(PA(15), PERIPH_A, 0); /* DATA3 */
- if (data) {
- if (data->detect_pin != GPIO_PIN_NONE)
- at32_select_gpio(data->detect_pin, 0);
- if (data->wp_pin != GPIO_PIN_NONE)
- at32_select_gpio(data->wp_pin, 0);
- }
+ if (data->detect_pin != GPIO_PIN_NONE)
+ at32_select_gpio(data->detect_pin, 0);
+ if (data->wp_pin != GPIO_PIN_NONE)
+ at32_select_gpio(data->wp_pin, 0);
atmel_mci0_pclk.dev = &pdev->dev;
@@ -1937,9 +1936,11 @@ static struct clk atmel_ac97c0_pclk = {
.index = 10,
};
-struct platform_device *__init at32_add_device_ac97c(unsigned int id)
+struct platform_device *__init
+at32_add_device_ac97c(unsigned int id, struct ac97c_platform_data *data)
{
struct platform_device *pdev;
+ struct ac97c_platform_data _data;
if (id != 0)
return NULL;
@@ -1950,19 +1951,37 @@ struct platform_device *__init at32_add_device_ac97c(unsigned int id)
if (platform_device_add_resources(pdev, atmel_ac97c0_resource,
ARRAY_SIZE(atmel_ac97c0_resource)))
- goto err_add_resources;
+ goto fail;
+
+ if (!data) {
+ data = &_data;
+ memset(data, 0, sizeof(struct ac97c_platform_data));
+ data->reset_pin = GPIO_PIN_NONE;
+ }
- select_peripheral(PB(20), PERIPH_B, 0); /* SYNC */
- select_peripheral(PB(21), PERIPH_B, 0); /* SDO */
- select_peripheral(PB(22), PERIPH_B, 0); /* SDI */
- select_peripheral(PB(23), PERIPH_B, 0); /* SCLK */
+ data->dma_rx_periph_id = 3;
+ data->dma_tx_periph_id = 4;
+ data->dma_controller_id = 0;
+
+ if (platform_device_add_data(pdev, data,
+ sizeof(struct ac97c_platform_data)))
+ goto fail;
+
+ select_peripheral(PB(20), PERIPH_B, 0); /* SDO */
+ select_peripheral(PB(21), PERIPH_B, 0); /* SYNC */
+ select_peripheral(PB(22), PERIPH_B, 0); /* SCLK */
+ select_peripheral(PB(23), PERIPH_B, 0); /* SDI */
+
+ /* TODO: gpio_is_valid(data->reset_pin) with kernel 2.6.26. */
+ if (data->reset_pin != GPIO_PIN_NONE)
+ at32_select_gpio(data->reset_pin, 0);
atmel_ac97c0_pclk.dev = &pdev->dev;
platform_device_add(pdev);
return pdev;
-err_add_resources:
+fail:
platform_device_put(pdev);
return NULL;
}
diff --git a/drivers/misc/atmel-ssc.c b/drivers/misc/atmel-ssc.c
index e171650766c..bf5e4d06543 100644
--- a/drivers/misc/atmel-ssc.c
+++ b/drivers/misc/atmel-ssc.c
@@ -13,7 +13,6 @@
#include <linux/clk.h>
#include <linux/err.h>
#include <linux/io.h>
-#include <linux/list.h>
#include <linux/spinlock.h>
#include <linux/atmel-ssc.h>
diff --git a/drivers/mmc/host/atmel-mci.c b/drivers/mmc/host/atmel-mci.c
index b68381f7bfd..82bbbe99816 100644
--- a/drivers/mmc/host/atmel-mci.c
+++ b/drivers/mmc/host/atmel-mci.c
@@ -11,6 +11,7 @@
#include <linux/clk.h>
#include <linux/debugfs.h>
#include <linux/device.h>
+#include <linux/err.h>
#include <linux/init.h>
#include <linux/interrupt.h>
#include <linux/ioport.h>
diff --git a/include/asm-avr32/arch-at32ap/board.h b/include/asm-avr32/arch-at32ap/board.h
index 893aa6d0cd1..e60e9076544 100644
--- a/include/asm-avr32/arch-at32ap/board.h
+++ b/include/asm-avr32/arch-at32ap/board.h
@@ -82,7 +82,15 @@ struct mci_platform_data;
struct platform_device *
at32_add_device_mci(unsigned int id, struct mci_platform_data *data);
-struct platform_device *at32_add_device_ac97c(unsigned int id);
+struct ac97c_platform_data {
+ unsigned short dma_rx_periph_id;
+ unsigned short dma_tx_periph_id;
+ unsigned short dma_controller_id;
+ int reset_pin;
+};
+struct platform_device *
+at32_add_device_ac97c(unsigned int id, struct ac97c_platform_data *data);
+
struct platform_device *at32_add_device_abdac(unsigned int id);
struct platform_device *at32_add_device_psif(unsigned int id);