c - How to set register value to enable interrupt? -


i handling interrupt device in android. (android 4.2.2 kernel 2.6.29, running on mach-goldfish virtual device).

so far have registered device interrupt #17. hasn't been enabled yet signals sent interrupt ignored , interrupt handler not notified.

the register enables device @ offset 0x00, , memory address, returned by

(char __iomem *)io_address(resource->start - io_start)

starts @ 0xfe016000.

i tried: (in mydevice_probe())

writel(0x07, 0xfe016000); //0x07 mask enable 3 sub-devices @ bit 0, bit 1 , bit 2. 

but kernel crashed right away. following writels did not work:

writel(0x00, 0xfe016000); writel(0x01, 0xfe016000); 

what did miss? 1 show me how done? in case got start address wrong, point out way correctly?

thanks.

p/s: kernel panic:

qemu: fatal: mydevice_write: bad offset fea000  r00=c02ef00b r01=00000000 r02=00000007 r03=e0808000 r04=c0340864 r05=c031e3b0 r06=c0173b6c r07=c031e3cc r08=00000000 r09=00100100 r10=00000000 r11=df827e34 r12=ff016000 r13=df827e18 r14=c002e96c r15=c0030aac psr=20000013 --c- svc32 aborted (core dumped) 

this close question. turns out emulator faulty. writel(mask, io_address(resource->start - io_start)); should work.


Comments

Popular posts from this blog

android - getbluetoothservice() called with no bluetoothmanagercallback -

sql - ASP.NET SqlDataSource, like on SelectCommand -

ios - Undefined symbols for architecture armv7: "_OBJC_CLASS_$_SSZipArchive" -