summaryrefslogtreecommitdiff
path: root/firmware
diff options
context:
space:
mode:
authorBertrik Sikken <bertrik@sikken.nl>2011-04-18 21:13:40 +0000
committerBertrik Sikken <bertrik@sikken.nl>2011-04-18 21:13:40 +0000
commit8d1d2f8982a8c68a7572a82ebc8409e257e77994 (patch)
tree5709cdff442a1976079993bacbd616db366233f4 /firmware
parent79c6aca566198c3fd5f80cfd9f53f1ad73d8227d (diff)
downloadrockbox-8d1d2f8982a8c68a7572a82ebc8409e257e77994.tar.gz
rockbox-8d1d2f8982a8c68a7572a82ebc8409e257e77994.zip
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
Diffstat (limited to 'firmware')
-rw-r--r--firmware/target/arm/as3525/sansa-fuzev2/button-fuzev2.c4
-rw-r--r--firmware/target/arm/as3525/sd-as3525.c7
-rw-r--r--firmware/target/arm/as3525/sd-as3525v2.c2
3 files changed, 6 insertions, 7 deletions
diff --git a/firmware/target/arm/as3525/sansa-fuzev2/button-fuzev2.c b/firmware/target/arm/as3525/sansa-fuzev2/button-fuzev2.c
index 30f2c0df16..7f82b692c7 100644
--- a/firmware/target/arm/as3525/sansa-fuzev2/button-fuzev2.c
+++ b/firmware/target/arm/as3525/sansa-fuzev2/button-fuzev2.c
@@ -226,7 +226,7 @@ int button_read_device(void)
226 while(delay--) nop; 226 while(delay--) nop;
227 227
228 bool ccu_io_bit12 = CCU_IO & (1<<12); 228 bool ccu_io_bit12 = CCU_IO & (1<<12);
229 CCU_IO &= ~(1<<12); 229 bitclr32(&CCU_IO, 1<<12);
230 230
231 /* B1 is shared with FM i2c */ 231 /* B1 is shared with FM i2c */
232 bool gpiob_pin0_dir = GPIOB_DIR & (1<<1); 232 bool gpiob_pin0_dir = GPIOB_DIR & (1<<1);
@@ -256,7 +256,7 @@ int button_read_device(void)
256 GPIOB_DIR |= 1<<1; 256 GPIOB_DIR |= 1<<1;
257 257
258 if(ccu_io_bit12) 258 if(ccu_io_bit12)
259 CCU_IO |= 1<<12; 259 bitset32(&CCU_IO, 1<<12);
260 260
261#ifdef HAS_BUTTON_HOLD 261#ifdef HAS_BUTTON_HOLD
262#ifndef BOOTLOADER 262#ifndef BOOTLOADER
diff --git a/firmware/target/arm/as3525/sd-as3525.c b/firmware/target/arm/as3525/sd-as3525.c
index 4f356c349e..b36c326cb6 100644
--- a/firmware/target/arm/as3525/sd-as3525.c
+++ b/firmware/target/arm/as3525/sd-as3525.c
@@ -564,8 +564,7 @@ int sd_init(void)
564 bitset32(&CGU_PERI, CGU_NAF_CLOCK_ENABLE); 564 bitset32(&CGU_PERI, CGU_NAF_CLOCK_ENABLE);
565#ifdef HAVE_MULTIDRIVE 565#ifdef HAVE_MULTIDRIVE
566 bitset32(&CGU_PERI, CGU_MCI_CLOCK_ENABLE); 566 bitset32(&CGU_PERI, CGU_MCI_CLOCK_ENABLE);
567 bitclr32(&CCU_IO, 1<<3); /* bits 3:2 = 01, xpd is SD interface */ 567 bitmod32(&CCU_IO, 1<<2, 3<<2); /* bits 3:2 = 01, xpd is SD interface */
568 bitset32(&CCU_IO, 1<<2);
569#endif 568#endif
570 569
571 semaphore_init(&transfer_completion_signal, 1, 0); 570 semaphore_init(&transfer_completion_signal, 1, 0);
@@ -970,7 +969,7 @@ void sd_enable(bool on)
970#if defined(HAVE_BUTTON_LIGHT) && defined(HAVE_MULTIDRIVE) 969#if defined(HAVE_BUTTON_LIGHT) && defined(HAVE_MULTIDRIVE)
971 /* buttonlight AMSes need a bit of special handling for the buttonlight 970 /* buttonlight AMSes need a bit of special handling for the buttonlight
972 * here due to the dual mapping of GPIOD and XPD */ 971 * here due to the dual mapping of GPIOD and XPD */
973 bitset32(&CCU_IO, 1<<2); /* XPD is SD-MCI interface (b3:2 = 01) */ 972 bitmod32(&CCU_IO, 1<<2, 3<<2); /* XPD is SD-MCI interface (b3:2 = 01) */
974 if (buttonlight_is_on) 973 if (buttonlight_is_on)
975 GPIOD_DIR &= ~(1<<7); 974 GPIOD_DIR &= ~(1<<7);
976 else 975 else
@@ -996,7 +995,7 @@ void sd_enable(bool on)
996#endif /* defined(HAVE_HOTSWAP) && defined (HAVE_ADJUSTABLE_CPU_VOLTAGE) */ 995#endif /* defined(HAVE_HOTSWAP) && defined (HAVE_ADJUSTABLE_CPU_VOLTAGE) */
997 996
998#if defined(HAVE_BUTTON_LIGHT) && defined(HAVE_MULTIDRIVE) 997#if defined(HAVE_BUTTON_LIGHT) && defined(HAVE_MULTIDRIVE)
999 bitclr32(&CCU_IO, 1<<2); /* XPD is general purpose IO (b3:2 = 00) */ 998 bitmod32(&CCU_IO, 0<<2, 3<<2); /* XPD is general purpose IO (b3:2 = 00) */
1000 if (buttonlight_is_on) 999 if (buttonlight_is_on)
1001 _buttonlight_on(); 1000 _buttonlight_on();
1002#endif 1001#endif
diff --git a/firmware/target/arm/as3525/sd-as3525v2.c b/firmware/target/arm/as3525/sd-as3525v2.c
index 022bd13b41..8134869c1e 100644
--- a/firmware/target/arm/as3525/sd-as3525v2.c
+++ b/firmware/target/arm/as3525/sd-as3525v2.c
@@ -753,7 +753,7 @@ int sd_init(void)
753 753
754#ifndef SANSA_CLIPV2 754#ifndef SANSA_CLIPV2
755 /* Configure XPD for SD-MCI interface */ 755 /* Configure XPD for SD-MCI interface */
756 bitset32(&CCU_IO, 1<<2); 756 bitmod32(&CCU_IO, 1<<2, 3<<2);
757#endif 757#endif
758 758
759 VIC_INT_ENABLE = INTERRUPT_NAND; 759 VIC_INT_ENABLE = INTERRUPT_NAND;