Fixed typo in access macros for device control registers (DCR)

This commit is contained in:
Thomas Doerfler
2008-07-17 11:29:32 +00:00
parent 1380b630a8
commit ecb869f738
2 changed files with 7 additions and 2 deletions

View File

@@ -1,3 +1,8 @@
2008-07-17 Thomas Doerfler <thomas.doerfler@embedded-brains.de>
* shared/include/powerpc-utility.h:
Fixed typo in access macros for device control registers (DCR)
2008-07-16 Till Straumann <strauman@slac.stanford.edu>
* new-exceptions/bspsupport/vectors_init.c: added

View File

@@ -268,12 +268,12 @@ static inline void ppc_set_decrementer_register( uint32_t dec)
* PPC4xx have Device Control Registers...
*/
#define PPC_DEVICE_CONTROL_REGISTER(dcr) \
({uint32_t val;asm volatile ("mfspr %0," PPC_STRINGOF(dcr) \
({uint32_t val;asm volatile ("mfdcr %0," PPC_STRINGOF(dcr) \
: "=r" (val)); val;})
#define PPC_SET_DEVICE_CONTROL_REGISTER(dcr,val) \
do { \
asm volatile ("mtspr " PPC_STRINGOF(dcr)",%0" \
asm volatile ("mtdcr " PPC_STRINGOF(dcr)",%0" \
:: "r" (val)); \
} while (0)