Message ID | 20180111120335.16723-1-zajec5@gmail.com |
---|---|
State | Accepted |
Delegated to: | Rafał Miłecki |
Headers | show |
Series | [LEDE-DEV] ipq806x: replace linux, part-probe with a proper partitions subnode | expand |
Hi On 2018-01-11, Rafał Miłecki wrote: > From: Rafał Miłecki <rafal@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. [...] Tested-by: Stefan Lippers-Hollmann <s.l-h@gmx.de> [ 0.000000] OF: fdt:Machine model: ZyXEL NBG6817 ... [ 0.000000] Kernel command line: rootfstype=squashfs,ext4 rootwait noinitrd root=/dev/mmcblk0p8 [ 0.000000] Bootloader command line (ignored): board=NBG6817 root=/dev/mmcblk0p8 rootwait zld_ver=2.04 console=ttyHSL1,115200n8 mtdparts=m25p80:0xC0000(SBL)ro,0x40000(TZ)ro,0x40000(RPM)ro,0x80000(u-boot)ro,0x10000(env)ro,0x10000(ART)ro,0x10000(dualflag),0x210000(reserved) ... [ 1.136985] spi_qup 1a280000.spi: IN:block:16, fifo:64, OUT:block:16, fifo:64 [ 1.138996] m25p80 spi32766.0: mx25u3235f (4096 Kbytes) [ 1.144963] 13 qcom-smem partitions found on MTD device spi32766.0 [ 1.149927] Creating 13 MTD partitions on "spi32766.0": [ 1.156097] 0x000000000000-0x000000020000 : "0:SBL1" [ 1.162380] 0x000000020000-0x000000040000 : "0:MIBIB" [ 1.167429] 0x000000040000-0x000000060000 : "0:SBL2" [ 1.172427] 0x000000060000-0x0000000a0000 : "0:SBL3" [ 1.177536] 0x0000000a0000-0x0000000b0000 : "0:DDRCONFIG" [ 1.182473] 0x0000000b0000-0x0000000c0000 : "0:SSD" [ 1.187679] 0x0000000c0000-0x000000100000 : "0:TZ" [ 1.192342] 0x000000100000-0x000000140000 : "0:RPM" [ 1.197190] 0x000000140000-0x0000001c0000 : "0:APPSBL" [ 1.202027] 0x0000001c0000-0x0000001d0000 : "0:APPSBLENV" [ 1.207300] 0x0000001d0000-0x0000001e0000 : "0:ART" [ 1.212693] 0x0000001e0000-0x0000001f0000 : "0:DUAL_FLAG" [ 1.217453] 0x0000001f0000-0x000000400000 : "0:RESERVED" Regards Stefan Lippers-Hollmann
On 16/01/18 20:34, Stefan Lippers-Hollmann wrote: > Hi > > On 2018-01-11, Rafał Miłecki wrote: >> From: Rafał Miłecki <rafal@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. > [...] > > Tested-by: Stefan Lippers-Hollmann <s.l-h@gmx.de> Acked-by: John Crispin <john@phrozen.org> > > [ 0.000000] OF: fdt:Machine model: ZyXEL NBG6817 > ... > [ 0.000000] Kernel command line: rootfstype=squashfs,ext4 rootwait noinitrd root=/dev/mmcblk0p8 > [ 0.000000] Bootloader command line (ignored): board=NBG6817 root=/dev/mmcblk0p8 rootwait zld_ver=2.04 console=ttyHSL1,115200n8 mtdparts=m25p80:0xC0000(SBL)ro,0x40000(TZ)ro,0x40000(RPM)ro,0x80000(u-boot)ro,0x10000(env)ro,0x10000(ART)ro,0x10000(dualflag),0x210000(reserved) > ... > [ 1.136985] spi_qup 1a280000.spi: IN:block:16, fifo:64, OUT:block:16, fifo:64 > [ 1.138996] m25p80 spi32766.0: mx25u3235f (4096 Kbytes) > [ 1.144963] 13 qcom-smem partitions found on MTD device spi32766.0 > [ 1.149927] Creating 13 MTD partitions on "spi32766.0": > [ 1.156097] 0x000000000000-0x000000020000 : "0:SBL1" > [ 1.162380] 0x000000020000-0x000000040000 : "0:MIBIB" > [ 1.167429] 0x000000040000-0x000000060000 : "0:SBL2" > [ 1.172427] 0x000000060000-0x0000000a0000 : "0:SBL3" > [ 1.177536] 0x0000000a0000-0x0000000b0000 : "0:DDRCONFIG" > [ 1.182473] 0x0000000b0000-0x0000000c0000 : "0:SSD" > [ 1.187679] 0x0000000c0000-0x000000100000 : "0:TZ" > [ 1.192342] 0x000000100000-0x000000140000 : "0:RPM" > [ 1.197190] 0x000000140000-0x0000001c0000 : "0:APPSBL" > [ 1.202027] 0x0000001c0000-0x0000001d0000 : "0:APPSBLENV" > [ 1.207300] 0x0000001d0000-0x0000001e0000 : "0:ART" > [ 1.212693] 0x0000001e0000-0x0000001f0000 : "0:DUAL_FLAG" > [ 1.217453] 0x0000001f0000-0x000000400000 : "0:RESERVED" > > Regards > Stefan Lippers-Hollmann > > _______________________________________________ > Lede-dev mailing list > Lede-dev@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/lede-dev
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@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)