* Reading from ISP registers fails
@ 2009-07-21 8:37 matthias schwarz
2009-07-21 10:14 ` Roger Quadros
0 siblings, 1 reply; 4+ messages in thread
From: matthias schwarz @ 2009-07-21 8:37 UTC (permalink / raw)
To: linux-omap
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Reading from ISP registers fails
2009-07-21 8:37 Reading from ISP registers fails matthias schwarz
@ 2009-07-21 10:14 ` Roger Quadros
2009-07-21 11:01 ` matthias schwarz
0 siblings, 1 reply; 4+ messages in thread
From: Roger Quadros @ 2009-07-21 10:14 UTC (permalink / raw)
To: ext matthias schwarz; +Cc: linux-omap
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@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
You need to enable interface clocks before accessing any peripheral registers.
regards,
-roger
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Reading from ISP registers fails
2009-07-21 10:14 ` Roger Quadros
@ 2009-07-21 11:01 ` matthias schwarz
2009-07-21 15:45 ` Hiremath, Vaibhav
0 siblings, 1 reply; 4+ messages in thread
From: matthias schwarz @ 2009-07-21 11:01 UTC (permalink / raw)
To: Roger Quadros; +Cc: linux-omap
2009/7/21 Roger Quadros <ext-roger.quadros@nokia.com>:
> 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@vger.kernel.org
>> 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@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: Reading from ISP registers fails
2009-07-21 11:01 ` matthias schwarz
@ 2009-07-21 15:45 ` Hiremath, Vaibhav
0 siblings, 0 replies; 4+ messages in thread
From: Hiremath, Vaibhav @ 2009-07-21 15:45 UTC (permalink / raw)
To: matthias schwarz, Roger Quadros; +Cc: linux-omap
> -----Original Message-----
> From: linux-omap-owner@vger.kernel.org [mailto:linux-omap-
> owner@vger.kernel.org] On Behalf Of matthias schwarz
> Sent: Tuesday, July 21, 2009 4:31 PM
> To: Roger Quadros
> Cc: linux-omap@vger.kernel.org
> Subject: Re: Reading from ISP registers fails
>
> 2009/7/21 Roger Quadros <ext-roger.quadros@nokia.com>:
> > 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@vger.kernel.org
> >> 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");
[Hiremath, Vaibhav] Can you please make sure that you are getting valid clk structure?
Thanks,
Vaibhav Hiremath
> 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@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-07-21 15:45 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-07-21 8:37 Reading from ISP registers fails matthias schwarz
2009-07-21 10:14 ` Roger Quadros
2009-07-21 11:01 ` matthias schwarz
2009-07-21 15:45 ` Hiremath, Vaibhav
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.