Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 230555
b: refs/heads/master
c: 53582c4
h: refs/heads/master
i:
  230553: 4fb975e
  230551: 6b4127e
v: v3
  • Loading branch information
Paul Mundt committed Jan 12, 2011
1 parent c49cfc7 commit 59b78b4
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: da97da73d418533187a8390cf6541f48bed653e8
refs/heads/master: 53582c4c508a95ece9f7c907edef9911c7eb79eb
24 changes: 24 additions & 0 deletions trunk/arch/arm/mach-shmobile/board-mackerel.c
Original file line number Diff line number Diff line change
Expand Up @@ -729,13 +729,23 @@ static struct platform_device sdhi1_device = {
};
#endif

/*
* The card detect pin of the top SD/MMC slot (CN23) is active low and is
* connected to GPIO SCIFB_SCK of SH7372 (GPIO_PORT162).
*/
static int slot_cn23_get_cd(struct platform_device *pdev)
{
return !gpio_get_value(GPIO_PORT162);
}

/* SDHI2 */
static struct sh_mobile_sdhi_info sdhi2_info = {
.dma_slave_tx = SHDMA_SLAVE_SDHI2_TX,
.dma_slave_rx = SHDMA_SLAVE_SDHI2_RX,
.tmio_flags = TMIO_MMC_WRPROTECT_DISABLE,
.tmio_caps = MMC_CAP_SD_HIGHSPEED | MMC_CAP_SDIO_IRQ |
MMC_CAP_NEEDS_POLL,
.get_cd = slot_cn23_get_cd,
};

static struct resource sdhi2_resources[] = {
Expand Down Expand Up @@ -953,6 +963,7 @@ static struct tca6416_keys_platform_data mackerel_tca6416_keys_info = {
};

/* I2C */
#define IRQ7 evt2irq(0x02e0)
#define IRQ9 evt2irq(0x0320)

static struct i2c_board_info i2c0_devices[] = {
Expand All @@ -965,6 +976,11 @@ static struct i2c_board_info i2c0_devices[] = {
.platform_data = &mackerel_tca6416_keys_info,
.irq = IRQ9,
},
/* Touchscreen */
{
I2C_BOARD_INFO("st1232-ts", 0x55),
.irq = IRQ7,
},
};

#define IRQ21 evt2irq(0x32a0)
Expand Down Expand Up @@ -1092,6 +1108,10 @@ static void __init mackerel_init(void)
gpio_request(GPIO_FN_IRQ9_42, NULL);
set_irq_type(IRQ9, IRQ_TYPE_LEVEL_HIGH);

/* enable Touchscreen */
gpio_request(GPIO_FN_IRQ7_40, NULL);
set_irq_type(IRQ7, IRQ_TYPE_LEVEL_LOW);

/* enable Accelerometer */
gpio_request(GPIO_FN_IRQ21, NULL);
set_irq_type(IRQ21, IRQ_TYPE_LEVEL_HIGH);
Expand Down Expand Up @@ -1127,6 +1147,10 @@ static void __init mackerel_init(void)
gpio_request(GPIO_FN_SDHID2_1, NULL);
gpio_request(GPIO_FN_SDHID2_0, NULL);

/* card detect pin for microSD slot (CN23) */
gpio_request(GPIO_PORT162, NULL);
gpio_direction_input(GPIO_PORT162);

/* MMCIF */
gpio_request(GPIO_FN_MMCD0_0, NULL);
gpio_request(GPIO_FN_MMCD0_1, NULL);
Expand Down
7 changes: 7 additions & 0 deletions trunk/arch/arm/mach-shmobile/include/mach/head-ap4evb.txt
Original file line number Diff line number Diff line change
Expand Up @@ -85,3 +85,10 @@ ED 0xE6150004, 0x80331050
WAIT 1, 0xFE40009C

ED 0xE6150354, 0x00000002

LIST "SCIF0 - Serial port for earlyprintk"
EB 0xE6053098, 0x11
EB 0xE6053098, 0xe1
EW 0xE6C40000, 0x0000
EB 0xE6C40004, 0x19
EW 0xE6C40008, 0x3000
7 changes: 7 additions & 0 deletions trunk/arch/arm/mach-shmobile/include/mach/head-mackerel.txt
Original file line number Diff line number Diff line change
Expand Up @@ -85,3 +85,10 @@ ED 0xE6150004, 0x80331050
WAIT 1, 0xFE40009C

ED 0xE6150354, 0x00000002

LIST "SCIF0 - Serial port for earlyprintk"
EB 0xE6053098, 0x11
EB 0xE6053098, 0xe1
EW 0xE6C40000, 0x0000
EB 0xE6C40004, 0x19
EW 0xE6C40008, 0x3000

0 comments on commit 59b78b4

Please sign in to comment.