From: oharboe at B. <oh...@ma...> - 2009-08-26 21:16:09
|
Author: oharboe Date: 2009-08-26 21:16:08 +0200 (Wed, 26 Aug 2009) New Revision: 2632 Modified: trunk/src/target/cortex_a8.c Log: Matt Hsu <ma...@0x...> and Holger Hans Peter Freyther <ze...@se...> Before executing a new instruction wait for the previous instruction to be finished. This comes from the pseudo code of the cortex a8 trm. Modified: trunk/src/target/cortex_a8.c =================================================================== --- trunk/src/target/cortex_a8.c 2009-08-26 19:06:56 UTC (rev 2631) +++ trunk/src/target/cortex_a8.c 2009-08-26 19:16:08 UTC (rev 2632) @@ -161,7 +161,15 @@ swjdp_common_t *swjdp = &armv7a->swjdp_info; LOG_DEBUG("exec opcode 0x%08" PRIx32, opcode); + do + { + retvalue = mem_ap_read_atomic_u32(swjdp, + OMAP3530_DEBUG_BASE + CPUDBG_DSCR, &dscr); + } + while ((dscr & (1 << 24)) == 0); /* Wait for InstrCompl bit to be set */ + mem_ap_write_u32(swjdp, OMAP3530_DEBUG_BASE + CPUDBG_ITR, opcode); + do { retvalue = mem_ap_read_atomic_u32(swjdp, |