lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:	Fri, 16 May 2008 20:51:00 +0400
From:	Anton Vorontsov <avorontsov@...mvista.com>
To:	Kumar Gala <galak@...nel.crashing.org>,
	David Brownell <dbrownell@...rs.sourceforge.net>,
	Pierre Ossman <drzeus-mmc@...eus.cx>
Cc:	Jochen Friedrich <jochen@...am.de>,
	Timur Tabi <timur@...escale.com>, linuxppc-dev@...abs.org,
	linux-kernel@...r.kernel.org,
	spi-devel-general@...ts.sourceforge.net
Subject: [PATCH 4/4] [POWERPC] 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.

Signed-off-by: Anton Vorontsov <avorontsov@...mvista.com>
---
 arch/powerpc/platforms/86xx/mpc8610_hpcd.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/arch/powerpc/platforms/86xx/mpc8610_hpcd.c b/arch/powerpc/platforms/86xx/mpc8610_hpcd.c
index be430bc..47078e3 100644
--- a/arch/powerpc/platforms/86xx/mpc8610_hpcd.c
+++ b/arch/powerpc/platforms/86xx/mpc8610_hpcd.c
@@ -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 = {
-- 
1.5.5.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ