summaryrefslogtreecommitdiffstats
path: root/arch/avr32/kernel/process.c
diff options
context:
space:
mode:
authorHaavard Skinnemoen <hskinnemoen@atmel.com>2007-11-27 13:31:20 +0100
committerHaavard Skinnemoen <hskinnemoen@atmel.com>2007-12-07 14:54:40 +0100
commit8dfe8f29cd371affcc3c6b35658dc4bd95ee7b61 (patch)
treedc1919ab3638bf01694ad8d23745d76046879cf7 /arch/avr32/kernel/process.c
parent320516b78bf197fbf7a38ddab09e9dab75741bae (diff)
downloadtalos-op-linux-8dfe8f29cd371affcc3c6b35658dc4bd95ee7b61.tar.gz
talos-op-linux-8dfe8f29cd371affcc3c6b35658dc4bd95ee7b61.zip
[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 'arch/avr32/kernel/process.c')
-rw-r--r--arch/avr32/kernel/process.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/avr32/kernel/process.c b/arch/avr32/kernel/process.c
index f42a1d57cc72..9d6dac8af7a2 100644
--- a/arch/avr32/kernel/process.c
+++ b/arch/avr32/kernel/process.c
@@ -55,8 +55,8 @@ void machine_power_off(void)
void machine_restart(char *cmd)
{
- __mtdr(DBGREG_DC, DC_DBE);
- __mtdr(DBGREG_DC, DC_RES);
+ ocd_write(DC, (1 << OCD_DC_DBE_BIT));
+ ocd_write(DC, (1 << OCD_DC_RES_BIT));
while (1) ;
}
OpenPOWER on IntegriCloud