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/
|