This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Segmentation default



我在写一个关于qep的驱动

我想通过ioremap的方式直接对寄存器进行操作

#define SOC_PWMSS2_REG 0x48304000//PWMSS2的物理地址
#define PWMSS_CLKCONFIG 0x0008//偏移地址

soc_pwmss2_reg = ioremap(SOC_PWMSS2_REG,16);

int tmp = readl(soc_pwmss2_reg + PWMSS_CLKCONFIG);

当我尝试如上这个readl的函数的时候,就会出现Segmentation default错误.

请问这是哪里出现问题了呢?是偏移16错了呢?还是基地址错误呢?