Skip to content

Commit

Permalink
Merge tag 'linux-can-next-for-4.16-20171201' of git://git.kernel.org/…
Browse files Browse the repository at this point in the history
…pub/scm/linux/kernel/git/mkl/linux-can-next

Marc Kleine-Budde says:

====================
pull-request: can-next 2017-12-01

this is a pull request of 10 patches for net-next/master.

The first two patches are by Arnd Bergmann, they convert the peak_usb
from using "struct timeval" to "ktime_t". The error handling in the
vxcan driver is clean up by Markus Elfring's patch. Bhumika Goyal
contributes a patch for the c_can_pci driver to make the pci data const.
The six patches by Pankaj Bansal for the flexcan driver add LS1021A
support by making the endianness of the driver configurable by the
device tree.
====================

Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
davem330 committed Dec 4, 2017
2 parents d671965 + fa2edcf commit 112d59c
Show file tree
Hide file tree
Showing 16 changed files with 258 additions and 171 deletions.
6 changes: 6 additions & 0 deletions Documentation/devicetree/bindings/net/can/fsl-flexcan.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ Optional properties:

- xceiver-supply: Regulator that powers the CAN transceiver

- big-endian: This means the registers of FlexCAN controller are big endian.
This is optional property.i.e. if this property is not present in
device tree node then controller is assumed to be little endian.
if this property is present then controller is assumed to be big
endian.

Example:

can@1c000 {
Expand Down
4 changes: 2 additions & 2 deletions arch/arm/boot/dts/imx25.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@
};

can1: can@43f88000 {
compatible = "fsl,imx25-flexcan", "fsl,p1010-flexcan";
compatible = "fsl,imx25-flexcan";
reg = <0x43f88000 0x4000>;
interrupts = <43>;
clocks = <&clks 75>, <&clks 75>;
Expand All @@ -131,7 +131,7 @@
};

can2: can@43f8c000 {
compatible = "fsl,imx25-flexcan", "fsl,p1010-flexcan";
compatible = "fsl,imx25-flexcan";
reg = <0x43f8c000 0x4000>;
interrupts = <44>;
clocks = <&clks 76>, <&clks 76>;
Expand Down
4 changes: 2 additions & 2 deletions arch/arm/boot/dts/imx28.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -1038,7 +1038,7 @@
};

can0: can@80032000 {
compatible = "fsl,imx28-flexcan", "fsl,p1010-flexcan";
compatible = "fsl,imx28-flexcan";
reg = <0x80032000 0x2000>;
interrupts = <8>;
clocks = <&clks 58>, <&clks 58>;
Expand All @@ -1047,7 +1047,7 @@
};

can1: can@80034000 {
compatible = "fsl,imx28-flexcan", "fsl,p1010-flexcan";
compatible = "fsl,imx28-flexcan";
reg = <0x80034000 0x2000>;
interrupts = <9>;
clocks = <&clks 59>, <&clks 59>;
Expand Down
4 changes: 2 additions & 2 deletions arch/arm/boot/dts/imx35.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@
};

can1: can@53fe4000 {
compatible = "fsl,imx35-flexcan", "fsl,p1010-flexcan";
compatible = "fsl,imx35-flexcan";
reg = <0x53fe4000 0x1000>;
clocks = <&clks 33>, <&clks 33>;
clock-names = "ipg", "per";
Expand All @@ -312,7 +312,7 @@
};

can2: can@53fe8000 {
compatible = "fsl,imx35-flexcan", "fsl,p1010-flexcan";
compatible = "fsl,imx35-flexcan";
reg = <0x53fe8000 0x1000>;
clocks = <&clks 34>, <&clks 34>;
clock-names = "ipg", "per";
Expand Down
4 changes: 2 additions & 2 deletions arch/arm/boot/dts/imx53.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,7 @@
};

can1: can@53fc8000 {
compatible = "fsl,imx53-flexcan", "fsl,p1010-flexcan";
compatible = "fsl,imx53-flexcan";
reg = <0x53fc8000 0x4000>;
interrupts = <82>;
clocks = <&clks IMX5_CLK_CAN1_IPG_GATE>,
Expand All @@ -555,7 +555,7 @@
};

can2: can@53fcc000 {
compatible = "fsl,imx53-flexcan", "fsl,p1010-flexcan";
compatible = "fsl,imx53-flexcan";
reg = <0x53fcc000 0x4000>;
interrupts = <83>;
clocks = <&clks IMX5_CLK_CAN2_IPG_GATE>,
Expand Down
16 changes: 16 additions & 0 deletions arch/arm/boot/dts/ls1021a-qds.dts
Original file line number Diff line number Diff line change
Expand Up @@ -331,3 +331,19 @@
&uart1 {
status = "okay";
};

&can0 {
status = "okay";
};

&can1 {
status = "okay";
};

&can2 {
status = "disabled";
};

&can3 {
status = "disabled";
};
16 changes: 16 additions & 0 deletions arch/arm/boot/dts/ls1021a-twr.dts
Original file line number Diff line number Diff line change
Expand Up @@ -243,3 +243,19 @@
&uart1 {
status = "okay";
};

&can0 {
status = "okay";
};

&can1 {
status = "okay";
};

&can2 {
status = "disabled";
};

&can3 {
status = "disabled";
};
36 changes: 36 additions & 0 deletions arch/arm/boot/dts/ls1021a.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -730,5 +730,41 @@
<0000 0 0 3 &gic GIC_SPI 191 IRQ_TYPE_LEVEL_HIGH>,
<0000 0 0 4 &gic GIC_SPI 193 IRQ_TYPE_LEVEL_HIGH>;
};

can0: can@2a70000 {
compatible = "fsl,ls1021ar2-flexcan";
reg = <0x0 0x2a70000 0x0 0x1000>;
interrupts = <GIC_SPI 126 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&clockgen 4 1>, <&clockgen 4 1>;
clock-names = "ipg", "per";
big-endian;
};

can1: can@2a80000 {
compatible = "fsl,ls1021ar2-flexcan";
reg = <0x0 0x2a80000 0x0 0x1000>;
interrupts = <GIC_SPI 127 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&clockgen 4 1>, <&clockgen 4 1>;
clock-names = "ipg", "per";
big-endian;
};

can2: can@2a90000 {
compatible = "fsl,ls1021ar2-flexcan";
reg = <0x0 0x2a90000 0x0 0x1000>;
interrupts = <GIC_SPI 128 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&clockgen 4 1>, <&clockgen 4 1>;
clock-names = "ipg", "per";
big-endian;
};

can3: can@2aa0000 {
compatible = "fsl,ls1021ar2-flexcan";
reg = <0x0 0x2aa0000 0x0 0x1000>;
interrupts = <GIC_SPI 129 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&clockgen 4 1>, <&clockgen 4 1>;
clock-names = "ipg", "per";
big-endian;
};
};
};
2 changes: 2 additions & 0 deletions arch/powerpc/boot/dts/fsl/p1010si-post.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -137,12 +137,14 @@
compatible = "fsl,p1010-flexcan";
reg = <0x1c000 0x1000>;
interrupts = <48 0x2 0 0>;
big-endian;
};

can1: can@1d000 {
compatible = "fsl,p1010-flexcan";
reg = <0x1d000 0x1000>;
interrupts = <61 0x2 0 0>;
big-endian;
};

L2: l2-cache-controller@20000 {
Expand Down
4 changes: 2 additions & 2 deletions drivers/net/can/c_can/c_can_pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -251,14 +251,14 @@ static void c_can_pci_remove(struct pci_dev *pdev)
pci_disable_device(pdev);
}

static struct c_can_pci_data c_can_sta2x11= {
static const struct c_can_pci_data c_can_sta2x11= {
.type = BOSCH_C_CAN,
.reg_align = C_CAN_REG_ALIGN_32,
.freq = 52000000, /* 52 Mhz */
.bar = 0,
};

static struct c_can_pci_data c_can_pch = {
static const struct c_can_pci_data c_can_pch = {
.type = BOSCH_C_CAN,
.reg_align = C_CAN_REG_32,
.freq = 50000000, /* 50 MHz */
Expand Down
Loading

0 comments on commit 112d59c

Please sign in to comment.