I want to read value of the register CCM_CLPCR(Address: 20C_4000h base + 54h offset = 20C_4054h) ,and I my code is following:
|void __iomem *mx6_CCM_base = MX6_IO_ADDRESS(CCM_BASE_ADDR);|
|ret32 = readl(mx6_CCM_base + 0x54);|
|printk(KERN_ERR "---mx6_CCM_base + CLKCTL_CLPCR:%x-----reg--:%x--------\n",mx6_CCM_base + 0x54,ret32);|
So the log is :---mx6_CCM_base + CLKCTL_CLPCR:f40c4054-----reg--:178--------
But I'm so confused that why the addr is 0xf40c4054 not 0x20c4054(this value is on the reference manual).And I also find the following code
/* define virtual address */
#define PERIPBASE_VIRT 0xF0000000
#define MX6_IO_ADDRESS(x) ((x) - PERIPBASE_VIRT)
Maybe I dont know the basic knowedge about these code,could you give me some guideline in details,especially the virtual address?
and before this ,I want to know the value that I read is right?