2019-09-02 10:12:41

by Weiyi Lu

[permalink] [raw]
Subject: [PATCH v1 0/3] Runtime PM support for MT8183 mcucfg clock provider

This series is based on v5.3-rc1 and Mediatek MT8183 scpsys support v7[1].
Since Runtime PM is supported in Common Clock Framework which keeps
clock controller's power domain enabled to ensure clock status accessing correctly.

[1] https://patchwork.kernel.org/cover/11118371/

---

Weiyi Lu (3):
clk: mediatek: Register clock gate with device
clk: mediatek: Runtime PM support for MT8183 mcucfg clock provider
arm64: dts: Add power-domains properity to mfgcfg

arch/arm64/boot/dts/mediatek/mt8183.dtsi | 1 +
drivers/clk/mediatek/clk-gate.c | 5 +++--
drivers/clk/mediatek/clk-gate.h | 3 ++-
drivers/clk/mediatek/clk-mt8183-mfgcfg.c | 7 +++++--
drivers/clk/mediatek/clk-mtk.c | 16 +++++++++++++---
drivers/clk/mediatek/clk-mtk.h | 5 +++++
6 files changed, 29 insertions(+), 8 deletions(-)


2019-09-02 10:12:43

by Weiyi Lu

[permalink] [raw]
Subject: [PATCH v1 2/3] clk: mediatek: Runtime PM support for MT8183 mcucfg clock provider

Enable the runtime PM support and forward the struct device pointer for
registration of MT8183 mcucfg clocks.

Signed-off-by: Weiyi Lu <[email protected]>
---
drivers/clk/mediatek/clk-mt8183-mfgcfg.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/clk/mediatek/clk-mt8183-mfgcfg.c b/drivers/clk/mediatek/clk-mt8183-mfgcfg.c
index 99a6b02..37b4162 100644
--- a/drivers/clk/mediatek/clk-mt8183-mfgcfg.c
+++ b/drivers/clk/mediatek/clk-mt8183-mfgcfg.c
@@ -5,6 +5,7 @@

#include <linux/clk-provider.h>
#include <linux/platform_device.h>
+#include <linux/pm_runtime.h>

#include "clk-mtk.h"
#include "clk-gate.h"
@@ -30,10 +31,12 @@ static int clk_mt8183_mfg_probe(struct platform_device *pdev)
struct clk_onecell_data *clk_data;
struct device_node *node = pdev->dev.of_node;

+ pm_runtime_enable(&pdev->dev);
+
clk_data = mtk_alloc_clk_data(CLK_MFG_NR_CLK);

- mtk_clk_register_gates(node, mfg_clks, ARRAY_SIZE(mfg_clks),
- clk_data);
+ mtk_clk_register_gates_with_dev(node, mfg_clks, ARRAY_SIZE(mfg_clks),
+ clk_data, &pdev->dev);

return of_clk_add_provider(node, of_clk_src_onecell_get, clk_data);
}
--
1.8.1.1.dirty

2019-09-02 10:12:44

by Weiyi Lu

[permalink] [raw]
Subject: [PATCH v1 3/3] arm64: dts: Add power-domains properity to mfgcfg

mfgcfg clock is under MFG_ASYNC power domain

Signed-off-by: Weiyi Lu <[email protected]>
---
arch/arm64/boot/dts/mediatek/mt8183.dtsi | 1 +
1 file changed, 1 insertion(+)

diff --git a/arch/arm64/boot/dts/mediatek/mt8183.dtsi b/arch/arm64/boot/dts/mediatek/mt8183.dtsi
index c2749c4..3f948e9 100644
--- a/arch/arm64/boot/dts/mediatek/mt8183.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt8183.dtsi
@@ -388,6 +388,7 @@
compatible = "mediatek,mt8183-mfgcfg", "syscon";
reg = <0 0x13000000 0 0x1000>;
#clock-cells = <1>;
+ power-domains = <&scpsys MT8183_POWER_DOMAIN_MFG_ASYNC>;
};

mmsys: syscon@14000000 {
--
1.8.1.1.dirty

2019-09-02 15:56:45

by kernel test robot

[permalink] [raw]
Subject: Re: [PATCH v1 3/3] arm64: dts: Add power-domains properity to mfgcfg

Hi Weiyi,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on linus/master]
[cannot apply to v5.3-rc6 next-20190902]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url: https://github.com/0day-ci/linux/commits/Weiyi-Lu/clk-mediatek-Register-clock-gate-with-device/20190902-174605
config: arm64-defconfig (attached as .config)
compiler: aarch64-linux-gcc (GCC) 7.4.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
GCC_VERSION=7.4.0 make.cross ARCH=arm64

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <[email protected]>

All errors (new ones prefixed by >>):

>> Error: arch/arm64/boot/dts/mediatek/mt8183.dtsi:391.29-30 syntax error
FATAL ERROR: Unable to parse input tree

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation


Attachments:
(No filename) (1.12 kB)
.config.gz (44.26 kB)
Download all attachments