summaryrefslogtreecommitdiff
path: root/firmware/drivers/ata_mmc.c
diff options
context:
space:
mode:
authorJens Arnold <amiconn@rockbox.org>2004-11-17 21:24:21 +0000
committerJens Arnold <amiconn@rockbox.org>2004-11-17 21:24:21 +0000
commit605cf4c779f214c8a6f413d401e14a192352e62d (patch)
treecbe2190c310d94addb3823177ce6351f6627b055 /firmware/drivers/ata_mmc.c
parent2cf1a895603e538de0276033db8334f51758e881 (diff)
downloadrockbox-605cf4c779f214c8a6f413d401e14a192352e62d.tar.gz
rockbox-605cf4c779f214c8a6f413d401e14a192352e62d.zip
Fix: my previous adjustments broke access to external MMC on newer Ondio models (mask bit 2 == 1). Xor operator works bitwise, so both operators need to be logical values here
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5422 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/drivers/ata_mmc.c')
-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 897f59b8be..a61d28cb07 100644
--- a/firmware/drivers/ata_mmc.c
+++ b/firmware/drivers/ata_mmc.c
@@ -143,7 +143,7 @@ void mmc_select_clock(int card_no)
143{ 143{
144 /* set clock gate for external card / reset for internal card if the 144 /* set clock gate for external card / reset for internal card if the
145 * MMC clock polarity bit is 0, vice versa if it is 1 */ 145 * MMC clock polarity bit is 0, vice versa if it is 1 */
146 if ((card_no != 0) ^ (read_hw_mask() & MMC_CLOCK_POLARITY)) 146 if ((card_no != 0) ^ ((read_hw_mask() & MMC_CLOCK_POLARITY) != 0))
147 or_b(0x10, &PADRH); /* set clock gate PA12 */ 147 or_b(0x10, &PADRH); /* set clock gate PA12 */
148 else 148 else
149 and_b(~0x10, &PADRH); /* clear clock gate PA12 */ 149 and_b(~0x10, &PADRH); /* clear clock gate PA12 */