Devicetree fixes for v5.10, take 2:

- Fix Flexcan binding schema errors introduced in rc3
 
 - Fix an of_node ref counting error in of_dma_is_coherent
 -----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCgAuFiEEktVUI4SxYhzZyEuo+vtdtY28YcMFAl+u7m8QHHJvYmhAa2Vy
 bmVsLm9yZwAKCRD6+121jbxhw3tFD/0Rur5UXAQdGSIuOK7j0Skka+RifCoUTBea
 D1dKXcFEAsMDtlih35qwaDJNix/OENDBkiwzXWcfW/kkm47T9fcjQFbUC/JbT75e
 aXQILG8l+YVlD5Dma2suMCbYTj6814E/Ys839rXYuNvLUlYIU8UJUSpdmjAe4x3X
 ulMMnF3ZY1fR431XhGtKZBQEczGMCAQnoHk2ZksvRsryMJfddDMuBNFwzTGZ2Uee
 kC+KM9P0TYR9+5Pc75MNZUZW2ZFKV/Jv+R0E0i39GFhSesXKg8qBFesZYi6wriS1
 N4J449uwqA2B5IuDgKWPFJVTq+3RbsQJR44ybWI3i22jgimVg3BrTSLdsnxQYhtO
 tuu0j/p19DW+JdT5698ErKbnBtFK7LZIkzbmEd9y+df64BtjCMOlRiDUf1+MkbTT
 nf6dUMmyg+/xQxPhyuuJ8/QF30kfz9FIC09VRnaiTN7C0cEFROIqC5bbwGf0FEBC
 YdH1VF05ldr8anHsbJ6FJU5WhghZDEGFFkx3gZ12YyX5sLeeLxGGGFg2Nreu7I0P
 yFsP2+kxaP22sQ3JX8RJr2kvHKRqqIhDDNvvFftTTJI3bw5Cx9Ke9fA5baptLbO8
 gE2KLzffLaZffuHgc8J63ZAi0RswPtOpMAgO/4OWf7AHSyiISTevaGD+Ec46b/pd
 PBpytuyxIw==
 =Bqzk
 -----END PGP SIGNATURE-----

Merge tag 'devicetree-fixes-for-5.10-2' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux

Pull devicetree fixes from Rob Herring:

 - fix Flexcan binding schema errors introduced in rc3

 - fix an of_node ref counting error in of_dma_is_coherent

* tag 'devicetree-fixes-for-5.10-2' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux:
  dt-bindings: clock: imx5: fix example
  dt-bindings: can: fsl,flexcan.yaml: fix compatible for i.MX35 and i.MX53
  dt-bindings: can: fsl,flexcan.yaml: fix fsl,stop-mode
  of/address: Fix of_node memory leak in of_dma_is_coherent
This commit is contained in:
Linus Torvalds 2020-11-13 12:47:02 -08:00
commit 9e6a39eae4
3 changed files with 15 additions and 9 deletions

View file

@ -57,7 +57,7 @@ examples:
};
can@53fc8000 {
compatible = "fsl,imx53-flexcan", "fsl,p1010-flexcan";
compatible = "fsl,imx53-flexcan", "fsl,imx25-flexcan";
reg = <0x53fc8000 0x4000>;
interrupts = <82>;
clocks = <&clks IMX5_CLK_CAN1_IPG_GATE>, <&clks IMX5_CLK_CAN1_SERIAL_GATE>;

View file

@ -20,14 +20,17 @@ properties:
- fsl,imx8qm-flexcan
- fsl,imx8mp-flexcan
- fsl,imx6q-flexcan
- fsl,imx53-flexcan
- fsl,imx35-flexcan
- fsl,imx28-flexcan
- fsl,imx25-flexcan
- fsl,p1010-flexcan
- fsl,vf610-flexcan
- fsl,ls1021ar2-flexcan
- fsl,lx2160ar1-flexcan
- items:
- enum:
- fsl,imx53-flexcan
- fsl,imx35-flexcan
- const: fsl,imx25-flexcan
- items:
- enum:
- fsl,imx7d-flexcan
@ -81,11 +84,12 @@ properties:
req_bit is the bit offset of CAN stop request.
$ref: /schemas/types.yaml#/definitions/phandle-array
items:
- description: The 'gpr' is the phandle to general purpose register node.
- description: The 'req_gpr' is the gpr register offset of CAN stop request.
maximum: 0xff
- description: The 'req_bit' is the bit offset of CAN stop request.
maximum: 0x1f
items:
- description: The 'gpr' is the phandle to general purpose register node.
- description: The 'req_gpr' is the gpr register offset of CAN stop request.
maximum: 0xff
- description: The 'req_bit' is the bit offset of CAN stop request.
maximum: 0x1f
fsl,clk-source:
description: |

View file

@ -1034,11 +1034,13 @@ out:
*/
bool of_dma_is_coherent(struct device_node *np)
{
struct device_node *node = of_node_get(np);
struct device_node *node;
if (IS_ENABLED(CONFIG_OF_DMA_DEFAULT_COHERENT))
return true;
node = of_node_get(np);
while (node) {
if (of_property_read_bool(node, "dma-coherent")) {
of_node_put(node);