> There is a register I can poll, it contains these statuses. Reading
> the documentation I can't really figure out if any of them indicates
> FIFO problems. Or you mean polling from the user space process?
> There is a register though that driectly indicates the FIFO fullnes.
> How you think I should poll it - maybe on the timer interrupt -
> every 10ms (if i'm not wrong).
Zoran designs pretty reasonable chips. They most likely have the
same setup as everybody else: if the overflow occurs, you see the
bit "set". If you read the status register, and write it back
with a "1" in the "fifo overrun" position, then that means you
saw it and took appropriate action.
I suggest that you do something like
..._interrupt ()
{
if (read_zr (STATUS_R) & FIFO_OVERRUN) {
board->FLAGS |= OVERRUN;
}
....
}
..._read ()
{
if (board->flags & OVERRUN) {
board -> flags &= ~ OVERRUN;
return -EIO;
}
[...]
}
> >> available (not used now). On the other hand, I want to timestamp
> >> everything tightly. I was wondering, which system call gets data
> >> directly from 8053 timer under Linux?
> >
> >8253 I think (well nowdays random bit of integrated chipset). The
> Yes. I can't remember what was the difference between them... I think
> somebody colned an IBM PC with 8053 instead on 8253. I think 8253 takes
> higher clock. Anyway...
> >gettimeofday() call reads it - but its actually quite slow to read. Pentium
> How slow is it - in what range? If it's less them 100 usec I don't think
> it matters.
Something like 10us. (it was 17 us on my '486.)
> >and higher processors use the RDTSC CPU internal time clock for the
> >same purpose
> Can you point my to more information on that - if I need it that is.
Just call "gettimeofday" from userspace, or "do_gettimeofday" or
something like that from inside the kernel. There are a few examples
inside the kernel about how to do that. (I think that I saw it when
I was looking into how icmp timestamps work....)
Roger.
-- | Most people would die sooner than think.... | R.E.Wolff@BitWizard.nl | in fact, most do. -- Bertrand Russsell | phone: +31-15-2137555 We write Linux device drivers for any device you may have! fax: ..-2138217- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/