From patchwork Sat Aug 15 00:50:44 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathieu Olivari X-Patchwork-Id: 507591 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from arrakis.dune.hu (arrakis.dune.hu [78.24.191.176]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id D19031401CD for ; Sat, 15 Aug 2015 10:53:31 +1000 (AEST) Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id 927C628BE97; Sat, 15 Aug 2015 02:52:29 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on arrakis.dune.hu X-Spam-Level: X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00, T_RP_MATCHES_RCVD autolearn=unavailable version=3.3.2 Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id 6176128BC43 for ; Sat, 15 Aug 2015 02:50:16 +0200 (CEST) X-policyd-weight: using cached result; rate:hard: -7.6 Received: from smtp.codeaurora.org (smtp.codeaurora.org [198.145.29.96]) by arrakis.dune.hu (Postfix) with ESMTPS for ; Sat, 15 Aug 2015 02:50:09 +0200 (CEST) Received: from smtp.codeaurora.org (localhost [127.0.0.1]) by smtp.codeaurora.org (Postfix) with ESMTP id C7B3C140230; Sat, 15 Aug 2015 00:50:52 +0000 (UTC) Received: by smtp.codeaurora.org (Postfix, from userid 486) id B5B1E140236; Sat, 15 Aug 2015 00:50:52 +0000 (UTC) Received: from mathieu-linux.qualcomm.com (qf-scl1nat.qualcomm.com [207.114.132.30]) (using TLSv1.2 with cipher AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: mathieu@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 1AECC140243; Sat, 15 Aug 2015 00:50:50 +0000 (UTC) From: Mathieu Olivari To: nbd@openwrt.org, hauke@hauke-m.de, jogo@openwrt.org, blogic@openwrt.org Date: Fri, 14 Aug 2015 17:50:44 -0700 Message-Id: <1439599844-4387-6-git-send-email-mathieu@codeaurora.org> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1439599844-4387-1-git-send-email-mathieu@codeaurora.org> References: <1439599844-4387-1-git-send-email-mathieu@codeaurora.org> X-Virus-Scanned: ClamAV using ClamSMTP Cc: openwrt-devel@lists.openwrt.org Subject: [OpenWrt-Devel] [PATCH 5/5] ipq806x: switch AP148 to using SMEM based MTD parser X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: openwrt-devel-bounces@lists.openwrt.org Sender: "openwrt-devel" *Enable SMEM MTD parser and its dependencies (SMEM & HW spinlocks) in the kernel config *Replaces the MTD layout in DT by the dynamic layout provided by the SMEM parser for AP148 Using the OF based parser is still possible on platforms which have a fixed MTD partition layout. Signed-off-by: Mathieu Olivari --- target/linux/ipq806x/config-3.18 | 4 +++ target/linux/ipq806x/config-4.1 | 8 ++--- .../patches-3.18/021-add-ap148-partitions.patch | 34 ++++++---------------- ...1-ARM-qcom-add-USB-nodes-to-ipq806x-ap148.patch | 2 +- ...-qcom-add-pcie-nodes-to-ipq806x-platforms.patch | 2 +- ...nable-NAND-node-on-IPQ8064-AP148-platform.patch | 2 +- ...RM-dts-qcom-add-mdio-nodes-to-ap148-db149.patch | 2 +- ...-qcom-add-gmac-nodes-to-ipq806x-platforms.patch | 2 +- .../patches-4.1/021-add-ap148-partitions.patch | 34 ++++++---------------- ...-qcom-add-pcie-nodes-to-ipq806x-platforms.patch | 2 +- ...nable-NAND-node-on-IPQ8064-AP148-platform.patch | 2 +- ...RM-dts-qcom-add-mdio-nodes-to-ap148-db149.patch | 2 +- ...-qcom-add-gmac-nodes-to-ipq806x-platforms.patch | 2 +- 13 files changed, 35 insertions(+), 63 deletions(-) diff --git a/target/linux/ipq806x/config-3.18 b/target/linux/ipq806x/config-3.18 index 2a837f5..3d4f8bb 100644 --- a/target/linux/ipq806x/config-3.18 +++ b/target/linux/ipq806x/config-3.18 @@ -206,6 +206,8 @@ CONFIG_HIGHMEM=y CONFIG_HIGHPTE=y CONFIG_HOTPLUG_CPU=y CONFIG_HWMON=y +CONFIG_HWSPINLOCK=y +CONFIG_HWSPINLOCK_QCOM=y CONFIG_HW_RANDOM=y CONFIG_HW_RANDOM_MSM=y CONFIG_HZ_FIXED=0 @@ -259,6 +261,7 @@ CONFIG_MTD_M25P80=y CONFIG_MTD_NAND=y CONFIG_MTD_NAND_ECC=y CONFIG_MTD_NAND_QCOM=y +CONFIG_MTD_QCOM_SMEM_PARTS=y CONFIG_MTD_SPI_NOR=y CONFIG_MTD_SPLIT_FIRMWARE=y CONFIG_MTD_SPLIT_FIT_FW=y @@ -345,6 +348,7 @@ CONFIG_QCOM_BAM_DMA=y CONFIG_QCOM_GSBI=y CONFIG_QCOM_HFPLL=y CONFIG_QCOM_SCM=y +CONFIG_QCOM_SMEM=y CONFIG_QCOM_WDT=y CONFIG_RAS=y # CONFIG_RCU_BOOST is not set diff --git a/target/linux/ipq806x/config-4.1 b/target/linux/ipq806x/config-4.1 index f711dd5..d48943c 100644 --- a/target/linux/ipq806x/config-4.1 +++ b/target/linux/ipq806x/config-4.1 @@ -45,7 +45,6 @@ CONFIG_ARM_CCI400_PMU=y CONFIG_ARM_CPU_SUSPEND=y CONFIG_ARM_GIC=y CONFIG_ARM_HAS_SG_CHAIN=y -# CONFIG_ARM_KIRKWOOD_CPUFREQ is not set CONFIG_ARM_L1_CACHE_SHIFT=6 CONFIG_ARM_L1_CACHE_SHIFT_6=y # CONFIG_ARM_LPAE is not set @@ -214,6 +213,8 @@ CONFIG_HIGHPTE=y CONFIG_HOTPLUG_CPU=y # CONFIG_HSU_DMA_PCI is not set CONFIG_HWMON=y +CONFIG_HWSPINLOCK=y +CONFIG_HWSPINLOCK_QCOM=y CONFIG_HW_RANDOM=y CONFIG_HW_RANDOM_MSM=y CONFIG_HZ_FIXED=0 @@ -240,7 +241,6 @@ CONFIG_KPSS_XCC=y CONFIG_KRAITCC=y CONFIG_KRAIT_CLOCKS=y CONFIG_KRAIT_L2_ACCESSORS=y -# CONFIG_LEDS_REGULATOR is not set CONFIG_LIBFDT=y CONFIG_LOCKUP_DETECTOR=y CONFIG_LOCK_SPIN_ON_OWNER=y @@ -268,6 +268,7 @@ CONFIG_MTD_M25P80=y CONFIG_MTD_NAND=y CONFIG_MTD_NAND_ECC=y CONFIG_MTD_NAND_QCOM=y +CONFIG_MTD_QCOM_SMEM_PARTS=y CONFIG_MTD_SPI_NOR=y CONFIG_MTD_SPLIT_FIRMWARE=y CONFIG_MTD_SPLIT_FIT_FW=y @@ -357,6 +358,7 @@ CONFIG_QCOM_BAM_DMA=y CONFIG_QCOM_GSBI=y CONFIG_QCOM_HFPLL=y CONFIG_QCOM_SCM=y +CONFIG_QCOM_SMEM=y CONFIG_QCOM_WDT=y CONFIG_RAS=y # CONFIG_RCU_BOOST is not set @@ -366,9 +368,7 @@ CONFIG_RD_GZIP=y CONFIG_REGMAP=y CONFIG_REGMAP_MMIO=y CONFIG_REGULATOR=y -# CONFIG_REGULATOR_DEBUG is not set CONFIG_REGULATOR_QCOM_RPM=y -# CONFIG_REGULATOR_USERSPACE_CONSUMER is not set CONFIG_RESET_CONTROLLER=y CONFIG_RFS_ACCEL=y CONFIG_RPS=y diff --git a/target/linux/ipq806x/patches-3.18/021-add-ap148-partitions.patch b/target/linux/ipq806x/patches-3.18/021-add-ap148-partitions.patch index 34eb9c0..bfdb30f 100644 --- a/target/linux/ipq806x/patches-3.18/021-add-ap148-partitions.patch +++ b/target/linux/ipq806x/patches-3.18/021-add-ap148-partitions.patch @@ -1,35 +1,19 @@ --- a/arch/arm/boot/dts/qcom-ipq8064-ap148.dts +++ b/arch/arm/boot/dts/qcom-ipq8064-ap148.dts -@@ -78,13 +78,28 @@ +@@ -77,15 +77,7 @@ + spi-max-frequency = <50000000>; reg = <0>; - partition@0 { +- partition@0 { - label = "rootfs"; - reg = <0x0 0x1000000>; -+ label = "lowlevel_init"; -+ reg = <0x0 0x1b0000>; - }; - - partition@1 { +- }; +- +- partition@1 { - label = "scratch"; - reg = <0x1000000 0x1000000>; -+ label = "u-boot"; -+ reg = <0x1b0000 0x80000>; -+ }; -+ -+ partition@2 { -+ label = "u-boot-env"; -+ reg = <0x230000 0x40000>; -+ }; -+ -+ partition@3 { -+ label = "caldata"; -+ reg = <0x270000 0x40000>; -+ }; -+ -+ partition@4 { -+ label = "firmware"; -+ reg = <0x2b0000 0x1d50000>; - }; +- }; ++ linux,part-probe = "qcom-smem"; }; }; + }; diff --git a/target/linux/ipq806x/patches-3.18/101-ARM-qcom-add-USB-nodes-to-ipq806x-ap148.patch b/target/linux/ipq806x/patches-3.18/101-ARM-qcom-add-USB-nodes-to-ipq806x-ap148.patch index c322616..e2d03d4 100644 --- a/target/linux/ipq806x/patches-3.18/101-ARM-qcom-add-USB-nodes-to-ipq806x-ap148.patch +++ b/target/linux/ipq806x/patches-3.18/101-ARM-qcom-add-USB-nodes-to-ipq806x-ap148.patch @@ -1,6 +1,6 @@ --- a/arch/arm/boot/dts/qcom-ipq8064-ap148.dts +++ b/arch/arm/boot/dts/qcom-ipq8064-ap148.dts -@@ -114,5 +114,29 @@ +@@ -91,5 +91,29 @@ sata@29000000 { status = "ok"; }; diff --git a/target/linux/ipq806x/patches-3.18/112-ARM-dts-qcom-add-pcie-nodes-to-ipq806x-platforms.patch b/target/linux/ipq806x/patches-3.18/112-ARM-dts-qcom-add-pcie-nodes-to-ipq806x-platforms.patch index 4c18566..d15f0ac 100644 --- a/target/linux/ipq806x/patches-3.18/112-ARM-dts-qcom-add-pcie-nodes-to-ipq806x-platforms.patch +++ b/target/linux/ipq806x/patches-3.18/112-ARM-dts-qcom-add-pcie-nodes-to-ipq806x-platforms.patch @@ -40,7 +40,7 @@ Signed-off-by: Mathieu Olivari spi_pins: spi_pins { mux { pins = "gpio18", "gpio19", "gpio21"; -@@ -138,5 +156,19 @@ +@@ -115,5 +133,19 @@ usb30@1 { status = "ok"; }; diff --git a/target/linux/ipq806x/patches-3.18/165-arm-qcom-dts-Enable-NAND-node-on-IPQ8064-AP148-platform.patch b/target/linux/ipq806x/patches-3.18/165-arm-qcom-dts-Enable-NAND-node-on-IPQ8064-AP148-platform.patch index 77be886..d62564c 100644 --- a/target/linux/ipq806x/patches-3.18/165-arm-qcom-dts-Enable-NAND-node-on-IPQ8064-AP148-platform.patch +++ b/target/linux/ipq806x/patches-3.18/165-arm-qcom-dts-Enable-NAND-node-on-IPQ8064-AP148-platform.patch @@ -57,7 +57,7 @@ arch/arm/boot/dts/qcom-ipq8064-ap148.dts | 36 ++++++++++++++++++++++++++++++++ }; gsbi@16300000 { -@@ -170,5 +195,19 @@ +@@ -147,5 +172,19 @@ pinctrl-0 = <&pcie1_pins>; pinctrl-names = "default"; }; diff --git a/target/linux/ipq806x/patches-3.18/707-ARM-dts-qcom-add-mdio-nodes-to-ap148-db149.patch b/target/linux/ipq806x/patches-3.18/707-ARM-dts-qcom-add-mdio-nodes-to-ap148-db149.patch index da8286a..a4a6a60 100644 --- a/target/linux/ipq806x/patches-3.18/707-ARM-dts-qcom-add-mdio-nodes-to-ap148-db149.patch +++ b/target/linux/ipq806x/patches-3.18/707-ARM-dts-qcom-add-mdio-nodes-to-ap148-db149.patch @@ -38,7 +38,7 @@ Signed-off-by: Mathieu Olivari }; gsbi@16300000 { -@@ -205,6 +215,34 @@ +@@ -182,6 +192,34 @@ nand-ecc-strength = <4>; nand-bus-width = <8>; }; diff --git a/target/linux/ipq806x/patches-3.18/708-ARM-dts-qcom-add-gmac-nodes-to-ipq806x-platforms.patch b/target/linux/ipq806x/patches-3.18/708-ARM-dts-qcom-add-gmac-nodes-to-ipq806x-platforms.patch index 8e66b8d..fda1b86 100644 --- a/target/linux/ipq806x/patches-3.18/708-ARM-dts-qcom-add-gmac-nodes-to-ipq806x-platforms.patch +++ b/target/linux/ipq806x/patches-3.18/708-ARM-dts-qcom-add-gmac-nodes-to-ipq806x-platforms.patch @@ -29,7 +29,7 @@ Signed-off-by: Mathieu Olivari }; gsbi@16300000 { -@@ -243,6 +253,27 @@ +@@ -220,6 +230,27 @@ reg = <4>; }; }; diff --git a/target/linux/ipq806x/patches-4.1/021-add-ap148-partitions.patch b/target/linux/ipq806x/patches-4.1/021-add-ap148-partitions.patch index 34eb9c0..bfdb30f 100644 --- a/target/linux/ipq806x/patches-4.1/021-add-ap148-partitions.patch +++ b/target/linux/ipq806x/patches-4.1/021-add-ap148-partitions.patch @@ -1,35 +1,19 @@ --- a/arch/arm/boot/dts/qcom-ipq8064-ap148.dts +++ b/arch/arm/boot/dts/qcom-ipq8064-ap148.dts -@@ -78,13 +78,28 @@ +@@ -77,15 +77,7 @@ + spi-max-frequency = <50000000>; reg = <0>; - partition@0 { +- partition@0 { - label = "rootfs"; - reg = <0x0 0x1000000>; -+ label = "lowlevel_init"; -+ reg = <0x0 0x1b0000>; - }; - - partition@1 { +- }; +- +- partition@1 { - label = "scratch"; - reg = <0x1000000 0x1000000>; -+ label = "u-boot"; -+ reg = <0x1b0000 0x80000>; -+ }; -+ -+ partition@2 { -+ label = "u-boot-env"; -+ reg = <0x230000 0x40000>; -+ }; -+ -+ partition@3 { -+ label = "caldata"; -+ reg = <0x270000 0x40000>; -+ }; -+ -+ partition@4 { -+ label = "firmware"; -+ reg = <0x2b0000 0x1d50000>; - }; +- }; ++ linux,part-probe = "qcom-smem"; }; }; + }; diff --git a/target/linux/ipq806x/patches-4.1/112-ARM-dts-qcom-add-pcie-nodes-to-ipq806x-platforms.patch b/target/linux/ipq806x/patches-4.1/112-ARM-dts-qcom-add-pcie-nodes-to-ipq806x-platforms.patch index f53b23d..77cf3c3 100644 --- a/target/linux/ipq806x/patches-4.1/112-ARM-dts-qcom-add-pcie-nodes-to-ipq806x-platforms.patch +++ b/target/linux/ipq806x/patches-4.1/112-ARM-dts-qcom-add-pcie-nodes-to-ipq806x-platforms.patch @@ -40,7 +40,7 @@ Signed-off-by: Mathieu Olivari spi_pins: spi_pins { mux { pins = "gpio18", "gpio19", "gpio21"; -@@ -114,5 +132,19 @@ +@@ -91,5 +109,19 @@ sata@29000000 { status = "ok"; }; diff --git a/target/linux/ipq806x/patches-4.1/165-arm-qcom-dts-Enable-NAND-node-on-IPQ8064-AP148-platform.patch b/target/linux/ipq806x/patches-4.1/165-arm-qcom-dts-Enable-NAND-node-on-IPQ8064-AP148-platform.patch index 8832756..415bf30 100644 --- a/target/linux/ipq806x/patches-4.1/165-arm-qcom-dts-Enable-NAND-node-on-IPQ8064-AP148-platform.patch +++ b/target/linux/ipq806x/patches-4.1/165-arm-qcom-dts-Enable-NAND-node-on-IPQ8064-AP148-platform.patch @@ -54,7 +54,7 @@ arch/arm/boot/dts/qcom-ipq8064-ap148.dts | 36 ++++++++++++++++++++++++++++++++ }; gsbi@16300000 { -@@ -146,5 +168,19 @@ +@@ -123,5 +145,19 @@ pinctrl-0 = <&pcie1_pins>; pinctrl-names = "default"; }; diff --git a/target/linux/ipq806x/patches-4.1/707-ARM-dts-qcom-add-mdio-nodes-to-ap148-db149.patch b/target/linux/ipq806x/patches-4.1/707-ARM-dts-qcom-add-mdio-nodes-to-ap148-db149.patch index 940f031..394f378 100644 --- a/target/linux/ipq806x/patches-4.1/707-ARM-dts-qcom-add-mdio-nodes-to-ap148-db149.patch +++ b/target/linux/ipq806x/patches-4.1/707-ARM-dts-qcom-add-mdio-nodes-to-ap148-db149.patch @@ -38,7 +38,7 @@ Signed-off-by: Mathieu Olivari }; gsbi@16300000 { -@@ -178,6 +188,34 @@ +@@ -155,6 +165,34 @@ nand-ecc-strength = <4>; nand-bus-width = <8>; }; diff --git a/target/linux/ipq806x/patches-4.1/708-ARM-dts-qcom-add-gmac-nodes-to-ipq806x-platforms.patch b/target/linux/ipq806x/patches-4.1/708-ARM-dts-qcom-add-gmac-nodes-to-ipq806x-platforms.patch index 87a3728..9b7eacb 100644 --- a/target/linux/ipq806x/patches-4.1/708-ARM-dts-qcom-add-gmac-nodes-to-ipq806x-platforms.patch +++ b/target/linux/ipq806x/patches-4.1/708-ARM-dts-qcom-add-gmac-nodes-to-ipq806x-platforms.patch @@ -29,7 +29,7 @@ Signed-off-by: Mathieu Olivari }; gsbi@16300000 { -@@ -216,6 +226,27 @@ +@@ -193,6 +203,27 @@ reg = <4>; }; };