CAN and MPC855T/860T
Adrian Cox
adrian at humboldt.co.uk
Fri Oct 26 18:49:17 EST 2001
Wolfgang Denk wrote:
> IMHO there are two Open Source projects that look interesting:
>
> 1. http://home.wanadoo.nl/arnaud/
Two days ago I got this code working using a SJA1000 chip on a PowerPC
system. It's very "interesting" code, for the following reasons:
1) Its initialisation is back to front. Most Linux subsystems you load a
hardware driver which calls a function to register itself. With this you
load the CAN subsystem which takes module arguments telling it which
hardware drivers to use.
2) When the interrupt handlers call worker functions, they pass the
parameters through global variables rather than as function parameters.
3) It has two different ways of keeping track of its circular buffers,
by an index or by pointers. Different routines use different methods,
with hilarious consequences. (This may particularly cause problems for
users of Pelican mode.)
4) It has several loops with udelays() in them. One of these gets called
by an interrupt handler.
I'm not entirely sure what to do with my changes, as I also integrated
it into the kernel tree (the target system doesn't use modules).
--
Adrian Cox http://www.humboldt.co.uk/
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
More information about the Linuxppc-embedded
mailing list