aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-shmobile
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-01-13 13:40:00 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2011-01-13 13:40:00 -0500
commitd20056032e20061db6583f517a4d3ea4492a94f1 (patch)
tree2cedbf4c8a427a987bdd6799eecfc441816bf9d0 /arch/arm/mach-shmobile
parent86f6f9b64a730844f1438cbedfacd6fb0170a7f7 (diff)
parentceb50f33d478ca42baf72257381a923c797b418b (diff)
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
Diffstat (limited to 'arch/arm/mach-shmobile')
-rw-r--r--arch/arm/mach-shmobile/board-ap4evb.c8
-rw-r--r--arch/arm/mach-shmobile/board-g4evm.c15
-rw-r--r--arch/arm/mach-shmobile/board-mackerel.c35
-rw-r--r--arch/arm/mach-shmobile/include/mach/head-ap4evb.txt7
-rw-r--r--arch/arm/mach-shmobile/include/mach/head-mackerel.txt7
-rw-r--r--arch/arm/mach-shmobile/intc-sh7367.c6
-rw-r--r--arch/arm/mach-shmobile/intc-sh7372.c4
-rw-r--r--arch/arm/mach-shmobile/intc-sh7377.c4
8 files changed, 67 insertions, 19 deletions
diff --git a/arch/arm/mach-shmobile/board-ap4evb.c b/arch/arm/mach-shmobile/board-ap4evb.c
index 5b9937c910ff..3cf0951caa2d 100644
--- a/arch/arm/mach-shmobile/board-ap4evb.c
+++ b/arch/arm/mach-shmobile/board-ap4evb.c
@@ -247,10 +247,7 @@ static struct platform_device smc911x_device = {
247 */ 247 */
248static int slot_cn7_get_cd(struct platform_device *pdev) 248static int slot_cn7_get_cd(struct platform_device *pdev)
249{ 249{
250 if (gpio_is_valid(GPIO_PORT41)) 250 return !gpio_get_value(GPIO_PORT41);
251 return !gpio_get_value(GPIO_PORT41);
252 else
253 return -ENXIO;
254} 251}
255 252
256/* SH_MMCIF */ 253/* SH_MMCIF */
@@ -308,6 +305,7 @@ static struct platform_device sh_mmcif_device = {
308static struct sh_mobile_sdhi_info sdhi0_info = { 305static struct sh_mobile_sdhi_info sdhi0_info = {
309 .dma_slave_tx = SHDMA_SLAVE_SDHI0_TX, 306 .dma_slave_tx = SHDMA_SLAVE_SDHI0_TX,
310 .dma_slave_rx = SHDMA_SLAVE_SDHI0_RX, 307 .dma_slave_rx = SHDMA_SLAVE_SDHI0_RX,
308 .tmio_caps = MMC_CAP_SDIO_IRQ,
311}; 309};
312 310
313static struct resource sdhi0_resources[] = { 311static struct resource sdhi0_resources[] = {
@@ -339,7 +337,7 @@ static struct sh_mobile_sdhi_info sdhi1_info = {
339 .dma_slave_rx = SHDMA_SLAVE_SDHI1_RX, 337 .dma_slave_rx = SHDMA_SLAVE_SDHI1_RX,
340 .tmio_ocr_mask = MMC_VDD_165_195, 338 .tmio_ocr_mask = MMC_VDD_165_195,
341 .tmio_flags = TMIO_MMC_WRPROTECT_DISABLE, 339 .tmio_flags = TMIO_MMC_WRPROTECT_DISABLE,
342 .tmio_caps = MMC_CAP_NEEDS_POLL, 340 .tmio_caps = MMC_CAP_NEEDS_POLL | MMC_CAP_SDIO_IRQ,
343 .get_cd = slot_cn7_get_cd, 341 .get_cd = slot_cn7_get_cd,
344}; 342};
345 343
diff --git a/arch/arm/mach-shmobile/board-g4evm.c b/arch/arm/mach-shmobile/board-g4evm.c
index c13f01280b7e..dee3e9231fb9 100644
--- a/arch/arm/mach-shmobile/board-g4evm.c
+++ b/arch/arm/mach-shmobile/board-g4evm.c
@@ -30,6 +30,7 @@
30#include <linux/io.h> 30#include <linux/io.h>
31#include <linux/input.h> 31#include <linux/input.h>
32#include <linux/input/sh_keysc.h> 32#include <linux/input/sh_keysc.h>
33#include <linux/mmc/host.h>
33#include <linux/mfd/sh_mobile_sdhi.h> 34#include <linux/mfd/sh_mobile_sdhi.h>
34#include <linux/gpio.h> 35#include <linux/gpio.h>
35#include <mach/sh7377.h> 36#include <mach/sh7377.h>
@@ -196,6 +197,10 @@ static struct platform_device keysc_device = {
196}; 197};
197 198
198/* SDHI */ 199/* SDHI */
200static struct sh_mobile_sdhi_info sdhi0_info = {
201 .tmio_caps = MMC_CAP_SDIO_IRQ,
202};
203
199static struct resource sdhi0_resources[] = { 204static struct resource sdhi0_resources[] = {
200 [0] = { 205 [0] = {
201 .name = "SDHI0", 206 .name = "SDHI0",
@@ -214,6 +219,13 @@ static struct platform_device sdhi0_device = {
214 .num_resources = ARRAY_SIZE(sdhi0_resources), 219 .num_resources = ARRAY_SIZE(sdhi0_resources),
215 .resource = sdhi0_resources, 220 .resource = sdhi0_resources,
216 .id = 0, 221 .id = 0,
222 .dev = {
223 .platform_data = &sdhi0_info,
224 },
225};
226
227static struct sh_mobile_sdhi_info sdhi1_info = {
228 .tmio_caps = MMC_CAP_NONREMOVABLE | MMC_CAP_SDIO_IRQ,
217}; 229};
218 230
219static struct resource sdhi1_resources[] = { 231static struct resource sdhi1_resources[] = {
@@ -234,6 +246,9 @@ static struct platform_device sdhi1_device = {
234 .num_resources = ARRAY_SIZE(sdhi1_resources), 246 .num_resources = ARRAY_SIZE(sdhi1_resources),
235 .resource = sdhi1_resources, 247 .resource = sdhi1_resources,
236 .id = 1, 248 .id = 1,
249 .dev = {
250 .platform_data = &sdhi1_info,
251 },
237}; 252};
238 253
239static struct platform_device *g4evm_devices[] __initdata = { 254static struct platform_device *g4evm_devices[] __initdata = {
diff --git a/arch/arm/mach-shmobile/board-mackerel.c b/arch/arm/mach-shmobile/board-mackerel.c
index 5bcf5c1e1399..7b15d21f0f68 100644
--- a/arch/arm/mach-shmobile/board-mackerel.c
+++ b/arch/arm/mach-shmobile/board-mackerel.c
@@ -657,17 +657,14 @@ static struct platform_device fsi_ak4643_device = {
657 */ 657 */
658static int slot_cn7_get_cd(struct platform_device *pdev) 658static int slot_cn7_get_cd(struct platform_device *pdev)
659{ 659{
660 if (gpio_is_valid(GPIO_PORT41)) 660 return !gpio_get_value(GPIO_PORT41);
661 return !gpio_get_value(GPIO_PORT41);
662 else
663 return -ENXIO;
664} 661}
665 662
666/* SDHI0 */ 663/* SDHI0 */
667static struct sh_mobile_sdhi_info sdhi0_info = { 664static struct sh_mobile_sdhi_info sdhi0_info = {
668 .dma_slave_tx = SHDMA_SLAVE_SDHI0_TX, 665 .dma_slave_tx = SHDMA_SLAVE_SDHI0_TX,
669 .dma_slave_rx = SHDMA_SLAVE_SDHI0_RX, 666 .dma_slave_rx = SHDMA_SLAVE_SDHI0_RX,
670 .tmio_caps = MMC_CAP_SD_HIGHSPEED, 667 .tmio_caps = MMC_CAP_SD_HIGHSPEED | MMC_CAP_SDIO_IRQ,
671}; 668};
672 669
673static struct resource sdhi0_resources[] = { 670static struct resource sdhi0_resources[] = {
@@ -700,7 +697,7 @@ static struct sh_mobile_sdhi_info sdhi1_info = {
700 .dma_slave_rx = SHDMA_SLAVE_SDHI1_RX, 697 .dma_slave_rx = SHDMA_SLAVE_SDHI1_RX,
701 .tmio_ocr_mask = MMC_VDD_165_195, 698 .tmio_ocr_mask = MMC_VDD_165_195,
702 .tmio_flags = TMIO_MMC_WRPROTECT_DISABLE, 699 .tmio_flags = TMIO_MMC_WRPROTECT_DISABLE,
703 .tmio_caps = MMC_CAP_SD_HIGHSPEED | 700 .tmio_caps = MMC_CAP_SD_HIGHSPEED | MMC_CAP_SDIO_IRQ |
704 MMC_CAP_NEEDS_POLL, 701 MMC_CAP_NEEDS_POLL,
705 .get_cd = slot_cn7_get_cd, 702 .get_cd = slot_cn7_get_cd,
706}; 703};
@@ -729,13 +726,23 @@ static struct platform_device sdhi1_device = {
729}; 726};
730#endif 727#endif
731 728
729/*
730 * The card detect pin of the top SD/MMC slot (CN23) is active low and is
731 * connected to GPIO SCIFB_SCK of SH7372 (GPIO_PORT162).
732 */
733static int slot_cn23_get_cd(struct platform_device *pdev)
734{
735 return !gpio_get_value(GPIO_PORT162);
736}
737
732/* SDHI2 */ 738/* SDHI2 */
733static struct sh_mobile_sdhi_info sdhi2_info = { 739static struct sh_mobile_sdhi_info sdhi2_info = {
734 .dma_slave_tx = SHDMA_SLAVE_SDHI2_TX, 740 .dma_slave_tx = SHDMA_SLAVE_SDHI2_TX,
735 .dma_slave_rx = SHDMA_SLAVE_SDHI2_RX, 741 .dma_slave_rx = SHDMA_SLAVE_SDHI2_RX,
736 .tmio_flags = TMIO_MMC_WRPROTECT_DISABLE, 742 .tmio_flags = TMIO_MMC_WRPROTECT_DISABLE,
737 .tmio_caps = MMC_CAP_SD_HIGHSPEED | 743 .tmio_caps = MMC_CAP_SD_HIGHSPEED | MMC_CAP_SDIO_IRQ |
738 MMC_CAP_NEEDS_POLL, 744 MMC_CAP_NEEDS_POLL,
745 .get_cd = slot_cn23_get_cd,
739}; 746};
740 747
741static struct resource sdhi2_resources[] = { 748static struct resource sdhi2_resources[] = {
@@ -953,6 +960,7 @@ static struct tca6416_keys_platform_data mackerel_tca6416_keys_info = {
953}; 960};
954 961
955/* I2C */ 962/* I2C */
963#define IRQ7 evt2irq(0x02e0)
956#define IRQ9 evt2irq(0x0320) 964#define IRQ9 evt2irq(0x0320)
957 965
958static struct i2c_board_info i2c0_devices[] = { 966static struct i2c_board_info i2c0_devices[] = {
@@ -965,6 +973,11 @@ static struct i2c_board_info i2c0_devices[] = {
965 .platform_data = &mackerel_tca6416_keys_info, 973 .platform_data = &mackerel_tca6416_keys_info,
966 .irq = IRQ9, 974 .irq = IRQ9,
967 }, 975 },
976 /* Touchscreen */
977 {
978 I2C_BOARD_INFO("st1232-ts", 0x55),
979 .irq = IRQ7,
980 },
968}; 981};
969 982
970#define IRQ21 evt2irq(0x32a0) 983#define IRQ21 evt2irq(0x32a0)
@@ -1092,6 +1105,10 @@ static void __init mackerel_init(void)
1092 gpio_request(GPIO_FN_IRQ9_42, NULL); 1105 gpio_request(GPIO_FN_IRQ9_42, NULL);
1093 set_irq_type(IRQ9, IRQ_TYPE_LEVEL_HIGH); 1106 set_irq_type(IRQ9, IRQ_TYPE_LEVEL_HIGH);
1094 1107
1108 /* enable Touchscreen */
1109 gpio_request(GPIO_FN_IRQ7_40, NULL);
1110 set_irq_type(IRQ7, IRQ_TYPE_LEVEL_LOW);
1111
1095 /* enable Accelerometer */ 1112 /* enable Accelerometer */
1096 gpio_request(GPIO_FN_IRQ21, NULL); 1113 gpio_request(GPIO_FN_IRQ21, NULL);
1097 set_irq_type(IRQ21, IRQ_TYPE_LEVEL_HIGH); 1114 set_irq_type(IRQ21, IRQ_TYPE_LEVEL_HIGH);
@@ -1127,6 +1144,10 @@ static void __init mackerel_init(void)
1127 gpio_request(GPIO_FN_SDHID2_1, NULL); 1144 gpio_request(GPIO_FN_SDHID2_1, NULL);
1128 gpio_request(GPIO_FN_SDHID2_0, NULL); 1145 gpio_request(GPIO_FN_SDHID2_0, NULL);
1129 1146
1147 /* card detect pin for microSD slot (CN23) */
1148 gpio_request(GPIO_PORT162, NULL);
1149 gpio_direction_input(GPIO_PORT162);
1150
1130 /* MMCIF */ 1151 /* MMCIF */
1131 gpio_request(GPIO_FN_MMCD0_0, NULL); 1152 gpio_request(GPIO_FN_MMCD0_0, NULL);
1132 gpio_request(GPIO_FN_MMCD0_1, NULL); 1153 gpio_request(GPIO_FN_MMCD0_1, NULL);
diff --git a/arch/arm/mach-shmobile/include/mach/head-ap4evb.txt b/arch/arm/mach-shmobile/include/mach/head-ap4evb.txt
index e3ebfa73956e..efd3687ba190 100644
--- a/arch/arm/mach-shmobile/include/mach/head-ap4evb.txt
+++ b/arch/arm/mach-shmobile/include/mach/head-ap4evb.txt
@@ -85,3 +85,10 @@ ED 0xE6150004, 0x80331050
85WAIT 1, 0xFE40009C 85WAIT 1, 0xFE40009C
86 86
87ED 0xE6150354, 0x00000002 87ED 0xE6150354, 0x00000002
88
89LIST "SCIF0 - Serial port for earlyprintk"
90EB 0xE6053098, 0x11
91EB 0xE6053098, 0xe1
92EW 0xE6C40000, 0x0000
93EB 0xE6C40004, 0x19
94EW 0xE6C40008, 0x3000
diff --git a/arch/arm/mach-shmobile/include/mach/head-mackerel.txt b/arch/arm/mach-shmobile/include/mach/head-mackerel.txt
index e3ebfa73956e..efd3687ba190 100644
--- a/arch/arm/mach-shmobile/include/mach/head-mackerel.txt
+++ b/arch/arm/mach-shmobile/include/mach/head-mackerel.txt
@@ -85,3 +85,10 @@ ED 0xE6150004, 0x80331050
85WAIT 1, 0xFE40009C 85WAIT 1, 0xFE40009C
86 86
87ED 0xE6150354, 0x00000002 87ED 0xE6150354, 0x00000002
88
89LIST "SCIF0 - Serial port for earlyprintk"
90EB 0xE6053098, 0x11
91EB 0xE6053098, 0xe1
92EW 0xE6C40000, 0x0000
93EB 0xE6C40004, 0x19
94EW 0xE6C40008, 0x3000
diff --git a/arch/arm/mach-shmobile/intc-sh7367.c b/arch/arm/mach-shmobile/intc-sh7367.c
index 1a20c489b20d..2fe9704d5ea1 100644
--- a/arch/arm/mach-shmobile/intc-sh7367.c
+++ b/arch/arm/mach-shmobile/intc-sh7367.c
@@ -189,10 +189,10 @@ static struct intc_mask_reg intca_mask_registers[] __initdata = {
189 { SCIFB, SCIFA5, SCIFA4, MSIOF1, 189 { SCIFB, SCIFA5, SCIFA4, MSIOF1,
190 0, 0, MSIOF2, 0 } }, 190 0, 0, MSIOF2, 0 } },
191 { 0xe694009c, 0xe69400dc, 8, /* IMR7A / IMCR7A */ 191 { 0xe694009c, 0xe69400dc, 8, /* IMR7A / IMCR7A */
192 { DISABLED, DISABLED, ENABLED, ENABLED, 192 { DISABLED, ENABLED, ENABLED, ENABLED,
193 FLCTL_FLTREQ1I, FLCTL_FLTREQ0I, FLCTL_FLTENDI, FLCTL_FLSTEI } }, 193 FLCTL_FLTREQ1I, FLCTL_FLTREQ0I, FLCTL_FLTENDI, FLCTL_FLSTEI } },
194 { 0xe69400a0, 0xe69400e0, 8, /* IMR8A / IMCR8A */ 194 { 0xe69400a0, 0xe69400e0, 8, /* IMR8A / IMCR8A */
195 { DISABLED, DISABLED, ENABLED, ENABLED, 195 { DISABLED, ENABLED, ENABLED, ENABLED,
196 TTI20, USBDMAC_USHDMI, SPU, SIU } }, 196 TTI20, USBDMAC_USHDMI, SPU, SIU } },
197 { 0xe69400a4, 0xe69400e4, 8, /* IMR9A / IMCR9A */ 197 { 0xe69400a4, 0xe69400e4, 8, /* IMR9A / IMCR9A */
198 { CMT1_CMT13, CMT1_CMT12, CMT1_CMT11, CMT1_CMT10, 198 { CMT1_CMT13, CMT1_CMT12, CMT1_CMT11, CMT1_CMT10,
@@ -207,7 +207,7 @@ static struct intc_mask_reg intca_mask_registers[] __initdata = {
207 { 0, 0, TPU0, TPU1, 207 { 0, 0, TPU0, TPU1,
208 TPU2, TPU3, TPU4, 0 } }, 208 TPU2, TPU3, TPU4, 0 } },
209 { 0xe69400b4, 0xe69400f4, 8, /* IMR13A / IMCR13A */ 209 { 0xe69400b4, 0xe69400f4, 8, /* IMR13A / IMCR13A */
210 { DISABLED, DISABLED, ENABLED, ENABLED, 210 { DISABLED, ENABLED, ENABLED, ENABLED,
211 MISTY, CMT3, RWDT1, RWDT0 } }, 211 MISTY, CMT3, RWDT1, RWDT0 } },
212}; 212};
213 213
diff --git a/arch/arm/mach-shmobile/intc-sh7372.c b/arch/arm/mach-shmobile/intc-sh7372.c
index 30b2f400666a..f78a1ead71a5 100644
--- a/arch/arm/mach-shmobile/intc-sh7372.c
+++ b/arch/arm/mach-shmobile/intc-sh7372.c
@@ -230,10 +230,10 @@ static struct intc_mask_reg intca_mask_registers[] __initdata = {
230 { SCIFB, SCIFA5, SCIFA4, MSIOF1, 230 { SCIFB, SCIFA5, SCIFA4, MSIOF1,
231 0, 0, MSIOF2, 0 } }, 231 0, 0, MSIOF2, 0 } },
232 { 0xe694009c, 0xe69400dc, 8, /* IMR7A / IMCR7A */ 232 { 0xe694009c, 0xe69400dc, 8, /* IMR7A / IMCR7A */
233 { DISABLED, DISABLED, ENABLED, ENABLED, 233 { DISABLED, ENABLED, ENABLED, ENABLED,
234 FLCTL_FLTREQ1I, FLCTL_FLTREQ0I, FLCTL_FLTENDI, FLCTL_FLSTEI } }, 234 FLCTL_FLTREQ1I, FLCTL_FLTREQ0I, FLCTL_FLTENDI, FLCTL_FLSTEI } },
235 { 0xe69400a0, 0xe69400e0, 8, /* IMR8A / IMCR8A */ 235 { 0xe69400a0, 0xe69400e0, 8, /* IMR8A / IMCR8A */
236 { 0, DISABLED, ENABLED, ENABLED, 236 { 0, ENABLED, ENABLED, ENABLED,
237 TTI20, USBHSDMAC0_USHDMI, 0, 0 } }, 237 TTI20, USBHSDMAC0_USHDMI, 0, 0 } },
238 { 0xe69400a4, 0xe69400e4, 8, /* IMR9A / IMCR9A */ 238 { 0xe69400a4, 0xe69400e4, 8, /* IMR9A / IMCR9A */
239 { CMT1_CMT13, CMT1_CMT12, CMT1_CMT11, CMT1_CMT10, 239 { CMT1_CMT13, CMT1_CMT12, CMT1_CMT11, CMT1_CMT10,
diff --git a/arch/arm/mach-shmobile/intc-sh7377.c b/arch/arm/mach-shmobile/intc-sh7377.c
index 2cdeb8ccd821..dd568382cc9f 100644
--- a/arch/arm/mach-shmobile/intc-sh7377.c
+++ b/arch/arm/mach-shmobile/intc-sh7377.c
@@ -234,10 +234,10 @@ static struct intc_mask_reg intca_mask_registers[] __initdata = {
234 { SCIFB, SCIFA5, SCIFA4, MSIOF1, 234 { SCIFB, SCIFA5, SCIFA4, MSIOF1,
235 0, 0, MSIOF2, 0 } }, 235 0, 0, MSIOF2, 0 } },
236 { 0xe694009c, 0xe69400dc, 8, /* IMR7A / IMCR7A */ 236 { 0xe694009c, 0xe69400dc, 8, /* IMR7A / IMCR7A */
237 { DISABLED, DISABLED, ENABLED, ENABLED, 237 { DISABLED, ENABLED, ENABLED, ENABLED,
238 FLCTL_FLTREQ1I, FLCTL_FLTREQ0I, FLCTL_FLTENDI, FLCTL_FLSTEI } }, 238 FLCTL_FLTREQ1I, FLCTL_FLTREQ0I, FLCTL_FLTENDI, FLCTL_FLSTEI } },
239 { 0xe69400a0, 0xe69400e0, 8, /* IMR8A / IMCR8A */ 239 { 0xe69400a0, 0xe69400e0, 8, /* IMR8A / IMCR8A */
240 { DISABLED, DISABLED, ENABLED, ENABLED, 240 { DISABLED, ENABLED, ENABLED, ENABLED,
241 TTI20, USBDMAC_USHDMI, 0, MSUG } }, 241 TTI20, USBDMAC_USHDMI, 0, MSUG } },
242 { 0xe69400a4, 0xe69400e4, 8, /* IMR9A / IMCR9A */ 242 { 0xe69400a4, 0xe69400e4, 8, /* IMR9A / IMCR9A */
243 { CMT1_CMT13, CMT1_CMT12, CMT1_CMT11, CMT1_CMT10, 243 { CMT1_CMT13, CMT1_CMT12, CMT1_CMT11, CMT1_CMT10,