Skip to content

Commit

Permalink
Merge branch 'rmobile-latest' of git://github.com/pmundt/linux-sh
Browse files Browse the repository at this point in the history
* '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
  ...
  • Loading branch information
Linus Torvalds committed Nov 7, 2011
2 parents 1197ab2 + 99f8bd8 commit 0e4c9dc
Show file tree
Hide file tree
Showing 15 changed files with 1,063 additions and 198 deletions.
8 changes: 8 additions & 0 deletions arch/arm/mach-shmobile/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ config ARCH_SH73A0
select SH_CLK_CPG
select ARCH_WANT_OPTIONAL_GPIOLIB
select ARM_GIC
select I2C

comment "SH-Mobile Board Type"

Expand Down Expand Up @@ -69,6 +70,11 @@ config MACH_MACKEREL
depends on ARCH_SH7372
select ARCH_REQUIRE_GPIOLIB

config MACH_KOTA2
bool "KOTA2 board"
select ARCH_REQUIRE_GPIOLIB
depends on ARCH_SH73A0

comment "SH-Mobile System Configuration"

menu "Memory configuration"
Expand All @@ -78,6 +84,7 @@ config MEMORY_START
default "0x50000000" if MACH_G3EVM
default "0x40000000" if MACH_G4EVM || MACH_AP4EVB || MACH_AG5EVM || \
MACH_MACKEREL
default "0x41000000" if MACH_KOTA2
default "0x00000000"
---help---
Tweak this only when porting to a new machine which does not
Expand All @@ -89,6 +96,7 @@ config MEMORY_SIZE
default "0x08000000" if MACH_G3EVM
default "0x08000000" if MACH_G4EVM
default "0x20000000" if MACH_AG5EVM
default "0x1e000000" if MACH_KOTA2
default "0x10000000" if MACH_AP4EVB || MACH_MACKEREL
default "0x04000000"
help
Expand Down
1 change: 1 addition & 0 deletions arch/arm/mach-shmobile/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ obj-$(CONFIG_MACH_G4EVM) += board-g4evm.o
obj-$(CONFIG_MACH_AP4EVB) += board-ap4evb.o
obj-$(CONFIG_MACH_AG5EVM) += board-ag5evm.o
obj-$(CONFIG_MACH_MACKEREL) += board-mackerel.o
obj-$(CONFIG_MACH_KOTA2) += board-kota2.o

# Framework support
obj-$(CONFIG_SMP) += $(smp-y)
Expand Down
36 changes: 21 additions & 15 deletions arch/arm/mach-shmobile/board-ag5evm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
},
};
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions arch/arm/mach-shmobile/board-ap4evb.c
Original file line number Diff line number Diff line change
Expand Up @@ -200,8 +200,8 @@ static struct physmap_flash_data nor_flash_data = {

static struct resource nor_flash_resources[] = {
[0] = {
.start = 0x00000000,
.end = 0x08000000 - 1,
.start = 0x20000000, /* CS0 shadow instead of regular CS0 */
.end = 0x28000000 - 1, /* needed by USB MASK ROM boot */
.flags = IORESOURCE_MEM,
}
};
Expand Down
Loading

0 comments on commit 0e4c9dc

Please sign in to comment.