summaryrefslogtreecommitdiff
path: root/firmware/target/mips/ingenic_jz47xx/onda_vx747/ata-sd-target.h
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target/mips/ingenic_jz47xx/onda_vx747/ata-sd-target.h')
-rw-r--r--firmware/target/mips/ingenic_jz47xx/onda_vx747/ata-sd-target.h19
1 files changed, 1 insertions, 18 deletions
diff --git a/firmware/target/mips/ingenic_jz47xx/onda_vx747/ata-sd-target.h b/firmware/target/mips/ingenic_jz47xx/onda_vx747/ata-sd-target.h
index ba324c1dcb..aed2b9cfea 100644
--- a/firmware/target/mips/ingenic_jz47xx/onda_vx747/ata-sd-target.h
+++ b/firmware/target/mips/ingenic_jz47xx/onda_vx747/ata-sd-target.h
@@ -39,29 +39,12 @@ int _sd_write_sectors(unsigned long start, int count, const void* buf);
39int _sd_init(void); 39int _sd_init(void);
40 40
41#define MMC_CD_PIN (29 + 1 * 32) /* Pin to check card insertion */ 41#define MMC_CD_PIN (29 + 1 * 32) /* Pin to check card insertion */
42//#define MMC_POWER_PIN (22 + 2 * 32) /* Pin to enable/disable card power */
43
44#ifdef MMC_POWER_PIN
45#define MMC_POWER_OFF() \
46do { \
47 __gpio_clear_pin(MMC_POWER_PIN); \
48} while (0)
49
50#define MMC_POWER_ON() \
51do { \
52 __gpio_set_pin(MMC_POWER_PIN); \
53} while (0)
54#endif
55 42
56static inline void mmc_init_gpio(void) 43static inline void mmc_init_gpio(void)
57{ 44{
58 __gpio_as_msc(); 45 __gpio_as_msc();
59 __gpio_as_input(MMC_CD_PIN); 46 __gpio_as_input(MMC_CD_PIN);
60#ifdef MMC_POWER_PIN 47 //__gpio_enable_pull(32*3+29);
61 __gpio_as_func0(MMC_POWER_PIN);
62 __gpio_as_output(MMC_POWER_PIN);
63#endif
64 __gpio_enable_pull(32*3+29);
65 __gpio_enable_pull(32*3+10); 48 __gpio_enable_pull(32*3+10);
66 __gpio_enable_pull(32*3+11); 49 __gpio_enable_pull(32*3+11);
67 __gpio_enable_pull(32*3+12); 50 __gpio_enable_pull(32*3+12);