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: Sat, 01 Dec 2007 12:13:07 -0800
Hi Elliot,

> Thanks for the info Frank. My PC104 daughterboard is actually a home  
> brew FPGA board. If you wouldn't mind sharing the source to your hack 
> that would give me something to try as I'm running out of ideas...

The fact that mmap works and kernel code doesn't would lead
me to believe its a software issue, not the hardware.

>>>> Here is my kernel module:

>>>> static ssize_t pc104_read (struct file *file, char *buf,
>>>>                       size_t count, loff_t *ppos) {
>>>>   int len, err;
>>>>   
>>>>   // check if we have data - if not, sleep
>>>>   // wake up in interrupt_handler
>>>>   while (data_not_ready) {
>>>>     interruptible_sleep_on(&pc104_wait);
>>>>   }
>>>>   data_not_ready = 1;
>>>>
>>>>   /* Add read code here */
>>>>   return len;
>>>> }

Where are you 'reading'. There's no code here to access
the PC104 base address?

>>>> // write function called when to /dev/skeleton is written
>>>> static ssize_t pc104_write (struct file *file, const char *buf,
>>>>                        size_t count, loff_t *ppos) {
>>>>   int err;
>>>>   err = copy_from_user(string,buf,count);
>>>>   if (err != 0)
>>>>     return -EFAULT;
>>>>   counter += count;
>>>>   return count;
>>>> }

You wrote to a buffer, not to PC104.

Perhaps this is not the correct code. Send the code that
actually accesses the PC104 bus :)

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