]> git.sur5r.net Git - openocd/commitdiff
Fix argument passing in cortex_a8_write_cp.
authormlu <mlu@b42882b7-edfa-0310-969c-e2dbd0fdcd60>
Sun, 13 Sep 2009 13:57:50 +0000 (13:57 +0000)
committermlu <mlu@b42882b7-edfa-0310-969c-e2dbd0fdcd60>
Sun, 13 Sep 2009 13:57:50 +0000 (13:57 +0000)
git-svn-id: svn://svn.berlios.de/openocd/trunk@2701 b42882b7-edfa-0310-969c-e2dbd0fdcd60

src/target/cortex_a8.c

index 55a3c45b5549dbf61b3a2943f901b18257b95560..7a70515322286e78a061956df9405c02eb067778 100644 (file)
@@ -224,7 +224,6 @@ int cortex_a8_read_cp(target_t *target, uint32_t *value, uint8_t CP,
 
 int cortex_a8_write_cp(target_t *target, uint32_t value,
        uint8_t CP, uint8_t op1, uint8_t CRn, uint8_t CRm, uint8_t op2)
-/* TODO Fix this */
 {
        int retval;
        /* get pointers to arch-specific information */
@@ -237,7 +236,7 @@ int cortex_a8_write_cp(target_t *target, uint32_t value,
        /* Move DTRRX to r0 */
        cortex_a8_exec_opcode(target, ARMV4_5_MRC(14, 0, 0, 0, 5, 0));
 
-       cortex_a8_exec_opcode(target, ARMV4_5_MCR(CP, 0, 0, 0, 5, 0));
+       cortex_a8_exec_opcode(target, ARMV4_5_MCR(CP, op1, 0, CRn, CRm, op2));
        return retval;
 }