summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--firmware/drivers/ata_mmc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/firmware/drivers/ata_mmc.c b/firmware/drivers/ata_mmc.c
index 897f59b..a61d28c 100644
--- a/firmware/drivers/ata_mmc.c
+++ b/firmware/drivers/ata_mmc.c
@@ -143,7 +143,7 @@ void mmc_select_clock(int card_no)
{
/* set clock gate for external card / reset for internal card if the
* MMC clock polarity bit is 0, vice versa if it is 1 */
- if ((card_no != 0) ^ (read_hw_mask() & MMC_CLOCK_POLARITY))
+ if ((card_no != 0) ^ ((read_hw_mask() & MMC_CLOCK_POLARITY) != 0))
or_b(0x10, &PADRH); /* set clock gate PA12 */
else
and_b(~0x10, &PADRH); /* clear clock gate PA12 */