ipq806x: replace linux,part-probe with a proper partitions subnode
authorRafał Miłecki <rafal@milecki.pl>
Mon, 9 Apr 2018 05:44:55 +0000 (07:44 +0200)
committerRafał Miłecki <rafal@milecki.pl>
Mon, 9 Apr 2018 05:45:34 +0000 (07:45 +0200)
This solution is more upstream compatible as it only requires specifying
of_match_table in the parser code and doesn't depend on linux,part-probe
which is solution made generic by a LEDE downstream patch that can't be
upstreamed.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Tested-by: Stefan Lippers-Hollmann <s.l-h@gmx.de>
Acked-by: John Crispin <john@phrozen.org>
target/linux/ipq806x/files-4.9/arch/arm/boot/dts/qcom-ipq8064-ap148.dts
target/linux/ipq806x/files-4.9/arch/arm/boot/dts/qcom-ipq8065-nbg6817.dts
target/linux/ipq806x/files-4.9/arch/arm/boot/dts/qcom-ipq8065-r7800.dts
target/linux/ipq806x/patches-4.9/0031-mtd-add-SMEM-parser-for-QCOM-platforms.patch

index 39a0d96563cb921c4f98de95208b46379d4ce48c..a3df82909e267891d0823e15e79d861ae9251378 100644 (file)
                                        spi-max-frequency = <50000000>;
                                        reg = <0>;
 
-                                       linux,part-probe = "qcom-smem";
+                                       partitions {
+                                               compatible = "qcom,smem";
+                                       };
                                };
                        };
                };
                                nand-bus-width = <8>;
                                nand-ecc-step-size = <512>;
 
-                               linux,part-probe = "qcom-smem";
+                               partitions {
+                                       compatible = "qcom,smem";
+                               };
                        };
                };
 
index 987ee852cc8fa5222cfd2e18fa712f8cf72d21b3..2f829795bcd40ca9310fd7f10532cb6accbfcd38 100644 (file)
                                        spi-max-frequency = <51200000>;
                                        reg = <0>;
 
-                                       linux,part-probe = "qcom-smem";
+                                       partitions {
+                                               compatible = "qcom,smem";
+                                       };
                                };
                        };
                };
index 4c89dcf76f873aceb792a2d8a6c346a4c633b731..63cb42a3e2f4bfc2518c1f72cd8080fb26267d04 100644 (file)
                                        spi-max-frequency = <50000000>;
                                        reg = <0>;
 
-                                       linux,part-probe = "qcom-smem";
+                                       partitions {
+                                               compatible = "qcom,smem";
+                                       };
                                };
                        };
                };
index ad0b09b115c7ad548915fab9c3c95c4943ba0ba0..a888b063a1517b783cf79d19b9546b2cc915faf9 100644 (file)
@@ -34,7 +34,7 @@ Signed-off-by: Ram Chandra Jangir <rjangi@codeaurora.org>
  #
 --- /dev/null
 +++ b/drivers/mtd/qcom_smem_part.c
-@@ -0,0 +1,228 @@
+@@ -0,0 +1,235 @@
 +/*
 + * Copyright (c) 2015, The Linux Foundation. All rights reserved.
 + *
@@ -240,10 +240,17 @@ Signed-off-by: Ram Chandra Jangir <rjangi@codeaurora.org>
 +      return smem_parts->len;
 +}
 +
++static const struct of_device_id qcom_smem_of_match_table[] = {
++      { .compatible = "qcom,smem" },
++      {},
++};
++MODULE_DEVICE_TABLE(of, qcom_smem_of_match_table);
++
 +static struct mtd_part_parser qcom_smem_parser = {
 +      .owner = THIS_MODULE,
 +      .parse_fn = parse_qcom_smem_partitions,
 +      .name = "qcom-smem",
++      .of_match_table = qcom_smem_of_match_table,
 +};
 +
 +static int __init qcom_smem_parser_init(void)