Hi Elliot,
> Thanks for the reply Dave. I am doing the read inside the interrupt
> service routine:
Oh, I guess I didn't read the code well enough ;)
Your 'output' to user-space was via printk, not read or write!
>>>> // interrupt handler
>>>> static int interrupt_handler(void)
>>>> {
>>>>
>>>> interruptcount++;
>>>> printk(">>> PC104 BUS INT: interruptcount=%d\n",
> interruptcount);
>>>> printk("PC104 Samples: 0x%04X\n", PEEK16(base)); <--
PEEK16 is not a standard kernel function.
> I agree it must be a software problem but I'm not sure where? Should I
> be using the inline macros or is there a different way to access in
> kernel space?
I'm fairly sure it should be out_le32(), out_be32(), out_le16(), etc.
Don't be confused if you see references in driver code (eg. Rubini
book) to readb(), readw(), and readl(). Those functions are specific
to pci interfaces which are always little-endian (le).
You should be able to look at the source code for the /dev/mem
driver and use whatever they use. That's what I'd look at
first.
I haven't written any ARM drivers for my TS7300 yet, otherwise I'd
send a working example. Sorry :)
Cheers,
Dave
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/ts-7000/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/ts-7000/join
(Yahoo! ID required)
<*> To change settings via email:
<*> To unsubscribe from this group, send an email to:
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|