diff options
author | Haavard Skinnemoen <hskinnemoen@atmel.com> | 2007-11-27 07:31:20 -0500 |
---|---|---|
committer | Haavard Skinnemoen <hskinnemoen@atmel.com> | 2007-12-07 08:54:40 -0500 |
commit | 8dfe8f29cd371affcc3c6b35658dc4bd95ee7b61 (patch) | |
tree | dc1919ab3638bf01694ad8d23745d76046879cf7 /include/asm-avr32/system.h | |
parent | 320516b78bf197fbf7a38ddab09e9dab75741bae (diff) |
[AVR32] Clean up OCD register usage
Generate a new set of OCD register definitions in asm/ocd.h and rename
__mfdr() and __mtdr() to ocd_read() and ocd_write() respectively.
The bitfield definitions are a lot more complete now, and they are
entirely based on bit numbers, not masks. This is because OCD
registers are frequently accessed from assembly code, where bit
numbers are a lot more useful (can be fed directly to sbr, bfins,
etc.)
Bitfields that consist of more than one bit have two definitions:
_START, which indicates the number of the first bit, and _SIZE, which
indicates the number of bits. These directly correspond to the
parameters taken by the bfextu, bfexts and bfins instructions.
Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
Diffstat (limited to 'include/asm-avr32/system.h')
-rw-r--r-- | include/asm-avr32/system.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/asm-avr32/system.h b/include/asm-avr32/system.h index dc2d527cef41..c600cc15cbcb 100644 --- a/include/asm-avr32/system.h +++ b/include/asm-avr32/system.h | |||
@@ -35,8 +35,8 @@ | |||
35 | #include <asm/ocd.h> | 35 | #include <asm/ocd.h> |
36 | #define finish_arch_switch(prev) \ | 36 | #define finish_arch_switch(prev) \ |
37 | do { \ | 37 | do { \ |
38 | __mtdr(DBGREG_PID, prev->pid); \ | 38 | ocd_write(PID, prev->pid); \ |
39 | __mtdr(DBGREG_PID, current->pid); \ | 39 | ocd_write(PID, current->pid); \ |
40 | } while(0) | 40 | } while(0) |
41 | #endif | 41 | #endif |
42 | 42 | ||