
On 5/4/07, Mark Pilant Mark.Pilant@mintera.com wrote:
while (cp->cpcr & CPM_CR_FLG) /* wait if cp is busy */
It is this second "while" that is "hanging". The generated code for the while is:
lis R9,0xff79
x: lwz R0,0x19c0(R9) andis. R11,r0,0x1 bne x
R9 correctly contains the CPM base, and the offset 0x19c0 is correct for the CPCR. So it would appear the code should be picking up the contents of location 0xff7919c0. Here is where the fun begins. The value retrieved by the code (into R0) is 0x00810000 but the value retrieved by the visionCLICK dm command is 00800000. (This is also the value displayed by the CPCR field of the "COMM" register list.
Very strange. Have you double-checked the LAWs to make sure the CCSR space is properly configured? And checked CCSRBAR to make sure that it's still *at* 0xff700000?
Also, is it possible the difference is due to a time delay between the CPU reading the memory and visionCLICK reading it?
Andy