
Dear Matthias Fuchs,
In message 200910231638.11295.matthias.fuchs@esd.eu you wrote:
This patch fixes an ugly behavior of the IL712 magnetic couplers as used on PLU405. These parts will remember their last state over a power cycle which might cause unwanted behavior.
...
--- a/board/esd/plu405/plu405.c +++ b/board/esd/plu405/plu405.c @@ -45,6 +45,55 @@ const unsigned char fpgadata[] = */ #include "../common/fpga.c"
+/*
- SJA1000 register layout in basic can mode
- */
+struct sja1000_basic_s {
- u8 cr;
- u8 cmr;
- u8 sr;
- u8 ir;
- u8 ac;
- u8 am;
- u8 btr0;
- u8 btr1;
- u8 oc;
- u8 txb[10];
- u8 rxb[10];
- u8 unused;
- u8 cdr;
+};
+#define SJA1000_CR_RR 0x01 +#define SJA1000_OC_MODE0 0x01
Hmm... a SJA1000 is a pretty generic piece of hardware, and in no way specific to the plu405 board. Would it not make sense to create as separate header file for this? Eventually other boards will need to interface to SJA1000's, too ?
Best regards,
Wolfgang Denk