1
0
Fork 0
forked from len0rd/rockbox

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
This commit is contained in:
Jens Arnold 2004-11-17 21:24:21 +00:00
parent 2cf1a89560
commit 605cf4c779

View file

@ -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 */