]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
Merge branch 'rmobile-latest' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal...
authorLinus Torvalds <torvalds@linux-foundation.org>
Thu, 13 Jan 2011 18:40:00 +0000 (10:40 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 13 Jan 2011 18:40:00 +0000 (10:40 -0800)
* '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

arch/arm/mach-shmobile/board-ap4evb.c
arch/arm/mach-shmobile/board-g4evm.c
arch/arm/mach-shmobile/board-mackerel.c
arch/arm/mach-shmobile/include/mach/head-ap4evb.txt
arch/arm/mach-shmobile/include/mach/head-mackerel.txt
arch/arm/mach-shmobile/intc-sh7367.c
arch/arm/mach-shmobile/intc-sh7372.c
arch/arm/mach-shmobile/intc-sh7377.c

index 5b9937c910ff6636726da523e781575da272f953..3cf0951caa2dd73d164f04a5ad1ef1f9ba356c1a 100644 (file)
@@ -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,
 };
 
index c13f01280b7ed85e6a5054d632129dfab85d056d..dee3e9231fb9a039548f2fe6a37a62371bd72863 100644 (file)
@@ -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 = {
index 5bcf5c1e139910aa839cba555d92959ee79b4750..7b15d21f0f68b473fc7e8d87a859effdece7670d 100644 (file)
@@ -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);
index e3ebfa73956e6c071f42b9fb35aaedf8d83d32b1..efd3687ba19080ca303dec38801cbcf5c629eeac 100644 (file)
@@ -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
index e3ebfa73956e6c071f42b9fb35aaedf8d83d32b1..efd3687ba19080ca303dec38801cbcf5c629eeac 100644 (file)
@@ -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
index 1a20c489b20d5e52e8e4debebad1206844e6c5af..2fe9704d5ea1cf081ca862a1b53f9d7034258b49 100644 (file)
@@ -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 } },
 };
 
index 30b2f400666af11a0097eb593b949affc818c547..f78a1ead71a5e3a8ce8d8b8a4229aaaca52ddc36 100644 (file)
@@ -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,
index 2cdeb8ccd821d3a0869db335dc63ee7bb51b6f89..dd568382cc9f7bacdad0dbb6e60fc70e2a6391ee 100644 (file)
@@ -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,