forked from Imagelibrary/rtems
Fixed typo in access macros for device control registers (DCR)
This commit is contained in:
@@ -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>
|
2008-07-16 Till Straumann <strauman@slac.stanford.edu>
|
||||||
|
|
||||||
* new-exceptions/bspsupport/vectors_init.c: added
|
* new-exceptions/bspsupport/vectors_init.c: added
|
||||||
|
|||||||
@@ -268,12 +268,12 @@ static inline void ppc_set_decrementer_register( uint32_t dec)
|
|||||||
* PPC4xx have Device Control Registers...
|
* PPC4xx have Device Control Registers...
|
||||||
*/
|
*/
|
||||||
#define PPC_DEVICE_CONTROL_REGISTER(dcr) \
|
#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;})
|
: "=r" (val)); val;})
|
||||||
|
|
||||||
#define PPC_SET_DEVICE_CONTROL_REGISTER(dcr,val) \
|
#define PPC_SET_DEVICE_CONTROL_REGISTER(dcr,val) \
|
||||||
do { \
|
do { \
|
||||||
asm volatile ("mtspr " PPC_STRINGOF(dcr)",%0" \
|
asm volatile ("mtdcr " PPC_STRINGOF(dcr)",%0" \
|
||||||
:: "r" (val)); \
|
:: "r" (val)); \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user