Skip to contentSkip to conversation

86xx: mpc8610_hpcd: add SD/MMC card detect polling

PATCH In review Anton Vorontsov 1 participant 1 message May 16, 2008

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 4/4 86xx: mpc8610_hpcd: add SD/MMC card detect polling

MPC8610HPCD seem to not use interrupts for the SD CD line, so we need poll it.

---
 arch/powerpc/platforms/86xx/mpc8610_hpcd.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
arch/powerpc/platforms/86xx/mpc8610_hpcd.c +6 -0
index be430bc..47078e3 100644
@@ -63,9 +63,15 @@ static int mmc_get_ro(struct device *dev)
 	return in_8(pixis_sdcsr) & PX_SDCSR_SD_WP;
 }
 
+static int mmc_get_cd(struct device *dev)
+{
+	return !(in_8(pixis_sdcsr) & PX_SDCSR_SD_nCD);
+}
+
 static struct mmc_spi_platform_data mmc_pdata = {
 	.ocr_mask = MMC_VDD_33_34,
 	.get_ro = mmc_get_ro,
+	.get_cd = mmc_get_cd,
 };
 
 static struct spi_board_info spi_boardinfo = {
Signature · 1 line
1.5.5.1