On Thursday 14 July 2016 02:29 PM, Ran Shalit wrote: > Hello, > > I try to reference in kernel code mcspi status register (MCSPI_CHxSTAT > - 0x30 offset from 0x48098000 or 0x4809A000) in kernel code, but it > results in segmentation fault: > > ioaddr = ioremap_nocache(0x4809A000, SZ_4K); > *(( unsigned int*) (ioaddr+0)) = 0x12; > val = *(( unsigned int*) (ioaddr+0x30)); > printk("mymem 0x%x\n",val); <<----------------- > > I have re-checked the config of kernel, is it related to some device using spi ? > > > [ 24.126739] Unhandled fault: external abort on non-linefetch (0x1028) Usually, this means clock to the SPI controller is not enabled. Did you do a pm_runtime_enable() and pm_runtime_get_sync() before accessing the register? -- Regards Vignesh -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html