Merge branch 'rmobile-latest' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6
* 'rmobile-latest' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6: ARM: mach-shmobile: Kill off unused !gpio_is_valid() case ARM: mach-shmobile: sh7372 Enable SDIO IRQs for Mackerel ARM: mach-shmobile: sh7377 Enable SDIO IRQs ARM: mach-shmobile: sh7367 Enable SDIO IRQs ARM: mach-shmobile: sh7372 Enable SDIO IRQs ARM: mach-shmobile: mackerel: Add touchscreen ST1232 support ARM: mach-shmobile: ap4eb: SCIF port for earlyprintk when using zboot ARM: mach-shmobile: mackerel: SCIF port for earlyprintk when using zboot ARM: mach-shmobile: mackerel: Add support get_cd in CN23
This commit is contained in:
commit
d20056032e
|
@ -247,10 +247,7 @@ static struct platform_device smc911x_device = {
|
|||
*/
|
||||
static int slot_cn7_get_cd(struct platform_device *pdev)
|
||||
{
|
||||
if (gpio_is_valid(GPIO_PORT41))
|
||||
return !gpio_get_value(GPIO_PORT41);
|
||||
else
|
||||
return -ENXIO;
|
||||
return !gpio_get_value(GPIO_PORT41);
|
||||
}
|
||||
|
||||
/* SH_MMCIF */
|
||||
|
@ -308,6 +305,7 @@ static struct platform_device sh_mmcif_device = {
|
|||
static struct sh_mobile_sdhi_info sdhi0_info = {
|
||||
.dma_slave_tx = SHDMA_SLAVE_SDHI0_TX,
|
||||
.dma_slave_rx = SHDMA_SLAVE_SDHI0_RX,
|
||||
.tmio_caps = MMC_CAP_SDIO_IRQ,
|
||||
};
|
||||
|
||||
static struct resource sdhi0_resources[] = {
|
||||
|
@ -339,7 +337,7 @@ static struct sh_mobile_sdhi_info sdhi1_info = {
|
|||
.dma_slave_rx = SHDMA_SLAVE_SDHI1_RX,
|
||||
.tmio_ocr_mask = MMC_VDD_165_195,
|
||||
.tmio_flags = TMIO_MMC_WRPROTECT_DISABLE,
|
||||
.tmio_caps = MMC_CAP_NEEDS_POLL,
|
||||
.tmio_caps = MMC_CAP_NEEDS_POLL | MMC_CAP_SDIO_IRQ,
|
||||
.get_cd = slot_cn7_get_cd,
|
||||
};
|
||||
|
||||
|
|
|
@ -30,6 +30,7 @@
|
|||
#include <linux/io.h>
|
||||
#include <linux/input.h>
|
||||
#include <linux/input/sh_keysc.h>
|
||||
#include <linux/mmc/host.h>
|
||||
#include <linux/mfd/sh_mobile_sdhi.h>
|
||||
#include <linux/gpio.h>
|
||||
#include <mach/sh7377.h>
|
||||
|
@ -196,6 +197,10 @@ static struct platform_device keysc_device = {
|
|||
};
|
||||
|
||||
/* SDHI */
|
||||
static struct sh_mobile_sdhi_info sdhi0_info = {
|
||||
.tmio_caps = MMC_CAP_SDIO_IRQ,
|
||||
};
|
||||
|
||||
static struct resource sdhi0_resources[] = {
|
||||
[0] = {
|
||||
.name = "SDHI0",
|
||||
|
@ -214,6 +219,13 @@ static struct platform_device sdhi0_device = {
|
|||
.num_resources = ARRAY_SIZE(sdhi0_resources),
|
||||
.resource = sdhi0_resources,
|
||||
.id = 0,
|
||||
.dev = {
|
||||
.platform_data = &sdhi0_info,
|
||||
},
|
||||
};
|
||||
|
||||
static struct sh_mobile_sdhi_info sdhi1_info = {
|
||||
.tmio_caps = MMC_CAP_NONREMOVABLE | MMC_CAP_SDIO_IRQ,
|
||||
};
|
||||
|
||||
static struct resource sdhi1_resources[] = {
|
||||
|
@ -234,6 +246,9 @@ static struct platform_device sdhi1_device = {
|
|||
.num_resources = ARRAY_SIZE(sdhi1_resources),
|
||||
.resource = sdhi1_resources,
|
||||
.id = 1,
|
||||
.dev = {
|
||||
.platform_data = &sdhi1_info,
|
||||
},
|
||||
};
|
||||
|
||||
static struct platform_device *g4evm_devices[] __initdata = {
|
||||
|
|
|
@ -657,17 +657,14 @@ static struct platform_device fsi_ak4643_device = {
|
|||
*/
|
||||
static int slot_cn7_get_cd(struct platform_device *pdev)
|
||||
{
|
||||
if (gpio_is_valid(GPIO_PORT41))
|
||||
return !gpio_get_value(GPIO_PORT41);
|
||||
else
|
||||
return -ENXIO;
|
||||
return !gpio_get_value(GPIO_PORT41);
|
||||
}
|
||||
|
||||
/* SDHI0 */
|
||||
static struct sh_mobile_sdhi_info sdhi0_info = {
|
||||
.dma_slave_tx = SHDMA_SLAVE_SDHI0_TX,
|
||||
.dma_slave_rx = SHDMA_SLAVE_SDHI0_RX,
|
||||
.tmio_caps = MMC_CAP_SD_HIGHSPEED,
|
||||
.tmio_caps = MMC_CAP_SD_HIGHSPEED | MMC_CAP_SDIO_IRQ,
|
||||
};
|
||||
|
||||
static struct resource sdhi0_resources[] = {
|
||||
|
@ -700,7 +697,7 @@ static struct sh_mobile_sdhi_info sdhi1_info = {
|
|||
.dma_slave_rx = SHDMA_SLAVE_SDHI1_RX,
|
||||
.tmio_ocr_mask = MMC_VDD_165_195,
|
||||
.tmio_flags = TMIO_MMC_WRPROTECT_DISABLE,
|
||||
.tmio_caps = MMC_CAP_SD_HIGHSPEED |
|
||||
.tmio_caps = MMC_CAP_SD_HIGHSPEED | MMC_CAP_SDIO_IRQ |
|
||||
MMC_CAP_NEEDS_POLL,
|
||||
.get_cd = slot_cn7_get_cd,
|
||||
};
|
||||
|
@ -729,13 +726,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 |
|
||||
.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[] = {
|
||||
|
@ -953,6 +960,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[] = {
|
||||
|
@ -965,6 +973,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)
|
||||
|
@ -1092,6 +1105,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);
|
||||
|
@ -1127,6 +1144,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);
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -189,10 +189,10 @@ static struct intc_mask_reg intca_mask_registers[] __initdata = {
|
|||
{ SCIFB, SCIFA5, SCIFA4, MSIOF1,
|
||||
0, 0, MSIOF2, 0 } },
|
||||
{ 0xe694009c, 0xe69400dc, 8, /* IMR7A / IMCR7A */
|
||||
{ DISABLED, DISABLED, ENABLED, ENABLED,
|
||||
{ DISABLED, ENABLED, ENABLED, ENABLED,
|
||||
FLCTL_FLTREQ1I, FLCTL_FLTREQ0I, FLCTL_FLTENDI, FLCTL_FLSTEI } },
|
||||
{ 0xe69400a0, 0xe69400e0, 8, /* IMR8A / IMCR8A */
|
||||
{ DISABLED, DISABLED, ENABLED, ENABLED,
|
||||
{ DISABLED, ENABLED, ENABLED, ENABLED,
|
||||
TTI20, USBDMAC_USHDMI, SPU, SIU } },
|
||||
{ 0xe69400a4, 0xe69400e4, 8, /* IMR9A / IMCR9A */
|
||||
{ CMT1_CMT13, CMT1_CMT12, CMT1_CMT11, CMT1_CMT10,
|
||||
|
@ -207,7 +207,7 @@ static struct intc_mask_reg intca_mask_registers[] __initdata = {
|
|||
{ 0, 0, TPU0, TPU1,
|
||||
TPU2, TPU3, TPU4, 0 } },
|
||||
{ 0xe69400b4, 0xe69400f4, 8, /* IMR13A / IMCR13A */
|
||||
{ DISABLED, DISABLED, ENABLED, ENABLED,
|
||||
{ DISABLED, ENABLED, ENABLED, ENABLED,
|
||||
MISTY, CMT3, RWDT1, RWDT0 } },
|
||||
};
|
||||
|
||||
|
|
|
@ -230,10 +230,10 @@ static struct intc_mask_reg intca_mask_registers[] __initdata = {
|
|||
{ SCIFB, SCIFA5, SCIFA4, MSIOF1,
|
||||
0, 0, MSIOF2, 0 } },
|
||||
{ 0xe694009c, 0xe69400dc, 8, /* IMR7A / IMCR7A */
|
||||
{ DISABLED, DISABLED, ENABLED, ENABLED,
|
||||
{ DISABLED, ENABLED, ENABLED, ENABLED,
|
||||
FLCTL_FLTREQ1I, FLCTL_FLTREQ0I, FLCTL_FLTENDI, FLCTL_FLSTEI } },
|
||||
{ 0xe69400a0, 0xe69400e0, 8, /* IMR8A / IMCR8A */
|
||||
{ 0, DISABLED, ENABLED, ENABLED,
|
||||
{ 0, ENABLED, ENABLED, ENABLED,
|
||||
TTI20, USBHSDMAC0_USHDMI, 0, 0 } },
|
||||
{ 0xe69400a4, 0xe69400e4, 8, /* IMR9A / IMCR9A */
|
||||
{ CMT1_CMT13, CMT1_CMT12, CMT1_CMT11, CMT1_CMT10,
|
||||
|
|
|
@ -234,10 +234,10 @@ static struct intc_mask_reg intca_mask_registers[] __initdata = {
|
|||
{ SCIFB, SCIFA5, SCIFA4, MSIOF1,
|
||||
0, 0, MSIOF2, 0 } },
|
||||
{ 0xe694009c, 0xe69400dc, 8, /* IMR7A / IMCR7A */
|
||||
{ DISABLED, DISABLED, ENABLED, ENABLED,
|
||||
{ DISABLED, ENABLED, ENABLED, ENABLED,
|
||||
FLCTL_FLTREQ1I, FLCTL_FLTREQ0I, FLCTL_FLTENDI, FLCTL_FLSTEI } },
|
||||
{ 0xe69400a0, 0xe69400e0, 8, /* IMR8A / IMCR8A */
|
||||
{ DISABLED, DISABLED, ENABLED, ENABLED,
|
||||
{ DISABLED, ENABLED, ENABLED, ENABLED,
|
||||
TTI20, USBDMAC_USHDMI, 0, MSUG } },
|
||||
{ 0xe69400a4, 0xe69400e4, 8, /* IMR9A / IMCR9A */
|
||||
{ CMT1_CMT13, CMT1_CMT12, CMT1_CMT11, CMT1_CMT10,
|
||||
|
|
Loading…
Reference in New Issue