aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-shmobile/board-ag5evm.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-11-06 17:28:13 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2011-11-06 17:28:13 -0800
commit0e4c9dc2f2e0fb6d3838eba34382fc6d2d1c381c (patch)
tree14d4ba299004c27ae16169c78233babb0630f139 /arch/arm/mach-shmobile/board-ag5evm.c
parentMerge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc (diff)
parentARM: mach-shmobile: ag5evm needs CONFIG_I2C (diff)
downloadlinux-dev-0e4c9dc2f2e0fb6d3838eba34382fc6d2d1c381c.tar.xz
linux-dev-0e4c9dc2f2e0fb6d3838eba34382fc6d2d1c381c.zip
Merge branch 'rmobile-latest' of git://github.com/pmundt/linux-sh
* 'rmobile-latest' of git://github.com/pmundt/linux-sh: (21 commits) ARM: mach-shmobile: ag5evm needs CONFIG_I2C ARM: mach-shmobile: sh73a0 and AG5EVM PINT support ARM: mach-shmobile: Add support for PINT though INTC macros ARM: mach-shmobile: SDHI0 GPIO hotplug for AG5EVM ARM: mach-shmobile: Use common INTC IRQ code on sh73a0 ARM: mach-shmobile: Use common INTC IRQ code on sh7372 ARM: mach-shmobile: Use common INTC IRQ code on sh7377 ARM: mach-shmobile: Use common INTC IRQ code on sh7367 ARM: mach-shmobile: sh73a0 GPIO IRQ support ARM: sh7372 ap4evb NOR Flash USB boot fix ARM: mach-shmobile: sh7372 Mackerel NOR Flash USB boot fix sh: intc: Allow triggering on both edges for ARM SoCs ARM: mach-shmobile: Break out INTC IRQ code ARM: mach-shmobile: Kota2 SDHI0 and SDHI1 support ARM: mach-shmobile: Kota2 SCIFA4 and SCIFB support ARM: mach-shmobile: Kota2 MMCIF support ARM: mach-shmobile: Kota2 GPIO LEDs support ARM: mach-shmobile: Kota2 GPIO Keys support ARM: mach-shmobile: Kota2 KEYSC support ARM: mach-shmobile: Kota2 SCIFA2 and SMSC911X support ...
Diffstat (limited to 'arch/arm/mach-shmobile/board-ag5evm.c')
-rw-r--r--arch/arm/mach-shmobile/board-ag5evm.c36
1 files changed, 21 insertions, 15 deletions
diff --git a/arch/arm/mach-shmobile/board-ag5evm.c b/arch/arm/mach-shmobile/board-ag5evm.c
index 475342bcc95c..83624e26b884 100644
--- a/arch/arm/mach-shmobile/board-ag5evm.c
+++ b/arch/arm/mach-shmobile/board-ag5evm.c
@@ -59,7 +59,7 @@ static struct resource smsc9220_resources[] = {
.flags = IORESOURCE_MEM,
},
[1] = {
- .start = gic_spi(33), /* PINT1 */
+ .start = SH73A0_PINT0_IRQ(2), /* PINTA2 */
.flags = IORESOURCE_IRQ,
},
};
@@ -339,6 +339,18 @@ static struct platform_device mipidsi0_device = {
},
};
+/* SDHI0 */
+static irqreturn_t ag5evm_sdhi0_gpio_cd(int irq, void *arg)
+{
+ struct device *dev = arg;
+ struct sh_mobile_sdhi_info *info = dev->platform_data;
+ struct tmio_mmc_data *pdata = info->pdata;
+
+ tmio_mmc_cd_wakeup(pdata);
+
+ return IRQ_HANDLED;
+}
+
static struct sh_mobile_sdhi_info sdhi0_info = {
.dma_slave_tx = SHDMA_SLAVE_SDHI0_TX,
.dma_slave_rx = SHDMA_SLAVE_SDHI0_RX,
@@ -462,19 +474,6 @@ static void __init ag5evm_map_io(void)
shmobile_setup_console();
}
-#define PINTC_ADDR 0xe6900000
-#define PINTER0A (PINTC_ADDR + 0xa0)
-#define PINTCR0A (PINTC_ADDR + 0xb0)
-
-void __init ag5evm_init_irq(void)
-{
- sh73a0_init_irq();
-
- /* setup PINT: enable PINTA2 as active low */
- __raw_writel(__raw_readl(PINTER0A) | (1<<29), PINTER0A);
- __raw_writew(__raw_readw(PINTCR0A) | (2<<10), PINTCR0A);
-}
-
#define DSI0PHYCR 0xe615006c
static void __init ag5evm_init(void)
@@ -570,6 +569,13 @@ static void __init ag5evm_init(void)
gpio_request(GPIO_FN_SDHID0_1, NULL);
gpio_request(GPIO_FN_SDHID0_0, NULL);
+ if (!request_irq(intcs_evt2irq(0x3c0), ag5evm_sdhi0_gpio_cd,
+ IRQF_TRIGGER_FALLING | IRQF_TRIGGER_RISING,
+ "sdhi0 cd", &sdhi0_device.dev))
+ sdhi0_info.tmio_flags |= TMIO_MMC_HAS_COLD_CD;
+ else
+ pr_warn("Unable to setup SDHI0 GPIO IRQ\n");
+
/* enable SDHI1 on CN4 [WLAN I/F] */
gpio_request(GPIO_FN_SDHICLK1, NULL);
gpio_request(GPIO_FN_SDHICMD1_PU, NULL);
@@ -601,7 +607,7 @@ struct sys_timer ag5evm_timer = {
MACHINE_START(AG5EVM, "ag5evm")
.map_io = ag5evm_map_io,
- .init_irq = ag5evm_init_irq,
+ .init_irq = sh73a0_init_irq,
.handle_irq = shmobile_handle_irq_gic,
.init_machine = ag5evm_init,
.timer = &ag5evm_timer,