2009/7/21 Roger Quadros <ext-roger.quadros@xxxxxxxxx>: > ext matthias schwarz wrote: >> >> Hello there, >> >> i just wrote a little kernel-module, which only executes the following >> lines of code: >> >> u32 syn_mode; >> void* iomem; >> struct resource* resource_ptr; >> >> resource_ptr = request_mem_region(0x480BC000, 0xFFF, "isp_ccdc"); >> >> iomem = ioremap(OMAP3ISP_REG(ISP_SYSCONFIG), 8); >> if(iomem == NULL) { >> printk("ioremap returned zero\n"); >> return 0; >> } >> syn_mode = ioread32(iomem); >> >> >> >> The resulting behaviour does not depend on which ISP register i am >> trying to read, it also happens for "OMAP3ISP_CCDC_REG_BASE + >> ISPCCDC_SYN_MODE" for example. And also when using >> "omap_readl(address)" to read those registers. >> >> So when this code is executed i get: >> >> Unhandled fault: external abort on non-linefetch (0x1028) at 0xd80bc004 >> Internal error: : 1028 [#1] PREEMPT >> Internal error: : 1028 [#1] PREEMPT >> Modules linked in:Modules linked in: camera(+) camera(+) ipv6 ipv6 >> >> CPU: 0 Not tainted (2.6.28-omap1 #15) >> [...] >> >> >> Hope someone can help me with what might be wrong. >> Thank you, >> Matthias >> -- >> 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 >> > > You need to enable interface clocks before accessing any peripheral > registers. > > regards, > -roger struct device_driver camera_drv = { .name = "camera" }; struct device camera_dev = { .driver = &camera_drv, }; [...] struct clk* clock; clock = clk_get(&camera_dev, "cam_ick"); clk_enable(clock); [...] so this would be it, wouldn't it? Thank you very much, Matthias -- 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