ts-7000
[Top] [All Lists]

Re: [ts-7000] Re: Cannot read PC104 from kernel space

To:
Subject: Re: [ts-7000] Re: Cannot read PC104 from kernel space
From: David Hawkins <>
Date: Mon, 03 Dec 2007 10:09:31 -0800
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/
 

<Prev in Thread] Current Thread [Next in Thread>
Admin

Disclaimer: Neither Andrew Taylor nor the University of NSW School of Computer and Engineering take any responsibility for the contents of this archive. It is purely a compilation of material sent by many people to the birding-aus mailing list. It has not been checked for accuracy nor its content verified in any way. If you wish to get material removed from the archive or have other queries about the archive e-mail Andrew Taylor at this address: andrewt@cse.unsw.EDU.AU