Again, I don't think power management is your problem. I think it must be somewhere else.
If you are reading the Config register and it is not returning what you think it should, check everything that has anything to do with reading from memory.
For example, do you have a limit less than the controllers address in your data selector register? If you are trying to read from 0xFFE00000 and your protection limit is 0xE0000000, you won't read from the controller.
Did you check to see if you are reading bytes or dwords? This was something that stung me a while back. I was reading a dword, so I thought, as the compiler optimized it to a byte read. The actual read from the controller was now a byte read and I was getting garbage. You need to make sure the compiler is not optimizing the read. The easiest way to do this is to make the memory read an external function of your C code.
Here is an example of what I was doing.
Code: Select all
if ((op_regs->HcRevision & 0x000000FF) != 0x10) return FALSE;
Code: Select all
bit32u mem_read_io_regs(const bit32u base, const bit32u offset) {
volatile bit32u dword = *((bit32u *) (base + offset));
return dword;
}
Ben