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>
This commit is contained in:
Родитель
e54be894ea
Коммит
da5d1f4c90
|
@ -729,6 +729,15 @@ static struct platform_device sdhi1_device = {
|
||||||
};
|
};
|
||||||
#endif
|
#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 */
|
/* SDHI2 */
|
||||||
static struct sh_mobile_sdhi_info sdhi2_info = {
|
static struct sh_mobile_sdhi_info sdhi2_info = {
|
||||||
.dma_slave_tx = SHDMA_SLAVE_SDHI2_TX,
|
.dma_slave_tx = SHDMA_SLAVE_SDHI2_TX,
|
||||||
|
@ -736,6 +745,7 @@ static struct sh_mobile_sdhi_info sdhi2_info = {
|
||||||
.tmio_flags = TMIO_MMC_WRPROTECT_DISABLE,
|
.tmio_flags = TMIO_MMC_WRPROTECT_DISABLE,
|
||||||
.tmio_caps = MMC_CAP_SD_HIGHSPEED |
|
.tmio_caps = MMC_CAP_SD_HIGHSPEED |
|
||||||
MMC_CAP_NEEDS_POLL,
|
MMC_CAP_NEEDS_POLL,
|
||||||
|
.get_cd = slot_cn23_get_cd,
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct resource sdhi2_resources[] = {
|
static struct resource sdhi2_resources[] = {
|
||||||
|
@ -1127,6 +1137,10 @@ static void __init mackerel_init(void)
|
||||||
gpio_request(GPIO_FN_SDHID2_1, NULL);
|
gpio_request(GPIO_FN_SDHID2_1, NULL);
|
||||||
gpio_request(GPIO_FN_SDHID2_0, 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 */
|
/* MMCIF */
|
||||||
gpio_request(GPIO_FN_MMCD0_0, NULL);
|
gpio_request(GPIO_FN_MMCD0_0, NULL);
|
||||||
gpio_request(GPIO_FN_MMCD0_1, NULL);
|
gpio_request(GPIO_FN_MMCD0_1, NULL);
|
||||||
|
|
Загрузка…
Ссылка в новой задаче