forked from len0rd/rockbox
AMS: consistently use bitclr32/bitset32/bitmod32 for register CCU_IO (instead of using |= or &= )
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29748 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
79c6aca566
commit
8d1d2f8982
3 changed files with 6 additions and 7 deletions
|
|
@ -226,7 +226,7 @@ int button_read_device(void)
|
||||||
while(delay--) nop;
|
while(delay--) nop;
|
||||||
|
|
||||||
bool ccu_io_bit12 = CCU_IO & (1<<12);
|
bool ccu_io_bit12 = CCU_IO & (1<<12);
|
||||||
CCU_IO &= ~(1<<12);
|
bitclr32(&CCU_IO, 1<<12);
|
||||||
|
|
||||||
/* B1 is shared with FM i2c */
|
/* B1 is shared with FM i2c */
|
||||||
bool gpiob_pin0_dir = GPIOB_DIR & (1<<1);
|
bool gpiob_pin0_dir = GPIOB_DIR & (1<<1);
|
||||||
|
|
@ -256,7 +256,7 @@ int button_read_device(void)
|
||||||
GPIOB_DIR |= 1<<1;
|
GPIOB_DIR |= 1<<1;
|
||||||
|
|
||||||
if(ccu_io_bit12)
|
if(ccu_io_bit12)
|
||||||
CCU_IO |= 1<<12;
|
bitset32(&CCU_IO, 1<<12);
|
||||||
|
|
||||||
#ifdef HAS_BUTTON_HOLD
|
#ifdef HAS_BUTTON_HOLD
|
||||||
#ifndef BOOTLOADER
|
#ifndef BOOTLOADER
|
||||||
|
|
|
||||||
|
|
@ -564,8 +564,7 @@ int sd_init(void)
|
||||||
bitset32(&CGU_PERI, CGU_NAF_CLOCK_ENABLE);
|
bitset32(&CGU_PERI, CGU_NAF_CLOCK_ENABLE);
|
||||||
#ifdef HAVE_MULTIDRIVE
|
#ifdef HAVE_MULTIDRIVE
|
||||||
bitset32(&CGU_PERI, CGU_MCI_CLOCK_ENABLE);
|
bitset32(&CGU_PERI, CGU_MCI_CLOCK_ENABLE);
|
||||||
bitclr32(&CCU_IO, 1<<3); /* bits 3:2 = 01, xpd is SD interface */
|
bitmod32(&CCU_IO, 1<<2, 3<<2); /* bits 3:2 = 01, xpd is SD interface */
|
||||||
bitset32(&CCU_IO, 1<<2);
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
semaphore_init(&transfer_completion_signal, 1, 0);
|
semaphore_init(&transfer_completion_signal, 1, 0);
|
||||||
|
|
@ -970,7 +969,7 @@ void sd_enable(bool on)
|
||||||
#if defined(HAVE_BUTTON_LIGHT) && defined(HAVE_MULTIDRIVE)
|
#if defined(HAVE_BUTTON_LIGHT) && defined(HAVE_MULTIDRIVE)
|
||||||
/* buttonlight AMSes need a bit of special handling for the buttonlight
|
/* buttonlight AMSes need a bit of special handling for the buttonlight
|
||||||
* here due to the dual mapping of GPIOD and XPD */
|
* here due to the dual mapping of GPIOD and XPD */
|
||||||
bitset32(&CCU_IO, 1<<2); /* XPD is SD-MCI interface (b3:2 = 01) */
|
bitmod32(&CCU_IO, 1<<2, 3<<2); /* XPD is SD-MCI interface (b3:2 = 01) */
|
||||||
if (buttonlight_is_on)
|
if (buttonlight_is_on)
|
||||||
GPIOD_DIR &= ~(1<<7);
|
GPIOD_DIR &= ~(1<<7);
|
||||||
else
|
else
|
||||||
|
|
@ -996,7 +995,7 @@ void sd_enable(bool on)
|
||||||
#endif /* defined(HAVE_HOTSWAP) && defined (HAVE_ADJUSTABLE_CPU_VOLTAGE) */
|
#endif /* defined(HAVE_HOTSWAP) && defined (HAVE_ADJUSTABLE_CPU_VOLTAGE) */
|
||||||
|
|
||||||
#if defined(HAVE_BUTTON_LIGHT) && defined(HAVE_MULTIDRIVE)
|
#if defined(HAVE_BUTTON_LIGHT) && defined(HAVE_MULTIDRIVE)
|
||||||
bitclr32(&CCU_IO, 1<<2); /* XPD is general purpose IO (b3:2 = 00) */
|
bitmod32(&CCU_IO, 0<<2, 3<<2); /* XPD is general purpose IO (b3:2 = 00) */
|
||||||
if (buttonlight_is_on)
|
if (buttonlight_is_on)
|
||||||
_buttonlight_on();
|
_buttonlight_on();
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -753,7 +753,7 @@ int sd_init(void)
|
||||||
|
|
||||||
#ifndef SANSA_CLIPV2
|
#ifndef SANSA_CLIPV2
|
||||||
/* Configure XPD for SD-MCI interface */
|
/* Configure XPD for SD-MCI interface */
|
||||||
bitset32(&CCU_IO, 1<<2);
|
bitmod32(&CCU_IO, 1<<2, 3<<2);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
VIC_INT_ENABLE = INTERRUPT_NAND;
|
VIC_INT_ENABLE = INTERRUPT_NAND;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue