summaryrefslogtreecommitdiff
path: root/firmware/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/drivers')
-rw-r--r--firmware/drivers/ata_mmc.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/firmware/drivers/ata_mmc.c b/firmware/drivers/ata_mmc.c
index f927a1bdeb..897f59b8be 100644
--- a/firmware/drivers/ata_mmc.c
+++ b/firmware/drivers/ata_mmc.c
@@ -141,10 +141,12 @@ static void mmc_tick(void);
141 141
142void mmc_select_clock(int card_no) 142void mmc_select_clock(int card_no)
143{ 143{
144 if (card_no == 0) /* internal */ 144 /* set clock gate for external card / reset for internal card if the
145 or_b(0x10, &PADRH); /* set clock gate PA12 CHECKME: mask? */ 145 * MMC clock polarity bit is 0, vice versa if it is 1 */
146 else /* external */ 146 if ((card_no != 0) ^ (read_hw_mask() & MMC_CLOCK_POLARITY))
147 and_b(~0x10, &PADRH); /* clear clock gate PA12 CHECKME: mask?*/ 147 or_b(0x10, &PADRH); /* set clock gate PA12 */
148 else
149 and_b(~0x10, &PADRH); /* clear clock gate PA12 */
148} 150}
149 151
150static int select_card(int card_no) 152static int select_card(int card_no)