MCF.WriteReg32(dev,DMCFGR,0x5aa50000|(1<<10));// CFGR (1<<10 == Allow output from slave)
MCF.WriteReg32(dev,DMCFGR,0x5aa50000|(1<<10));// Bug in silicon? If coming out of cold boot, and we don't do our little "song and dance" this has to be called.
MCF.FlushLLCommands(dev);
intr=MCF.ReadReg32(dev,DMSTATUS,&ds);
printf("/%d/%08x\n",r,ds);
MCF.FlushLLCommands(dev);
if(ds!=0xffffffff&&ds!=0x00000000)break;
}
// Make sure we are in halt.
MCF.WriteReg32(dev,DMCONTROL,0x80000001);// Make the debug module work properly.
MCF.WriteReg32(dev,DMCONTROL,0x80000001);// Initiate a halt request.
MCF.WriteReg32(dev,DMCONTROL,0x00000001);// Clear Halt Request.