[LEDE-DEV] [PATCH] ipq806x: replace linux, part-probe with a proper partitions subnode
Rafał Miłecki
zajec5 at gmail.com
Thu Jan 11 04:03:35 PST 2018
From: Rafał Miłecki <rafal at milecki.pl>
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 at milecki.pl>
---
.../ipq806x/files-4.9/arch/arm/boot/dts/qcom-ipq8064-ap148.dts | 4 +++-
.../ipq806x/files-4.9/arch/arm/boot/dts/qcom-ipq8065-nbg6817.dts | 4 +++-
.../ipq806x/files-4.9/arch/arm/boot/dts/qcom-ipq8065-r7800.dts | 4 +++-
.../0031-mtd-add-SMEM-parser-for-QCOM-platforms.patch | 9 ++++++++-
4 files changed, 17 insertions(+), 4 deletions(-)
diff --git a/target/linux/ipq806x/files-4.9/arch/arm/boot/dts/qcom-ipq8064-ap148.dts b/target/linux/ipq806x/files-4.9/arch/arm/boot/dts/qcom-ipq8064-ap148.dts
index fa4f05bdbe..33fcbc54bf 100644
--- a/target/linux/ipq806x/files-4.9/arch/arm/boot/dts/qcom-ipq8064-ap148.dts
+++ b/target/linux/ipq806x/files-4.9/arch/arm/boot/dts/qcom-ipq8064-ap148.dts
@@ -122,7 +122,9 @@
spi-max-frequency = <50000000>;
reg = <0>;
- linux,part-probe = "qcom-smem";
+ partitions {
+ compatible = "qcom,smem";
+ };
};
};
};
diff --git a/target/linux/ipq806x/files-4.9/arch/arm/boot/dts/qcom-ipq8065-nbg6817.dts b/target/linux/ipq806x/files-4.9/arch/arm/boot/dts/qcom-ipq8065-nbg6817.dts
index 15165b9b72..6069311da9 100644
--- a/target/linux/ipq806x/files-4.9/arch/arm/boot/dts/qcom-ipq8065-nbg6817.dts
+++ b/target/linux/ipq806x/files-4.9/arch/arm/boot/dts/qcom-ipq8065-nbg6817.dts
@@ -182,7 +182,9 @@
spi-max-frequency = <51200000>;
reg = <0>;
- linux,part-probe = "qcom-smem";
+ partitions {
+ compatible = "qcom,smem";
+ };
};
};
};
diff --git a/target/linux/ipq806x/files-4.9/arch/arm/boot/dts/qcom-ipq8065-r7800.dts b/target/linux/ipq806x/files-4.9/arch/arm/boot/dts/qcom-ipq8065-r7800.dts
index 403054cc97..05517bdf40 100644
--- a/target/linux/ipq806x/files-4.9/arch/arm/boot/dts/qcom-ipq8065-r7800.dts
+++ b/target/linux/ipq806x/files-4.9/arch/arm/boot/dts/qcom-ipq8065-r7800.dts
@@ -234,7 +234,9 @@
spi-max-frequency = <50000000>;
reg = <0>;
- linux,part-probe = "qcom-smem";
+ partitions {
+ compatible = "qcom,smem";
+ };
};
};
};
diff --git a/target/linux/ipq806x/patches-4.9/0031-mtd-add-SMEM-parser-for-QCOM-platforms.patch b/target/linux/ipq806x/patches-4.9/0031-mtd-add-SMEM-parser-for-QCOM-platforms.patch
index ad0b09b115..a888b063a1 100644
--- a/target/linux/ipq806x/patches-4.9/0031-mtd-add-SMEM-parser-for-QCOM-platforms.patch
+++ b/target/linux/ipq806x/patches-4.9/0031-mtd-add-SMEM-parser-for-QCOM-platforms.patch
@@ -34,7 +34,7 @@ Signed-off-by: Ram Chandra Jangir <rjangi at 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 at 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)
--
2.11.0
More information about the Lede-dev
mailing list