aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-shmobile/board-mackerel.c
diff options
context:
space:
mode:
authorYusuke Goda <yusuke.goda.sx@renesas.com>2011-01-07 04:48:36 -0500
committerPaul Mundt <lethal@linux-sh.org>2011-01-10 22:54:48 -0500
commitda5d1f4c9001c0aa2092019bdfa8f41e9985d163 (patch)
tree78f4b749872675ebe9711da0ca72d65bf54c2f29 /arch/arm/mach-shmobile/board-mackerel.c
parente54be894eae10eca9892e965cc9532f5d5a11767 (diff)
ARM: mach-shmobile: mackerel: Add support get_cd in CN23
Signed-off-by: Yusuke Goda <yusuke.goda.sx@renesas.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/arm/mach-shmobile/board-mackerel.c')
-rw-r--r--arch/arm/mach-shmobile/board-mackerel.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/arch/arm/mach-shmobile/board-mackerel.c b/arch/arm/mach-shmobile/board-mackerel.c
index 5bcf5c1e1399..f0547dcb1d8c 100644
--- a/arch/arm/mach-shmobile/board-mackerel.c
+++ b/arch/arm/mach-shmobile/board-mackerel.c
@@ -729,6 +729,15 @@ static struct platform_device sdhi1_device = {
729}; 729};
730#endif 730#endif
731 731
732/*
733 * The card detect pin of the top SD/MMC slot (CN23) is active low and is
734 * connected to GPIO SCIFB_SCK of SH7372 (GPIO_PORT162).
735 */
736static int slot_cn23_get_cd(struct platform_device *pdev)
737{
738 return !gpio_get_value(GPIO_PORT162);
739}
740
732/* SDHI2 */ 741/* SDHI2 */
733static struct sh_mobile_sdhi_info sdhi2_info = { 742static struct sh_mobile_sdhi_info sdhi2_info = {
734 .dma_slave_tx = SHDMA_SLAVE_SDHI2_TX, 743 .dma_slave_tx = SHDMA_SLAVE_SDHI2_TX,
@@ -736,6 +745,7 @@ static struct sh_mobile_sdhi_info sdhi2_info = {
736 .tmio_flags = TMIO_MMC_WRPROTECT_DISABLE, 745 .tmio_flags = TMIO_MMC_WRPROTECT_DISABLE,
737 .tmio_caps = MMC_CAP_SD_HIGHSPEED | 746 .tmio_caps = MMC_CAP_SD_HIGHSPEED |
738 MMC_CAP_NEEDS_POLL, 747 MMC_CAP_NEEDS_POLL,
748 .get_cd = slot_cn23_get_cd,
739}; 749};
740 750
741static struct resource sdhi2_resources[] = { 751static struct resource sdhi2_resources[] = {
@@ -1127,6 +1137,10 @@ static void __init mackerel_init(void)
1127 gpio_request(GPIO_FN_SDHID2_1, NULL); 1137 gpio_request(GPIO_FN_SDHID2_1, NULL);
1128 gpio_request(GPIO_FN_SDHID2_0, NULL); 1138 gpio_request(GPIO_FN_SDHID2_0, NULL);
1129 1139
1140 /* card detect pin for microSD slot (CN23) */
1141 gpio_request(GPIO_PORT162, NULL);
1142 gpio_direction_input(GPIO_PORT162);
1143
1130 /* MMCIF */ 1144 /* MMCIF */
1131 gpio_request(GPIO_FN_MMCD0_0, NULL); 1145 gpio_request(GPIO_FN_MMCD0_0, NULL);
1132 gpio_request(GPIO_FN_MMCD0_1, NULL); 1146 gpio_request(GPIO_FN_MMCD0_1, NULL);