Skip to contentSkip to conversation

can: SJA1000: generic OF platform bus driver

PATCH Superseded Wolfgang Grandegger 3 participants 4 messages May 20, 2009 – May 22, 2009 1 message not in the archive

Subsystems (3)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 can: SJA1000: generic OF platform bus driver

This patch adds a generic driver for SJA1000 chips on the OpenFirmware platform bus found on embedded PowerPC systems. You need a SJA1000 node definition in your flattened device tree source (DTS) file similar to:

   can@3,100 {
           compatible = "philips,sja1000";
           reg = <3 0x100 0x80>;
           clock-frequency = <8000000>;
           cdr-reg = <0x48>;
           ocr-reg = <0x0a>;
           interrupts = <2 0>;
           interrupt-parent = <&mpic>;
   };
---
 drivers/net/can/Kconfig                       |    9 +
 drivers/net/can/sja1000/Makefile              |    1 
 drivers/net/can/sja1000/sja1000_of_platform.c |  215 ++++++++++++++++++++++++++
 3 files changed, 225 insertions(+)
drivers/net/can/Kconfig +9 -0
Index: net-next-2.6/drivers/net/can/Kconfig
===================================================================
@@ -51,6 +51,15 @@ config CAN_SJA1000_PLATFORM
 	  boards from Phytec (http://www.phytec.de) like the PCM027,
 	  PCM038.
 
+config CAN_SJA1000_OF_PLATFORM
+	depends on CAN_SJA1000 && PPC_OF
+	tristate "Generic OF Platform Bus based SJA1000 driver"
+	---help---
+	  This driver adds support for the SJA1000 chips connected to
+	  the OpenFirmware "platform bus" found on embedded systems with
+	  OpenFirmware bindings, e.g. if you have a PowerPC based system
+	  you may want to enable this option.
+
 config CAN_EMS_PCI
 	tristate "EMS CPC-PCI and CPC-PCIe Card"
 	depends on PCI && CAN_SJA1000
drivers/net/can/sja1000/Makefile +1 -0
Index: net-next-2.6/drivers/net/can/sja1000/Makefile
===================================================================
@@ -4,6 +4,7 @@
 
 obj-$(CONFIG_CAN_SJA1000) += sja1000.o
 obj-$(CONFIG_CAN_SJA1000_PLATFORM) += sja1000_platform.o
+obj-$(CONFIG_CAN_SJA1000_OF_PLATFORM) += sja1000_of_platform.o
 obj-$(CONFIG_CAN_EMS_PCI) += ems_pci.o
 obj-$(CONFIG_CAN_KVASER_PCI) += kvaser_pci.o
 
drivers/net/can/sja1000/sja1000_of_platform.c new file +215 -0

215 lines not on this page · raw message

#1 lore raw
Quoted 4 lines · Wolfgang Grandegger

This patch adds a generic driver for SJA1000 chips on the OpenFirmware platform bus found on embedded PowerPC systems. You need a SJA1000 node definition in your flattened device tree source (DTS) file similar to:

Quoted 9 lines

  can@3,100 {
          compatible = "philips,sja1000";
          reg = <3 0x100 0x80>;
          clock-frequency = <8000000>;
          cdr-reg = <0x48>;
          ocr-reg = <0x0a>;
          interrupts = <2 0>;
          interrupt-parent = <&mpic>;
  };

This new binding must be documented in Documentation/powerpc/dts-bindings

g.

Signature · 2 lines
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
#3 lore raw
In reply to a message not in the archive

From: Grant Likely <grant.likely-s3s/[email protected]>
Date: Thu, 21 May 2009 22:42:07 -0600

Quoted 15 lines · Wolfgang Grandegger
Quoted 4 lines

This patch adds a generic driver for SJA1000 chips on the OpenFirmware platform bus found on embedded PowerPC systems. You need a SJA1000 node definition in your flattened device tree source (DTS) file similar to:

Quoted 9 lines

  can@3,100 {
          compatible = "philips,sja1000";
          reg = <3 0x100 0x80>;
          clock-frequency = <8000000>;
          cdr-reg = <0x48>;
          ocr-reg = <0x0a>;
          interrupts = <2 0>;
          interrupt-parent = <&mpic>;
  };

Quoted 1 line

This new binding must be documented in Documentation/powerpc/dts-bindings

Wolfgang, please add this documentation and resubmit your patch. Thanks!

#4 lore raw
Quoted 17 lines · David Miller

From: Grant Likely <[email protected]>
Date: Thu, 21 May 2009 22:42:07 -0600

Quoted 14 lines · Wolfgang Grandegger
Quoted 13 lines

This patch adds a generic driver for SJA1000 chips on the OpenFirmware platform bus found on embedded PowerPC systems. You need a SJA1000 node definition in your flattened device tree source (DTS) file similar to:

  can@3,100 {
          compatible = "philips,sja1000";
          reg = <3 0x100 0x80>;
          clock-frequency = <8000000>;
          cdr-reg = <0x48>;
          ocr-reg = <0x0a>;
          interrupts = <2 0>;
          interrupt-parent = <&mpic>;
  };
Quoted 4 lines
Quoted 1 line

This new binding must be documented in Documentation/powerpc/dts-bindings

Wolfgang, please add this documentation and resubmit your patch. Thanks!

I just sent out v2 incuding the missing documentation.

Thanks,

Wolfgang.