2018-05-11 03:37:29

by Yinbo Zhu

[permalink] [raw]
Subject: [PATCH 1/9] armv8: pm: add rcpm module support

From: Yuantian Tang <[email protected]>

The Run Control and Power Management (RCPM) module communicates
with embedded cores, coherency modules, and other device platform
module to provide run control and power management functionality

Signed-off-by: Tang Yuantian <[email protected]>
Signed-off-by: Yinbo Zhu <[email protected]>
---
drivers/soc/fsl/Makefile | 1 +
drivers/soc/fsl/rcpm.c | 153 ++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 154 insertions(+), 0 deletions(-)
create mode 100644 drivers/soc/fsl/rcpm.c

diff --git a/drivers/soc/fsl/Makefile b/drivers/soc/fsl/Makefile
index 629dab8..68fcd71 100644
--- a/drivers/soc/fsl/Makefile
+++ b/drivers/soc/fsl/Makefile
@@ -5,6 +5,7 @@
obj-$(CONFIG_FSL_DPAA) += qbman/
obj-$(CONFIG_QUICC_ENGINE) += qe/
obj-$(CONFIG_CPM) += qe/
+obj-$(CONFIG_SUSPEND) += rcpm.o
obj-$(CONFIG_FSL_GUTS) += guts.o
obj-$(CONFIG_FSL_LS2_CONSOLE) += ls2-console/
obj-$(CONFIG_LS_SOC_DRIVERS) += layerscape/
diff --git a/drivers/soc/fsl/rcpm.c b/drivers/soc/fsl/rcpm.c
new file mode 100644
index 0000000..ff0477b
--- /dev/null
+++ b/drivers/soc/fsl/rcpm.c
@@ -0,0 +1,153 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright 2016 NXP
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ */
+#define pr_fmt(fmt) "RCPM: %s: " fmt, __func__
+
+#include <linux/kernel.h>
+#include <linux/io.h>
+#include <linux/of_platform.h>
+#include <linux/of_address.h>
+#include <linux/suspend.h>
+
+/* RCPM register offset */
+#define RCPM_IPPDEXPCR0 0x140
+
+#define RCPM_WAKEUP_CELL_SIZE 2
+
+struct rcpm_config {
+ int ipp_num;
+ int ippdexpcr_offset;
+ u32 ippdexpcr[2];
+ void *rcpm_reg_base;
+};
+
+static struct rcpm_config *rcpm;
+
+static inline void rcpm_reg_write(u32 offset, u32 value)
+{
+ iowrite32be(value, rcpm->rcpm_reg_base + offset);
+}
+
+static inline u32 rcpm_reg_read(u32 offset)
+{
+ return ioread32be(rcpm->rcpm_reg_base + offset);
+}
+
+static void rcpm_wakeup_fixup(struct device *dev, void *data)
+{
+ struct device_node *node = dev ? dev->of_node : NULL;
+ u32 value[RCPM_WAKEUP_CELL_SIZE];
+ int ret, i;
+
+ if (!dev || !node || !device_may_wakeup(dev))
+ return;
+
+ /*
+ * Get the values in the "rcpm-wakeup" property.
+ * Three values are:
+ * The first is a pointer to the RCPM node.
+ * The second is the value of the ippdexpcr0 register.
+ * The third is the value of the ippdexpcr1 register.
+ */
+ ret = of_property_read_u32_array(node, "fsl,rcpm-wakeup",
+ value, RCPM_WAKEUP_CELL_SIZE);
+ if (ret)
+ return;
+
+ pr_debug("wakeup source: the device %s\n", node->full_name);
+
+ for (i = 0; i < rcpm->ipp_num; i++)
+ rcpm->ippdexpcr[i] |= value[i + 1];
+}
+
+static int rcpm_suspend_prepare(void)
+{
+ int i;
+
+ WARN_ON(!rcpm);
+
+ for (i = 0; i < rcpm->ipp_num; i++)
+ rcpm->ippdexpcr[i] = 0;
+
+ dpm_for_each_dev(NULL, rcpm_wakeup_fixup);
+
+ for (i = 0; i < rcpm->ipp_num; i++) {
+ rcpm_reg_write(rcpm->ippdexpcr_offset + 4 * i,
+ rcpm->ippdexpcr[i]);
+ pr_debug("ippdexpcr%d = 0x%x\n", i, rcpm->ippdexpcr[i]);
+ }
+
+ return 0;
+}
+
+static int rcpm_suspend_notifier_call(struct notifier_block *bl,
+ unsigned long state,
+ void *unused)
+{
+ switch (state) {
+ case PM_SUSPEND_PREPARE:
+ rcpm_suspend_prepare();
+ break;
+ }
+
+ return NOTIFY_DONE;
+}
+
+static struct rcpm_config rcpm_default_config = {
+ .ipp_num = 1,
+ .ippdexpcr_offset = RCPM_IPPDEXPCR0,
+};
+
+static const struct of_device_id rcpm_matches[] = {
+ {
+ .compatible = "fsl,qoriq-rcpm-2.1",
+ .data = &rcpm_default_config,
+ },
+ {}
+};
+
+static struct notifier_block rcpm_suspend_notifier = {
+ .notifier_call = rcpm_suspend_notifier_call,
+};
+
+static int __init layerscape_rcpm_init(void)
+{
+ const struct of_device_id *match;
+ struct device_node *np;
+
+ np = of_find_matching_node_and_match(NULL, rcpm_matches, &match);
+ if (!np) {
+ pr_err("Can't find the RCPM node.\n");
+ return -EINVAL;
+ }
+
+ if (match->data)
+ rcpm = (struct rcpm_config *)match->data;
+ else
+ return -EINVAL;
+
+ rcpm->rcpm_reg_base = of_iomap(np, 0);
+ of_node_put(np);
+ if (!rcpm->rcpm_reg_base)
+ return -ENOMEM;
+
+ register_pm_notifier(&rcpm_suspend_notifier);
+
+ pr_info("The RCPM driver initialized.\n");
+
+ return 0;
+}
+
+subsys_initcall(layerscape_rcpm_init);
--
1.7.1



2018-05-11 03:37:46

by Yinbo Zhu

[permalink] [raw]
Subject: [PATCH 2/9] armv8: pm: Fix issue of rcpm driver wrongly program other IP control bits

From: Ran Wang <[email protected]>

When rcpm driver get target register data from DTS property 'fsl,
rcpm-wakeup' (second value), it directly write that data to register
RCPM_IPPDEXPCRx rather than 'OR' the value read from it before. This
operation will over-write those non-related IP control bit which
might have been programmed, should be prevented.

Signed-off-by: Ran Wang <[email protected]>
Signed-off-by: Yinbo Zhu <[email protected]>
---
drivers/soc/fsl/rcpm.c | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/drivers/soc/fsl/rcpm.c b/drivers/soc/fsl/rcpm.c
index ff0477b..39eabfb 100644
--- a/drivers/soc/fsl/rcpm.c
+++ b/drivers/soc/fsl/rcpm.c
@@ -75,6 +75,7 @@ static void rcpm_wakeup_fixup(struct device *dev, void *data)
static int rcpm_suspend_prepare(void)
{
int i;
+ u32 val;

WARN_ON(!rcpm);

@@ -84,9 +85,12 @@ static int rcpm_suspend_prepare(void)
dpm_for_each_dev(NULL, rcpm_wakeup_fixup);

for (i = 0; i < rcpm->ipp_num; i++) {
- rcpm_reg_write(rcpm->ippdexpcr_offset + 4 * i,
- rcpm->ippdexpcr[i]);
- pr_debug("ippdexpcr%d = 0x%x\n", i, rcpm->ippdexpcr[i]);
+ if (rcpm->ippdexpcr[i]) {
+ val = rcpm_reg_read(rcpm->ippdexpcr_offset + 4 * i);
+ rcpm_reg_write(rcpm->ippdexpcr_offset + 4 * i,
+ val | rcpm->ippdexpcr[i]);
+ pr_debug("ippdexpcr%d = 0x%x\n", i, rcpm->ippdexpcr[i]);
+ }
}

return 0;
--
1.7.1


2018-05-11 03:37:50

by Yinbo Zhu

[permalink] [raw]
Subject: [PATCH 3/9] soc: fsl: set rcpm bit for FTM

From: Zhang Ying-22455 <[email protected]>

Set RCPM for FTM when using FTM as wakeup source. Because the RCPM
module of each platform has different big-end and little-end mode,
there need to set RCPM depending on the platform.

Signed-off-by: Zhang Ying-22455 <[email protected]>
Signed-off-by: Yinbo Zhu <[email protected]>
---
.../devicetree/bindings/timer/fsl,ftm-timer.txt | 7 ++
drivers/soc/fsl/layerscape/ftm_alarm.c | 92 ++++++++++++++++++-
2 files changed, 94 insertions(+), 5 deletions(-)

diff --git a/Documentation/devicetree/bindings/timer/fsl,ftm-timer.txt b/Documentation/devicetree/bindings/timer/fsl,ftm-timer.txt
index aa8c402..15ead58 100644
--- a/Documentation/devicetree/bindings/timer/fsl,ftm-timer.txt
+++ b/Documentation/devicetree/bindings/timer/fsl,ftm-timer.txt
@@ -3,6 +3,13 @@ Freescale FlexTimer Module (FTM) Timer
Required properties:

- compatible : should be "fsl,ftm-timer"
+ Possible compatibles for ARM:
+ "fsl,ls1012a-ftm"
+ "fsl,ls1021a-ftm"
+ "fsl,ls1043a-ftm"
+ "fsl,ls1046a-ftm"
+ "fsl,ls1088a-ftm"
+ "fsl,ls208xa-ftm"
- reg : Specifies base physical address and size of the register sets for the
clock event device and clock source device.
- interrupts : Should be the clock event device interrupt.
diff --git a/drivers/soc/fsl/layerscape/ftm_alarm.c b/drivers/soc/fsl/layerscape/ftm_alarm.c
index 6f9882f..811dcfa 100644
--- a/drivers/soc/fsl/layerscape/ftm_alarm.c
+++ b/drivers/soc/fsl/layerscape/ftm_alarm.c
@@ -16,6 +16,9 @@
#include <linux/of_address.h>
#include <linux/of_irq.h>
#include <linux/platform_device.h>
+#include <linux/of.h>
+#include <linux/of_device.h>
+#include <linux/libata.h>

#define FTM_SC 0x00
#define FTM_SC_CLK_SHIFT 3
@@ -40,6 +43,59 @@
static u32 alarm_freq;
static bool big_endian;

+enum pmu_endian_type {
+ BIG_ENDIAN,
+ LITTLE_ENDIAN,
+};
+
+struct rcpm_cfg {
+ enum pmu_endian_type big_endian; /* Big/Little endian of PMU module */
+
+ /* FlexTimer1 is not powerdown during device LPM20 */
+ u32 flextimer_set_bit;
+};
+
+static struct rcpm_cfg ls1012a_rcpm_cfg = {
+ .big_endian = BIG_ENDIAN,
+ .flextimer_set_bit = 0x20000,
+};
+
+static struct rcpm_cfg ls1021a_rcpm_cfg = {
+ .big_endian = BIG_ENDIAN,
+ .flextimer_set_bit = 0x20000,
+};
+
+static struct rcpm_cfg ls1043a_rcpm_cfg = {
+ .big_endian = BIG_ENDIAN,
+ .flextimer_set_bit = 0x20000,
+};
+
+static struct rcpm_cfg ls1046a_rcpm_cfg = {
+ .big_endian = BIG_ENDIAN,
+ .flextimer_set_bit = 0x20000,
+};
+
+static struct rcpm_cfg ls1088a_rcpm_cfg = {
+ .big_endian = LITTLE_ENDIAN,
+ .flextimer_set_bit = 0x4000,
+};
+
+static struct rcpm_cfg ls208xa_rcpm_cfg = {
+ .big_endian = LITTLE_ENDIAN,
+ .flextimer_set_bit = 0x4000,
+};
+
+static const struct of_device_id ippdexpcr_of_match[] = {
+ { .compatible = "fsl,ls1012a-ftm", .data = &ls1012a_rcpm_cfg},
+ { .compatible = "fsl,ls1021a-ftm", .data = &ls1021a_rcpm_cfg},
+ { .compatible = "fsl,ls1043a-ftm", .data = &ls1043a_rcpm_cfg},
+ { .compatible = "fsl,ls1046a-ftm", .data = &ls1046a_rcpm_cfg},
+ { .compatible = "fsl,ls1088a-ftm", .data = &ls1088a_rcpm_cfg},
+ { .compatible = "fsl,ls208xa-ftm", .data = &ls208xa_rcpm_cfg},
+ {},
+};
+MODULE_DEVICE_TABLE(of, ippdexpcr_of_match);
+
static inline u32 ftm_readl(void __iomem *addr)
{
if (big_endian)
@@ -214,7 +270,10 @@ static int ftm_alarm_probe(struct platform_device *pdev)
struct resource *r;
int irq;
int ret;
- u32 ippdexpcr;
+ struct rcpm_cfg *rcpm_cfg;
+ u32 ippdexpcr, flextimer;
+ const struct of_device_id *of_id;
+ enum pmu_endian_type endian;

r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (!r)
@@ -224,14 +283,32 @@ static int ftm_alarm_probe(struct platform_device *pdev)
if (IS_ERR(ftm1_base))
return PTR_ERR(ftm1_base);

+ of_id = of_match_node(ippdexpcr_of_match, np);
+ if (!of_id)
+ return -ENODEV;
+
+ rcpm_cfg = devm_kzalloc(&pdev->dev, sizeof(*rcpm_cfg), GFP_KERNEL);
+ if (!rcpm_cfg)
+ return -ENOMEM;
+
+ rcpm_cfg = (struct rcpm_cfg *)of_id->data;
+ endian = rcpm_cfg->big_endian;
+ flextimer = rcpm_cfg->flextimer_set_bit;
+
r = platform_get_resource_byname(pdev, IORESOURCE_MEM, "FlexTimer1");
if (r) {
rcpm_ftm_addr = devm_ioremap_resource(&pdev->dev, r);
if (IS_ERR(rcpm_ftm_addr))
return PTR_ERR(rcpm_ftm_addr);
- ippdexpcr = ioread32be(rcpm_ftm_addr);
- ippdexpcr |= 0x20000;
- iowrite32be(ippdexpcr, rcpm_ftm_addr);
+ if (endian == BIG_ENDIAN)
+ ippdexpcr = ioread32be(rcpm_ftm_addr);
+ else
+ ippdexpcr = ioread32(rcpm_ftm_addr);
+ ippdexpcr |= flextimer;
+ if (endian == BIG_ENDIAN)
+ iowrite32be(ippdexpcr, rcpm_ftm_addr);
+ else
+ iowrite32(ippdexpcr, rcpm_ftm_addr);
}

irq = irq_of_parse_and_map(np, 0);
@@ -265,7 +342,12 @@ static int ftm_alarm_probe(struct platform_device *pdev)
}

static const struct of_device_id ftm_alarm_match[] = {
- { .compatible = "fsl,ftm-alarm", },
+ { .compatible = "fsl,ls1012a-ftm", },
+ { .compatible = "fsl,ls1021a-ftm", },
+ { .compatible = "fsl,ls1043a-ftm", },
+ { .compatible = "fsl,ls1046a-ftm", },
+ { .compatible = "fsl,ls1088a-ftm", },
+ { .compatible = "fsl,ls208xa-ftm", },
{ .compatible = "fsl,ftm-timer", },
{ },
};
--
1.7.1


2018-05-11 03:38:03

by Yinbo Zhu

[permalink] [raw]
Subject: [PATCH 6/9] soc: fsl: fix the compilation issue

From: Zhang Ying-22455 <[email protected]>

Signed-off-by: Zhang Ying-22455 <[email protected]>
---
drivers/soc/fsl/layerscape/ftm_alarm.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/soc/fsl/layerscape/ftm_alarm.c b/drivers/soc/fsl/layerscape/ftm_alarm.c
index 811dcfa..c22ef49 100644
--- a/drivers/soc/fsl/layerscape/ftm_alarm.c
+++ b/drivers/soc/fsl/layerscape/ftm_alarm.c
@@ -19,6 +19,7 @@
#include <linux/of.h>
#include <linux/of_device.h>
#include <linux/libata.h>
+#include <linux/module.h>

#define FTM_SC 0x00
#define FTM_SC_CLK_SHIFT 3
--
1.7.1


2018-05-11 03:38:32

by Yinbo Zhu

[permalink] [raw]
Subject: [PATCH 7/9] arm64: dts: ls1043a: Add the identify of the platform to support to set rcpm bit

From: Zhang Ying-22455 <[email protected]>

Add the identify of the platform to support set the rcpm with
big-endian or little-endian.

Signed-off-by: Zhang Ying-22455 <[email protected]>
---
arch/arm64/boot/dts/freescale/fsl-ls1043a.dtsi | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/arm64/boot/dts/freescale/fsl-ls1043a.dtsi b/arch/arm64/boot/dts/freescale/fsl-ls1043a.dtsi
index ffea97a..754ce0d 100644
--- a/arch/arm64/boot/dts/freescale/fsl-ls1043a.dtsi
+++ b/arch/arm64/boot/dts/freescale/fsl-ls1043a.dtsi
@@ -679,7 +679,7 @@
};

ftm0: ftm0@29d0000 {
- compatible = "fsl,ftm-alarm";
+ compatible = "fsl,ls1043a-ftm";
reg = <0x0 0x29d0000 0x0 0x10000>,
<0x0 0x1ee2140 0x0 0x4>;
reg-names = "ftm", "FlexTimer1";
--
1.7.1


2018-05-11 03:39:00

by Yinbo Zhu

[permalink] [raw]
Subject: [PATCH 8/9] arm64: dts: ls1046a: Add the identify of the platform to support to set rcpm bit

From: Zhang Ying-22455 <[email protected]>

Add the identify of the platform to support set the rcpm with
big-endian or little-endian.

Signed-off-by: Zhang Ying-22455 <[email protected]>
---
arch/arm64/boot/dts/freescale/fsl-ls1046a.dtsi | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/arm64/boot/dts/freescale/fsl-ls1046a.dtsi b/arch/arm64/boot/dts/freescale/fsl-ls1046a.dtsi
index 3e09bcb..1ce1153 100644
--- a/arch/arm64/boot/dts/freescale/fsl-ls1046a.dtsi
+++ b/arch/arm64/boot/dts/freescale/fsl-ls1046a.dtsi
@@ -575,7 +575,7 @@
};

ftm0: ftm0@29d0000 {
- compatible = "fsl,ftm-alarm";
+ compatible = "fsl,ls1046a-ftm";
reg = <0x0 0x29d0000 0x0 0x10000>,
<0x0 0x1ee2140 0x0 0x4>;
reg-names = "ftm", "FlexTimer1";
--
1.7.1


2018-05-11 03:39:00

by Yinbo Zhu

[permalink] [raw]
Subject: [PATCH 5/9] drivers: firmware: psci: use psci v0.2 to implement sleep

From: Yuantian Tang <[email protected]>

Technically psci v0.2 can not support system sleep. Unfortunately
our PPA only supports psci v0.2. So workaround this by changing
psci v1.0 to v0.2 call to implement system sleep.

Signed-off-by: Tang Yuantian <[email protected]>
Signed-off-by: Yinbo Zhu <[email protected]>
---
drivers/firmware/psci.c | 16 ++++++++++++++--
1 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/drivers/firmware/psci.c b/drivers/firmware/psci.c
index c80ec1d..0bd795f 100644
--- a/drivers/firmware/psci.c
+++ b/drivers/firmware/psci.c
@@ -437,8 +437,18 @@ int psci_cpu_suspend_enter(unsigned long index)

static int psci_system_suspend(unsigned long unused)
{
- return invoke_psci_fn(PSCI_FN_NATIVE(1_0, SYSTEM_SUSPEND),
- __pa_symbol(cpu_resume), 0, 0);
+ u32 state;
+ u32 ver = psci_get_version();
+
+ if (PSCI_VERSION_MAJOR(ver) >= 1) {
+ return invoke_psci_fn(PSCI_FN_NATIVE(1_0, SYSTEM_SUSPEND),
+ virt_to_phys(cpu_resume), 0, 0);
+ } else {
+ state = (2 << PSCI_0_2_POWER_STATE_AFFL_SHIFT) |
+ (1 << PSCI_0_2_POWER_STATE_TYPE_SHIFT);
+
+ return psci_cpu_suspend(state, virt_to_phys(cpu_resume));
+ }
}

static int psci_system_suspend_enter(suspend_state_t state)
@@ -562,6 +572,8 @@ static void __init psci_0_2_set_functions(void)
arm_pm_restart = psci_sys_reset;

pm_power_off = psci_sys_poweroff;
+
+ suspend_set_ops(&psci_suspend_ops);
}

/*
--
1.7.1


2018-05-11 03:39:17

by Yinbo Zhu

[permalink] [raw]
Subject: [PATCH 9/9] armv8: add psci 0.2 stardard support

From: Yuantian Tang <[email protected]>

In current kernel, only psci v1.0 is supported. But our psci firmware
only support psci v0.2. So update psci driver to support psci v0.2.

Signed-off-by: Tang Yuantian <[email protected]>
---
drivers/firmware/psci.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/drivers/firmware/psci.c b/drivers/firmware/psci.c
index 0bd795f..c9ed9fb 100644
--- a/drivers/firmware/psci.c
+++ b/drivers/firmware/psci.c
@@ -468,6 +468,8 @@ static void __init psci_init_system_suspend(void)
if (!IS_ENABLED(CONFIG_SUSPEND))
return;

+ suspend_set_ops(&psci_suspend_ops);
+
ret = psci_features(PSCI_FN_NATIVE(1_0, SYSTEM_SUSPEND));

if (ret != PSCI_RET_NOT_SUPPORTED)
@@ -573,6 +575,8 @@ static void __init psci_0_2_set_functions(void)

pm_power_off = psci_sys_poweroff;

+ psci_init_system_suspend();
+
suspend_set_ops(&psci_suspend_ops);
}

--
1.7.1


2018-05-11 03:40:34

by Yinbo Zhu

[permalink] [raw]
Subject: [PATCH 4/9] arm64: dts: ls208xa: Add the identify of the platform to support to set rcpm bit

From: Zhang Ying-22455 <[email protected]>

Add the identify of the platform to support set the rcpm with
big-endian or little-endian.

Signed-off-by: Zhang Ying-22455 <[email protected]>
---
arch/arm64/boot/dts/freescale/fsl-ls208xa.dtsi | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/arch/arm64/boot/dts/freescale/fsl-ls208xa.dtsi b/arch/arm64/boot/dts/freescale/fsl-ls208xa.dtsi
index fec61af..973e646 100644
--- a/arch/arm64/boot/dts/freescale/fsl-ls208xa.dtsi
+++ b/arch/arm64/boot/dts/freescale/fsl-ls208xa.dtsi
@@ -896,9 +896,11 @@
};

ftm0: ftm0@2800000 {
- compatible = "fsl,ftm-alarm";
- reg = <0x0 0x2800000 0x0 0x10000>;
+ compatible = "fsl,ls208xa-ftm";
+ reg = <0x0 0x2800000 0x0 0x10000>,
+ <0x0 0x1e34050 0x0 0x4>;
interrupts = <0 44 4>;
+ reg-names = "ftm", "FlexTimer1";
};
};

--
1.7.1


2018-05-11 17:02:47

by Leo Li

[permalink] [raw]
Subject: RE: [PATCH 3/9] soc: fsl: set rcpm bit for FTM



> -----Original Message-----
> From: Yinbo Zhu [mailto:[email protected]]
> Sent: Thursday, May 10, 2018 10:35 PM
> To: Yinbo Zhu <[email protected]>; Rob Herring <[email protected]>;
> Mark Rutland <[email protected]>; Catalin Marinas )
> <[email protected]>; Will Deacon ) <[email protected]>;
> Lorenzo Pieralisi ) <[email protected]>; Leo Li <[email protected]>
> Cc: Xiaobo Xie <[email protected]>; Ran Wang <[email protected]>;
> Daniel Lezcano <[email protected]>; Thomas Gleixner
> <[email protected]>; Shawn Guo <[email protected]>; Madalin-cristian
> Bucur <[email protected]>; Z.q. Hou <[email protected]>; Jerry
> Huang <[email protected]>; M.h. Lian <[email protected]>;
> Qiang Zhao <[email protected]>; Fabio Estevam
> <[email protected]>; Jiaheng Fan <[email protected]>; Po Liu
> <[email protected]>; Nipun Gupta <[email protected]>; Horia Geant?
> <[email protected]>; Priyanka Jain <[email protected]>; Sumit
> Garg <[email protected]>; costi <[email protected]>;
> Bogdan Purcareata <[email protected]>; Meng Yi
> <[email protected]>; Wang Dongsheng <[email protected]>; open
> list:CLOCKSOURCE, CLOCKEVENT DRIVERS <[email protected]>;
> open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS
> <[email protected]>; [email protected]; open
> list:FREESCALE SOC DRIVERS <[email protected]>; Andy Tang
> <[email protected]>; Ying Zhang <[email protected]>
> Subject: [PATCH 3/9] soc: fsl: set rcpm bit for FTM
>
> From: Zhang Ying-22455 <[email protected]>
>
> Set RCPM for FTM when using FTM as wakeup source. Because the RCPM
> module of each platform has different big-end and little-end mode, there
> need to set RCPM depending on the platform.
>
> Signed-off-by: Zhang Ying-22455 <[email protected]>
> Signed-off-by: Yinbo Zhu <[email protected]>
> ---
> .../devicetree/bindings/timer/fsl,ftm-timer.txt | 7 ++
> drivers/soc/fsl/layerscape/ftm_alarm.c | 92 ++++++++++++++++++-
> 2 files changed, 94 insertions(+), 5 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/timer/fsl,ftm-timer.txt
> b/Documentation/devicetree/bindings/timer/fsl,ftm-timer.txt
> index aa8c402..15ead58 100644
> --- a/Documentation/devicetree/bindings/timer/fsl,ftm-timer.txt
> +++ b/Documentation/devicetree/bindings/timer/fsl,ftm-timer.txt
> @@ -3,6 +3,13 @@ Freescale FlexTimer Module (FTM) Timer Required
> properties:
>
> - compatible : should be "fsl,ftm-timer"

Hi Yingbo,

This is a change that breaks backward compatibility and not acceptable.

> + Possible compatibles for ARM:
> + "fsl,ls1012a-ftm"
> + "fsl,ls1021a-ftm"
> + "fsl,ls1043a-ftm"
> + "fsl,ls1046a-ftm"
> + "fsl,ls1088a-ftm"
> + "fsl,ls208xa-ftm"
> - reg : Specifies base physical address and size of the register sets for the
> clock event device and clock source device.
> - interrupts : Should be the clock event device interrupt.
> diff --git a/drivers/soc/fsl/layerscape/ftm_alarm.c
> b/drivers/soc/fsl/layerscape/ftm_alarm.c
> index 6f9882f..811dcfa 100644
> --- a/drivers/soc/fsl/layerscape/ftm_alarm.c
> +++ b/drivers/soc/fsl/layerscape/ftm_alarm.c

There is no such file in the mainline kernel. So it looks like the patch set is based on some internal git repo instead of the upstream Linux kernel. This kind of patches shouldn't be sent to the upstream mailing list for review.

Regards,
Leo


2018-05-14 07:49:32

by Yinbo Zhu

[permalink] [raw]
Subject: RE: [PATCH 3/9] soc: fsl: set rcpm bit for FTM



-----Original Message-----
From: Leo Li
Sent: 2018年5月12日 1:00
To: Yinbo Zhu <[email protected]>; Yinbo Zhu <[email protected]>; Rob Herring <[email protected]>; Mark Rutland <[email protected]>; Catalin Marinas ) <[email protected]>; Will Deacon ) <[email protected]>; Lorenzo Pieralisi ) <[email protected]>
Cc: Xiaobo Xie <[email protected]>; Ran Wang <[email protected]>; Daniel Lezcano <[email protected]>; Thomas Gleixner <[email protected]>; Shawn Guo <[email protected]>; Madalin-cristian Bucur <[email protected]>; Z.q. Hou <[email protected]>; Jerry Huang <[email protected]>; M.h. Lian <[email protected]>; Qiang Zhao <[email protected]>; Fabio Estevam <[email protected]>; Jiaheng Fan <[email protected]>; Po Liu <[email protected]>; Nipun Gupta <[email protected]>; Horia Geantă <[email protected]>; Priyanka Jain <[email protected]>; Sumit Garg <[email protected]>; costi <[email protected]>; Bogdan Purcareata <[email protected]>; open list:CLOCKSOURCE, CLOCKEVENT DRIVERS <[email protected]>; open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS <[email protected]>; [email protected]; open list:FREESCALE SOC DRIVERS <[email protected]>; Andy Tang <[email protected]>; Ying Zhang <[email protected]>
Subject: RE: [PATCH 3/9] soc: fsl: set rcpm bit for FTM



> -----Original Message-----
> From: Yinbo Zhu [mailto:[email protected]]
> Sent: Thursday, May 10, 2018 10:35 PM
> To: Yinbo Zhu <[email protected]>; Rob Herring <[email protected]>;
> Mark Rutland <[email protected]>; Catalin Marinas )
> <[email protected]>; Will Deacon ) <[email protected]>;
> Lorenzo Pieralisi ) <[email protected]>; Leo Li
> <[email protected]>
> Cc: Xiaobo Xie <[email protected]>; Ran Wang <[email protected]>;
> Daniel Lezcano <[email protected]>; Thomas Gleixner
> <[email protected]>; Shawn Guo <[email protected]>;
> Madalin-cristian Bucur <[email protected]>; Z.q. Hou
> <[email protected]>; Jerry Huang <[email protected]>; M.h. Lian
> <[email protected]>; Qiang Zhao <[email protected]>; Fabio
> Estevam <[email protected]>; Jiaheng Fan <[email protected]>; Po
> Liu <[email protected]>; Nipun Gupta <[email protected]>; Horia Geantă
> <[email protected]>; Priyanka Jain <[email protected]>; Sumit
> Garg <[email protected]>; costi <[email protected]>;
> Bogdan Purcareata <[email protected]>; Meng Yi
> <[email protected]>; Wang Dongsheng <[email protected]>; open
> list:CLOCKSOURCE, CLOCKEVENT DRIVERS <[email protected]>;
> open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS
> <[email protected]>; [email protected];
> open list:FREESCALE SOC DRIVERS <[email protected]>; Andy
> Tang <[email protected]>; Ying Zhang <[email protected]>
> Subject: [PATCH 3/9] soc: fsl: set rcpm bit for FTM
>
> From: Zhang Ying-22455 <[email protected]>
>
> Set RCPM for FTM when using FTM as wakeup source. Because the RCPM
> module of each platform has different big-end and little-end mode,
> there need to set RCPM depending on the platform.
>
> Signed-off-by: Zhang Ying-22455 <[email protected]>
> Signed-off-by: Yinbo Zhu <[email protected]>
> ---
> .../devicetree/bindings/timer/fsl,ftm-timer.txt | 7 ++
> drivers/soc/fsl/layerscape/ftm_alarm.c | 92 ++++++++++++++++++-
> 2 files changed, 94 insertions(+), 5 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/timer/fsl,ftm-timer.txt
> b/Documentation/devicetree/bindings/timer/fsl,ftm-timer.txt
> index aa8c402..15ead58 100644
> --- a/Documentation/devicetree/bindings/timer/fsl,ftm-timer.txt
> +++ b/Documentation/devicetree/bindings/timer/fsl,ftm-timer.txt
> @@ -3,6 +3,13 @@ Freescale FlexTimer Module (FTM) Timer Required
> properties:
>
> - compatible : should be "fsl,ftm-timer"

>Hi Yingbo,

>This is a change that breaks backward compatibility and not acceptable.
Hi leo,

This patch if I keep the change as inner patch and push it to dash-linnux but I will not push it to upstream, It's okay?
As far as I know, there was a other patch and file for replace the file and that the patch is already on the upstream
https://patchwork.kernel.org/patch/9391293/

> + Possible compatibles for ARM:
> + "fsl,ls1012a-ftm"
> + "fsl,ls1021a-ftm"
> + "fsl,ls1043a-ftm"
> + "fsl,ls1046a-ftm"
> + "fsl,ls1088a-ftm"
> + "fsl,ls208xa-ftm"
> - reg : Specifies base physical address and size of the register sets for the
> clock event device and clock source device.
> - interrupts : Should be the clock event device interrupt.
> diff --git a/drivers/soc/fsl/layerscape/ftm_alarm.c
> b/drivers/soc/fsl/layerscape/ftm_alarm.c
> index 6f9882f..811dcfa 100644
> --- a/drivers/soc/fsl/layerscape/ftm_alarm.c
> +++ b/drivers/soc/fsl/layerscape/ftm_alarm.c

>There is no such file in the mainline kernel. So it looks like the patch set is

> based on some internal git repo instead of the upstream Linux kernel. This kind of patches

> shouldn't be sent to the upstream mailing list for review.

>Regards,

>Leo
This patch will not to upstream.

Regards,

Yinbo.