Re: [PATCH] can: can_oc: Add driver for CAN_OC cores from Aeroflex Gaisler

Wolfgang Grandegger
2012-09-26T09:56:31Z

On 09/26/2012 11:38 AM, Marc Kleine-Budde wrote:
> On 09/25/2012 07:52 AM, Andreas Larsson wrote:
>> This driver is for the sja1000 compatible CAN_OC cores from Aeroflex
>> Gaisler available in the GRLIB VHDL IP core library.
>
> Why don't you describe a single sja1000 compatible core with an OF
> device? The devices have indipendent address spaces and IRQs. With a
> proper abstraction/desciption you would not need this driver.

Right, at least I do not see anything special. The following DTS entry
should do the jobs:

/* First CAN device */
can@3,100 {
compatible = "nxp,sja1000";
reg = <3 0x100 0x80>;
interrupts = <2 0>;
interrupt-parent = <&mpic>;
nxp,external-clock-frequency = <16000000>;
};

/* Second CAN device */
can@3,200 {
compatible = "nxp,sja1000";
reg = <3 0x200 0x80>;
interrupts = <2 0>;
interrupt-parent = <&mpic>;
nxp,external-clock-frequency = <16000000>;
};

Addresses and IRQs might be different, of course.

See also;

http://lxr.linux.no/#linux+v3.5.4/Documentation/devicetree/bindings/net/can/sja1000.txt

Wolfgang.