Skip to content

Commit 112d59c

Browse files
committed
Merge tag 'linux-can-next-for-4.16-20171201' of git://git.kernel.org/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]>
2 parents d671965 + fa2edcf commit 112d59c

File tree

16 files changed

+258
-171
lines changed

16 files changed

+258
-171
lines changed

Documentation/devicetree/bindings/net/can/fsl-flexcan.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,12 @@ Optional properties:
1818

1919
- xceiver-supply: Regulator that powers the CAN transceiver
2020

21+
- big-endian: This means the registers of FlexCAN controller are big endian.
22+
This is optional property.i.e. if this property is not present in
23+
device tree node then controller is assumed to be little endian.
24+
if this property is present then controller is assumed to be big
25+
endian.
26+
2127
Example:
2228

2329
can@1c000 {

arch/arm/boot/dts/imx25.dtsi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@
122122
};
123123

124124
can1: can@43f88000 {
125-
compatible = "fsl,imx25-flexcan", "fsl,p1010-flexcan";
125+
compatible = "fsl,imx25-flexcan";
126126
reg = <0x43f88000 0x4000>;
127127
interrupts = <43>;
128128
clocks = <&clks 75>, <&clks 75>;
@@ -131,7 +131,7 @@
131131
};
132132

133133
can2: can@43f8c000 {
134-
compatible = "fsl,imx25-flexcan", "fsl,p1010-flexcan";
134+
compatible = "fsl,imx25-flexcan";
135135
reg = <0x43f8c000 0x4000>;
136136
interrupts = <44>;
137137
clocks = <&clks 76>, <&clks 76>;

arch/arm/boot/dts/imx28.dtsi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1038,7 +1038,7 @@
10381038
};
10391039

10401040
can0: can@80032000 {
1041-
compatible = "fsl,imx28-flexcan", "fsl,p1010-flexcan";
1041+
compatible = "fsl,imx28-flexcan";
10421042
reg = <0x80032000 0x2000>;
10431043
interrupts = <8>;
10441044
clocks = <&clks 58>, <&clks 58>;
@@ -1047,7 +1047,7 @@
10471047
};
10481048

10491049
can1: can@80034000 {
1050-
compatible = "fsl,imx28-flexcan", "fsl,p1010-flexcan";
1050+
compatible = "fsl,imx28-flexcan";
10511051
reg = <0x80034000 0x2000>;
10521052
interrupts = <9>;
10531053
clocks = <&clks 59>, <&clks 59>;

arch/arm/boot/dts/imx35.dtsi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@
303303
};
304304

305305
can1: can@53fe4000 {
306-
compatible = "fsl,imx35-flexcan", "fsl,p1010-flexcan";
306+
compatible = "fsl,imx35-flexcan";
307307
reg = <0x53fe4000 0x1000>;
308308
clocks = <&clks 33>, <&clks 33>;
309309
clock-names = "ipg", "per";
@@ -312,7 +312,7 @@
312312
};
313313

314314
can2: can@53fe8000 {
315-
compatible = "fsl,imx35-flexcan", "fsl,p1010-flexcan";
315+
compatible = "fsl,imx35-flexcan";
316316
reg = <0x53fe8000 0x1000>;
317317
clocks = <&clks 34>, <&clks 34>;
318318
clock-names = "ipg", "per";

arch/arm/boot/dts/imx53.dtsi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -545,7 +545,7 @@
545545
};
546546

547547
can1: can@53fc8000 {
548-
compatible = "fsl,imx53-flexcan", "fsl,p1010-flexcan";
548+
compatible = "fsl,imx53-flexcan";
549549
reg = <0x53fc8000 0x4000>;
550550
interrupts = <82>;
551551
clocks = <&clks IMX5_CLK_CAN1_IPG_GATE>,
@@ -555,7 +555,7 @@
555555
};
556556

557557
can2: can@53fcc000 {
558-
compatible = "fsl,imx53-flexcan", "fsl,p1010-flexcan";
558+
compatible = "fsl,imx53-flexcan";
559559
reg = <0x53fcc000 0x4000>;
560560
interrupts = <83>;
561561
clocks = <&clks IMX5_CLK_CAN2_IPG_GATE>,

arch/arm/boot/dts/ls1021a-qds.dts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -331,3 +331,19 @@
331331
&uart1 {
332332
status = "okay";
333333
};
334+
335+
&can0 {
336+
status = "okay";
337+
};
338+
339+
&can1 {
340+
status = "okay";
341+
};
342+
343+
&can2 {
344+
status = "disabled";
345+
};
346+
347+
&can3 {
348+
status = "disabled";
349+
};

arch/arm/boot/dts/ls1021a-twr.dts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,3 +243,19 @@
243243
&uart1 {
244244
status = "okay";
245245
};
246+
247+
&can0 {
248+
status = "okay";
249+
};
250+
251+
&can1 {
252+
status = "okay";
253+
};
254+
255+
&can2 {
256+
status = "disabled";
257+
};
258+
259+
&can3 {
260+
status = "disabled";
261+
};

arch/arm/boot/dts/ls1021a.dtsi

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -730,5 +730,41 @@
730730
<0000 0 0 3 &gic GIC_SPI 191 IRQ_TYPE_LEVEL_HIGH>,
731731
<0000 0 0 4 &gic GIC_SPI 193 IRQ_TYPE_LEVEL_HIGH>;
732732
};
733+
734+
can0: can@2a70000 {
735+
compatible = "fsl,ls1021ar2-flexcan";
736+
reg = <0x0 0x2a70000 0x0 0x1000>;
737+
interrupts = <GIC_SPI 126 IRQ_TYPE_LEVEL_HIGH>;
738+
clocks = <&clockgen 4 1>, <&clockgen 4 1>;
739+
clock-names = "ipg", "per";
740+
big-endian;
741+
};
742+
743+
can1: can@2a80000 {
744+
compatible = "fsl,ls1021ar2-flexcan";
745+
reg = <0x0 0x2a80000 0x0 0x1000>;
746+
interrupts = <GIC_SPI 127 IRQ_TYPE_LEVEL_HIGH>;
747+
clocks = <&clockgen 4 1>, <&clockgen 4 1>;
748+
clock-names = "ipg", "per";
749+
big-endian;
750+
};
751+
752+
can2: can@2a90000 {
753+
compatible = "fsl,ls1021ar2-flexcan";
754+
reg = <0x0 0x2a90000 0x0 0x1000>;
755+
interrupts = <GIC_SPI 128 IRQ_TYPE_LEVEL_HIGH>;
756+
clocks = <&clockgen 4 1>, <&clockgen 4 1>;
757+
clock-names = "ipg", "per";
758+
big-endian;
759+
};
760+
761+
can3: can@2aa0000 {
762+
compatible = "fsl,ls1021ar2-flexcan";
763+
reg = <0x0 0x2aa0000 0x0 0x1000>;
764+
interrupts = <GIC_SPI 129 IRQ_TYPE_LEVEL_HIGH>;
765+
clocks = <&clockgen 4 1>, <&clockgen 4 1>;
766+
clock-names = "ipg", "per";
767+
big-endian;
768+
};
733769
};
734770
};

arch/powerpc/boot/dts/fsl/p1010si-post.dtsi

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,12 +137,14 @@
137137
compatible = "fsl,p1010-flexcan";
138138
reg = <0x1c000 0x1000>;
139139
interrupts = <48 0x2 0 0>;
140+
big-endian;
140141
};
141142

142143
can1: can@1d000 {
143144
compatible = "fsl,p1010-flexcan";
144145
reg = <0x1d000 0x1000>;
145146
interrupts = <61 0x2 0 0>;
147+
big-endian;
146148
};
147149

148150
L2: l2-cache-controller@20000 {

drivers/net/can/c_can/c_can_pci.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -251,14 +251,14 @@ static void c_can_pci_remove(struct pci_dev *pdev)
251251
pci_disable_device(pdev);
252252
}
253253

254-
static struct c_can_pci_data c_can_sta2x11= {
254+
static const struct c_can_pci_data c_can_sta2x11= {
255255
.type = BOSCH_C_CAN,
256256
.reg_align = C_CAN_REG_ALIGN_32,
257257
.freq = 52000000, /* 52 Mhz */
258258
.bar = 0,
259259
};
260260

261-
static struct c_can_pci_data c_can_pch = {
261+
static const struct c_can_pci_data c_can_pch = {
262262
.type = BOSCH_C_CAN,
263263
.reg_align = C_CAN_REG_32,
264264
.freq = 50000000, /* 50 MHz */

0 commit comments

Comments
 (0)