I am trying to read the GPIO5 register during the startup of the mxsfb_probe.
I had define the GPIO5 base address to 0x020AC000, as in the datasheet, as below:
#define MX6Q_GPIO5_BASE_ADDR 0x020AC000
And my coding on accessing the register as below:
void __iomem *gpio5_base = (void __iomem *)IMX_IO_P2V(MX6Q_GPIO5_BASE_ADDR);
glp05 = readl_relaxed(gpio5_base);
printk(KERN_INFO "gpio value is 0x%x\n", gpl05);
When the kernel runs until this line of code, it hangs. I tried to check for similiar readl_relaxed coding, and found out that in cpuidle_imx6ul.c, there are some readl_relaxed on MX6Q_ANATOP_BASE_ADDR, and the kernel had no problem running it.
May i know is there something that i missed out, or there is something that i need to add so that i can access the GPIO5 register directly?