summaryrefslogtreecommitdiffstats
path: root/firmware/target/arm/imx233/ssp-imx233.h
diff options
context:
space:
mode:
authorAmaury Pouly <amaury.pouly@gmail.com>2012-05-19 13:45:29 +0200
committerAmaury Pouly <amaury.pouly@gmail.com>2012-05-19 16:10:52 +0200
commit8b53c0f9a9cd421c90913032081b1c292ddb0806 (patch)
tree7afac426c344ec686d4202a78c854199b3cd6a3c /firmware/target/arm/imx233/ssp-imx233.h
parent3f59cf97089d2efef51fd7f231712bef2c154b21 (diff)
downloadrockbox-8b53c0f9a9cd421c90913032081b1c292ddb0806.tar.gz
rockbox-8b53c0f9a9cd421c90913032081b1c292ddb0806.tar.bz2
rockbox-8b53c0f9a9cd421c90913032081b1c292ddb0806.zip
imx233: completely rework the sd driver
Change-Id: I456df0d9f5eaee435bdfd5a3f667055715e53d2a
Diffstat (limited to 'firmware/target/arm/imx233/ssp-imx233.h')
-rw-r--r--firmware/target/arm/imx233/ssp-imx233.h13
1 files changed, 10 insertions, 3 deletions
diff --git a/firmware/target/arm/imx233/ssp-imx233.h b/firmware/target/arm/imx233/ssp-imx233.h
index a463c04a20..c168d5997c 100644
--- a/firmware/target/arm/imx233/ssp-imx233.h
+++ b/firmware/target/arm/imx233/ssp-imx233.h
@@ -7,7 +7,7 @@
* \/ \/ \/ \/ \/
* $Id$
*
- * Copyright (C) 2011 by amaury Pouly
+ * Copyright (C) 2011 by Amaury Pouly
*
* Based on Rockbox iriver bootloader by Linus Nielsen Feltzing
* and the ipodlinux bootloader by Daniel Palffy and Bernard Leach
@@ -170,8 +170,15 @@ void imx233_ssp_setup_ssp2_sd_mmc_pins(bool enable_pullups, unsigned bus_width,
/* after callback is fired, imx233_ssp_sdmmc_setup_detect needs to be called
* to enable detection again. If first_time is true, the callback will
* be called if the sd card is inserted when the function is called, otherwise
- * it will be called on the next insertion change. */
-void imx233_ssp_sdmmc_setup_detect(int ssp, bool enable, ssp_detect_cb_t fn, bool first_time);
+ * it will be called on the next insertion change.
+ * By default, sd_detect=1 means sd inserted; invert reverses this behaviour */
+void imx233_ssp_sdmmc_setup_detect(int ssp, bool enable, ssp_detect_cb_t fn,
+ bool first_time, bool invert);
+/* needs prior setup with imx233_ssp_sdmmc_setup_detect */
+bool imx233_ssp_sdmmc_is_detect_inverted(int spp);
+/* raw value of the detect pin */
+bool imx233_ssp_sdmmc_detect_raw(int ssp);
+/* corrected value given the invert setting */
bool imx233_ssp_sdmmc_detect(int ssp);
/* SD/MMC requires that the card be provided the clock during an init sequence of
* at least 1msec (or 74 clocks). Does NOT touch the clock so it has to be correct. */