ipq806x: replace linux,part-probe with a proper partitions subnode
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>
This commit is contained in:
parent
cdcd5c93d7
commit
31aaa670d4
4 changed files with 20 additions and 5 deletions
|
@ -122,7 +122,9 @@
|
||||||
spi-max-frequency = <50000000>;
|
spi-max-frequency = <50000000>;
|
||||||
reg = <0>;
|
reg = <0>;
|
||||||
|
|
||||||
linux,part-probe = "qcom-smem";
|
partitions {
|
||||||
|
compatible = "qcom,smem";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -182,7 +184,9 @@
|
||||||
nand-bus-width = <8>;
|
nand-bus-width = <8>;
|
||||||
nand-ecc-step-size = <512>;
|
nand-ecc-step-size = <512>;
|
||||||
|
|
||||||
linux,part-probe = "qcom-smem";
|
partitions {
|
||||||
|
compatible = "qcom,smem";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -182,7 +182,9 @@
|
||||||
spi-max-frequency = <51200000>;
|
spi-max-frequency = <51200000>;
|
||||||
reg = <0>;
|
reg = <0>;
|
||||||
|
|
||||||
linux,part-probe = "qcom-smem";
|
partitions {
|
||||||
|
compatible = "qcom,smem";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -234,7 +234,9 @@
|
||||||
spi-max-frequency = <50000000>;
|
spi-max-frequency = <50000000>;
|
||||||
reg = <0>;
|
reg = <0>;
|
||||||
|
|
||||||
linux,part-probe = "qcom-smem";
|
partitions {
|
||||||
|
compatible = "qcom,smem";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -34,7 +34,7 @@ Signed-off-by: Ram Chandra Jangir <rjangi@codeaurora.org>
|
||||||
#
|
#
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/drivers/mtd/qcom_smem_part.c
|
+++ b/drivers/mtd/qcom_smem_part.c
|
||||||
@@ -0,0 +1,228 @@
|
@@ -0,0 +1,235 @@
|
||||||
+/*
|
+/*
|
||||||
+ * Copyright (c) 2015, The Linux Foundation. All rights reserved.
|
+ * 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;
|
+ 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 = {
|
+static struct mtd_part_parser qcom_smem_parser = {
|
||||||
+ .owner = THIS_MODULE,
|
+ .owner = THIS_MODULE,
|
||||||
+ .parse_fn = parse_qcom_smem_partitions,
|
+ .parse_fn = parse_qcom_smem_partitions,
|
||||||
+ .name = "qcom-smem",
|
+ .name = "qcom-smem",
|
||||||
|
+ .of_match_table = qcom_smem_of_match_table,
|
||||||
+};
|
+};
|
||||||
+
|
+
|
||||||
+static int __init qcom_smem_parser_init(void)
|
+static int __init qcom_smem_parser_init(void)
|
||||||
|
|
Loading…
Reference in a new issue