All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/9] armv8: pm: add rcpm module support
@ 2018-05-11  3:35 ` Yinbo Zhu
  0 siblings, 0 replies; 35+ messages in thread
From: Yinbo Zhu @ 2018-05-11  3:35 UTC (permalink / raw)
  To: yinbo.zhu, Rob Herring, Mark Rutland, Catalin Marinas ),
	Will Deacon ), Lorenzo Pieralisi ),
	Li Yang
  Cc: xiaobo.xie, ran.wang_1, Daniel Lezcano, Thomas Gleixner,
	Shawn Guo, Madalin Bucur, Hou Zhiqiang, Changming Huang,
	Minghuan Lian, Zhao Qiang, Fabio Estevam, jiaheng . fan, Po Liu,
	Nipun Gupta, Horia Geantă,
	Priyanka Jain, Sumit Garg, costi, Bogdan Purcareata, Meng Yi,
	Wang Dongsheng, open list:CLOCKSOURCE, CLOCKEVENT DRIVERS,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	linux-arm-kernel, open list:FREESCALE SOC DRIVERS, Tang Yuantian,
	ying.zhang22455, Yuantian Tang

From: Yuantian Tang <andy.tang@nxp.com>

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 <andy.tang@nxp.com>
Signed-off-by: Yinbo Zhu <yinbo.zhu@nxp.com>
---
 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

^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [PATCH 1/9] armv8: pm: add rcpm module support
@ 2018-05-11  3:35 ` Yinbo Zhu
  0 siblings, 0 replies; 35+ messages in thread
From: Yinbo Zhu @ 2018-05-11  3:35 UTC (permalink / raw)
  To: yinbo.zhu, Rob Herring, Mark Rutland, Catalin Marinas ),
	Will Deacon ), Lorenzo Pieralisi ),
	Li Yang
  Cc: xiaobo.xie, ran.wang_1, Daniel Lezcano, Thomas Gleixner,
	Shawn Guo, Madalin Bucur, Hou Zhiqiang, Changming Huang,
	Minghuan Lian, Zhao Qiang, Fabio Estevam, jiaheng . fan, Po Liu,
	Nipun Gupta, Horia Geantă,
	Priyanka Jain, Sumit Garg, costi, Bogdan Purcareata, Meng Yi

From: Yuantian Tang <andy.tang@nxp.com>

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 <andy.tang@nxp.com>
Signed-off-by: Yinbo Zhu <yinbo.zhu@nxp.com>
---
 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

^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [PATCH 1/9] armv8: pm: add rcpm module support
@ 2018-05-11  3:35 ` Yinbo Zhu
  0 siblings, 0 replies; 35+ messages in thread
From: Yinbo Zhu @ 2018-05-11  3:35 UTC (permalink / raw)
  To: linux-arm-kernel

From: Yuantian Tang <andy.tang@nxp.com>

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 <andy.tang@nxp.com>
Signed-off-by: Yinbo Zhu <yinbo.zhu@nxp.com>
---
 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

^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [PATCH 2/9] armv8: pm: Fix issue of rcpm driver wrongly program other IP control bits
  2018-05-11  3:35 ` Yinbo Zhu
  (?)
@ 2018-05-11  3:35   ` Yinbo Zhu
  -1 siblings, 0 replies; 35+ messages in thread
From: Yinbo Zhu @ 2018-05-11  3:35 UTC (permalink / raw)
  To: yinbo.zhu, Rob Herring, Mark Rutland, Catalin Marinas ),
	Will Deacon ), Lorenzo Pieralisi ),
	Li Yang
  Cc: xiaobo.xie, ran.wang_1, Daniel Lezcano, Thomas Gleixner,
	Shawn Guo, Madalin Bucur, Hou Zhiqiang, Changming Huang,
	Minghuan Lian, Zhao Qiang, Fabio Estevam, jiaheng . fan, Po Liu,
	Nipun Gupta, Horia Geantă,
	Priyanka Jain, Sumit Garg, costi, Bogdan Purcareata, Meng Yi,
	Wang Dongsheng, open list:CLOCKSOURCE, CLOCKEVENT DRIVERS,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	linux-arm-kernel, open list:FREESCALE SOC DRIVERS, Tang Yuantian,
	ying.zhang22455

From: Ran Wang <ran.wang_1@nxp.com>

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 <ran.wang_1@nxp.com>
Signed-off-by: Yinbo Zhu <yinbo.zhu@nxp.com>
---
 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

^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [PATCH 2/9] armv8: pm: Fix issue of rcpm driver wrongly program other IP control bits
@ 2018-05-11  3:35   ` Yinbo Zhu
  0 siblings, 0 replies; 35+ messages in thread
From: Yinbo Zhu @ 2018-05-11  3:35 UTC (permalink / raw)
  To: yinbo.zhu, Rob Herring, Mark Rutland, Catalin Marinas ),
	Will Deacon ), Lorenzo Pieralisi ),
	Li Yang
  Cc: xiaobo.xie, ran.wang_1, Daniel Lezcano, Thomas Gleixner,
	Shawn Guo, Madalin Bucur, Hou Zhiqiang, Changming Huang,
	Minghuan Lian, Zhao Qiang, Fabio Estevam, jiaheng . fan, Po Liu,
	Nipun Gupta, Horia Geantă,
	Priyanka Jain, Sumit Garg, costi, Bogdan Purcareata, Meng Yi

From: Ran Wang <ran.wang_1@nxp.com>

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 <ran.wang_1@nxp.com>
Signed-off-by: Yinbo Zhu <yinbo.zhu@nxp.com>
---
 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

^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [PATCH 2/9] armv8: pm: Fix issue of rcpm driver wrongly program other IP control bits
@ 2018-05-11  3:35   ` Yinbo Zhu
  0 siblings, 0 replies; 35+ messages in thread
From: Yinbo Zhu @ 2018-05-11  3:35 UTC (permalink / raw)
  To: linux-arm-kernel

From: Ran Wang <ran.wang_1@nxp.com>

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 <ran.wang_1@nxp.com>
Signed-off-by: Yinbo Zhu <yinbo.zhu@nxp.com>
---
 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

^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [PATCH 3/9] soc: fsl: set rcpm bit for FTM
  2018-05-11  3:35 ` Yinbo Zhu
  (?)
@ 2018-05-11  3:35   ` Yinbo Zhu
  -1 siblings, 0 replies; 35+ messages in thread
From: Yinbo Zhu @ 2018-05-11  3:35 UTC (permalink / raw)
  To: yinbo.zhu, Rob Herring, Mark Rutland, Catalin Marinas ),
	Will Deacon ), Lorenzo Pieralisi ),
	Li Yang
  Cc: xiaobo.xie, ran.wang_1, Daniel Lezcano, Thomas Gleixner,
	Shawn Guo, Madalin Bucur, Hou Zhiqiang, Changming Huang,
	Minghuan Lian, Zhao Qiang, Fabio Estevam, jiaheng . fan, Po Liu,
	Nipun Gupta, Horia Geantă,
	Priyanka Jain, Sumit Garg, costi, Bogdan Purcareata, Meng Yi,
	Wang Dongsheng, open list:CLOCKSOURCE, CLOCKEVENT DRIVERS,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	linux-arm-kernel, open list:FREESCALE SOC DRIVERS, Tang Yuantian,
	ying.zhang22455

From: Zhang Ying-22455 <ying.zhang22455@nxp.com>

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 <ying.zhang22455@nxp.com>
Signed-off-by: Yinbo Zhu <yinbo.zhu@nxp.com>
---
 .../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

^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [PATCH 3/9] soc: fsl: set rcpm bit for FTM
@ 2018-05-11  3:35   ` Yinbo Zhu
  0 siblings, 0 replies; 35+ messages in thread
From: Yinbo Zhu @ 2018-05-11  3:35 UTC (permalink / raw)
  To: yinbo.zhu, Rob Herring, Mark Rutland, Catalin Marinas ),
	Will Deacon ), Lorenzo Pieralisi ),
	Li Yang
  Cc: xiaobo.xie, ran.wang_1, Daniel Lezcano, Thomas Gleixner,
	Shawn Guo, Madalin Bucur, Hou Zhiqiang, Changming Huang,
	Minghuan Lian, Zhao Qiang, Fabio Estevam, jiaheng . fan, Po Liu,
	Nipun Gupta, Horia Geantă,
	Priyanka Jain, Sumit Garg, costi, Bogdan Purcareata, Meng Yi

From: Zhang Ying-22455 <ying.zhang22455@nxp.com>

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 <ying.zhang22455@nxp.com>
Signed-off-by: Yinbo Zhu <yinbo.zhu@nxp.com>
---
 .../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

^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [PATCH 3/9] soc: fsl: set rcpm bit for FTM
@ 2018-05-11  3:35   ` Yinbo Zhu
  0 siblings, 0 replies; 35+ messages in thread
From: Yinbo Zhu @ 2018-05-11  3:35 UTC (permalink / raw)
  To: linux-arm-kernel

From: Zhang Ying-22455 <ying.zhang22455@nxp.com>

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 <ying.zhang22455@nxp.com>
Signed-off-by: Yinbo Zhu <yinbo.zhu@nxp.com>
---
 .../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

^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [PATCH 4/9] arm64: dts: ls208xa: Add the identify of the platform to support to set rcpm bit
  2018-05-11  3:35 ` Yinbo Zhu
  (?)
@ 2018-05-11  3:35   ` Yinbo Zhu
  -1 siblings, 0 replies; 35+ messages in thread
From: Yinbo Zhu @ 2018-05-11  3:35 UTC (permalink / raw)
  To: yinbo.zhu, Rob Herring, Mark Rutland, Catalin Marinas ),
	Will Deacon ), Lorenzo Pieralisi ),
	Li Yang
  Cc: xiaobo.xie, ran.wang_1, Daniel Lezcano, Thomas Gleixner,
	Shawn Guo, Madalin Bucur, Hou Zhiqiang, Changming Huang,
	Minghuan Lian, Zhao Qiang, Fabio Estevam, jiaheng . fan, Po Liu,
	Nipun Gupta, Horia Geantă,
	Priyanka Jain, Sumit Garg, costi, Bogdan Purcareata, Meng Yi,
	Wang Dongsheng, open list:CLOCKSOURCE, CLOCKEVENT DRIVERS,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	linux-arm-kernel, open list:FREESCALE SOC DRIVERS, Tang Yuantian,
	ying.zhang22455

From: Zhang Ying-22455 <ying.zhang22455@nxp.com>

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

Signed-off-by: Zhang Ying-22455 <ying.zhang22455@nxp.com>
---
 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

^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [PATCH 4/9] arm64: dts: ls208xa: Add the identify of the platform to support to set rcpm bit
@ 2018-05-11  3:35   ` Yinbo Zhu
  0 siblings, 0 replies; 35+ messages in thread
From: Yinbo Zhu @ 2018-05-11  3:35 UTC (permalink / raw)
  To: yinbo.zhu, Rob Herring, Mark Rutland, Catalin Marinas ),
	Will Deacon ), Lorenzo Pieralisi ),
	Li Yang
  Cc: xiaobo.xie, ran.wang_1, Daniel Lezcano, Thomas Gleixner,
	Shawn Guo, Madalin Bucur, Hou Zhiqiang, Changming Huang,
	Minghuan Lian, Zhao Qiang, Fabio Estevam, jiaheng . fan, Po Liu,
	Nipun Gupta, Horia Geantă,
	Priyanka Jain, Sumit Garg, costi, Bogdan Purcareata, Meng Yi

From: Zhang Ying-22455 <ying.zhang22455@nxp.com>

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

Signed-off-by: Zhang Ying-22455 <ying.zhang22455@nxp.com>
---
 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

^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [PATCH 4/9] arm64: dts: ls208xa: Add the identify of the platform to support to set rcpm bit
@ 2018-05-11  3:35   ` Yinbo Zhu
  0 siblings, 0 replies; 35+ messages in thread
From: Yinbo Zhu @ 2018-05-11  3:35 UTC (permalink / raw)
  To: linux-arm-kernel

From: Zhang Ying-22455 <ying.zhang22455@nxp.com>

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

Signed-off-by: Zhang Ying-22455 <ying.zhang22455@nxp.com>
---
 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 at 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

^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [PATCH 5/9] drivers: firmware: psci: use psci v0.2 to implement sleep
  2018-05-11  3:35 ` Yinbo Zhu
  (?)
@ 2018-05-11  3:35   ` Yinbo Zhu
  -1 siblings, 0 replies; 35+ messages in thread
From: Yinbo Zhu @ 2018-05-11  3:35 UTC (permalink / raw)
  To: yinbo.zhu, Rob Herring, Mark Rutland, Catalin Marinas ),
	Will Deacon ), Lorenzo Pieralisi ),
	Li Yang
  Cc: xiaobo.xie, ran.wang_1, Daniel Lezcano, Thomas Gleixner,
	Shawn Guo, Madalin Bucur, Hou Zhiqiang, Changming Huang,
	Minghuan Lian, Zhao Qiang, Fabio Estevam, jiaheng . fan, Po Liu,
	Nipun Gupta, Horia Geantă,
	Priyanka Jain, Sumit Garg, costi, Bogdan Purcareata, Meng Yi,
	Wang Dongsheng, open list:CLOCKSOURCE, CLOCKEVENT DRIVERS,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	linux-arm-kernel, open list:FREESCALE SOC DRIVERS, Tang Yuantian,
	ying.zhang22455, Yuantian Tang

From: Yuantian Tang <andy.tang@nxp.com>

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 <andy.tang@nxp.com>
Signed-off-by: Yinbo Zhu <yinbo.zhu@nxp.com>
---
 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

^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [PATCH 5/9] drivers: firmware: psci: use psci v0.2 to implement sleep
@ 2018-05-11  3:35   ` Yinbo Zhu
  0 siblings, 0 replies; 35+ messages in thread
From: Yinbo Zhu @ 2018-05-11  3:35 UTC (permalink / raw)
  To: yinbo.zhu, Rob Herring, Mark Rutland, Catalin Marinas ),
	Will Deacon ), Lorenzo Pieralisi ),
	Li Yang
  Cc: xiaobo.xie, ran.wang_1, Daniel Lezcano, Thomas Gleixner,
	Shawn Guo, Madalin Bucur, Hou Zhiqiang, Changming Huang,
	Minghuan Lian, Zhao Qiang, Fabio Estevam, jiaheng . fan, Po Liu,
	Nipun Gupta, Horia Geantă,
	Priyanka Jain, Sumit Garg, costi, Bogdan Purcareata, Meng Yi

From: Yuantian Tang <andy.tang@nxp.com>

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 <andy.tang@nxp.com>
Signed-off-by: Yinbo Zhu <yinbo.zhu@nxp.com>
---
 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

^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [PATCH 5/9] drivers: firmware: psci: use psci v0.2 to implement sleep
@ 2018-05-11  3:35   ` Yinbo Zhu
  0 siblings, 0 replies; 35+ messages in thread
From: Yinbo Zhu @ 2018-05-11  3:35 UTC (permalink / raw)
  To: linux-arm-kernel

From: Yuantian Tang <andy.tang@nxp.com>

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 <andy.tang@nxp.com>
Signed-off-by: Yinbo Zhu <yinbo.zhu@nxp.com>
---
 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

^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [PATCH 6/9] soc: fsl: fix the compilation issue
  2018-05-11  3:35 ` Yinbo Zhu
  (?)
@ 2018-05-11  3:35   ` Yinbo Zhu
  -1 siblings, 0 replies; 35+ messages in thread
From: Yinbo Zhu @ 2018-05-11  3:35 UTC (permalink / raw)
  To: yinbo.zhu, Rob Herring, Mark Rutland, Catalin Marinas ),
	Will Deacon ), Lorenzo Pieralisi ),
	Li Yang
  Cc: xiaobo.xie, ran.wang_1, Daniel Lezcano, Thomas Gleixner,
	Shawn Guo, Madalin Bucur, Hou Zhiqiang, Changming Huang,
	Minghuan Lian, Zhao Qiang, Fabio Estevam, jiaheng . fan, Po Liu,
	Nipun Gupta, Horia Geantă,
	Priyanka Jain, Sumit Garg, costi, Bogdan Purcareata, Meng Yi,
	Wang Dongsheng, open list:CLOCKSOURCE, CLOCKEVENT DRIVERS,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	linux-arm-kernel, open list:FREESCALE SOC DRIVERS, Tang Yuantian,
	ying.zhang22455

From: Zhang Ying-22455 <ying.zhang22455@nxp.com>

Signed-off-by: Zhang Ying-22455 <ying.zhang22455@nxp.com>
---
 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

^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [PATCH 6/9] soc: fsl: fix the compilation issue
@ 2018-05-11  3:35   ` Yinbo Zhu
  0 siblings, 0 replies; 35+ messages in thread
From: Yinbo Zhu @ 2018-05-11  3:35 UTC (permalink / raw)
  To: yinbo.zhu, Rob Herring, Mark Rutland, Catalin Marinas ),
	Will Deacon ), Lorenzo Pieralisi ),
	Li Yang
  Cc: xiaobo.xie, ran.wang_1, Daniel Lezcano, Thomas Gleixner,
	Shawn Guo, Madalin Bucur, Hou Zhiqiang, Changming Huang,
	Minghuan Lian, Zhao Qiang, Fabio Estevam, jiaheng . fan, Po Liu,
	Nipun Gupta, Horia Geantă,
	Priyanka Jain, Sumit Garg, costi, Bogdan Purcareata, Meng Yi

From: Zhang Ying-22455 <ying.zhang22455@nxp.com>

Signed-off-by: Zhang Ying-22455 <ying.zhang22455@nxp.com>
---
 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

^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [PATCH 6/9] soc: fsl: fix the compilation issue
@ 2018-05-11  3:35   ` Yinbo Zhu
  0 siblings, 0 replies; 35+ messages in thread
From: Yinbo Zhu @ 2018-05-11  3:35 UTC (permalink / raw)
  To: linux-arm-kernel

From: Zhang Ying-22455 <ying.zhang22455@nxp.com>

Signed-off-by: Zhang Ying-22455 <ying.zhang22455@nxp.com>
---
 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

^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [PATCH 7/9] arm64: dts: ls1043a: Add the identify of the platform to support to set rcpm bit
  2018-05-11  3:35 ` Yinbo Zhu
  (?)
@ 2018-05-11  3:35   ` Yinbo Zhu
  -1 siblings, 0 replies; 35+ messages in thread
From: Yinbo Zhu @ 2018-05-11  3:35 UTC (permalink / raw)
  To: yinbo.zhu, Rob Herring, Mark Rutland, Catalin Marinas ),
	Will Deacon ), Lorenzo Pieralisi ),
	Li Yang
  Cc: xiaobo.xie, ran.wang_1, Daniel Lezcano, Thomas Gleixner,
	Shawn Guo, Madalin Bucur, Hou Zhiqiang, Changming Huang,
	Minghuan Lian, Zhao Qiang, Fabio Estevam, jiaheng . fan, Po Liu,
	Nipun Gupta, Horia Geantă,
	Priyanka Jain, Sumit Garg, costi, Bogdan Purcareata, Meng Yi,
	Wang Dongsheng, open list:CLOCKSOURCE, CLOCKEVENT DRIVERS,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	linux-arm-kernel, open list:FREESCALE SOC DRIVERS, Tang Yuantian,
	ying.zhang22455

From: Zhang Ying-22455 <ying.zhang22455@nxp.com>

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

Signed-off-by: Zhang Ying-22455 <ying.zhang22455@nxp.com>
---
 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

^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [PATCH 7/9] arm64: dts: ls1043a: Add the identify of the platform to support to set rcpm bit
@ 2018-05-11  3:35   ` Yinbo Zhu
  0 siblings, 0 replies; 35+ messages in thread
From: Yinbo Zhu @ 2018-05-11  3:35 UTC (permalink / raw)
  To: yinbo.zhu, Rob Herring, Mark Rutland, Catalin Marinas ),
	Will Deacon ), Lorenzo Pieralisi ),
	Li Yang
  Cc: xiaobo.xie, ran.wang_1, Daniel Lezcano, Thomas Gleixner,
	Shawn Guo, Madalin Bucur, Hou Zhiqiang, Changming Huang,
	Minghuan Lian, Zhao Qiang, Fabio Estevam, jiaheng . fan, Po Liu,
	Nipun Gupta, Horia Geantă,
	Priyanka Jain, Sumit Garg, costi, Bogdan Purcareata, Meng Yi

From: Zhang Ying-22455 <ying.zhang22455@nxp.com>

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

Signed-off-by: Zhang Ying-22455 <ying.zhang22455@nxp.com>
---
 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

^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [PATCH 7/9] arm64: dts: ls1043a: Add the identify of the platform to support to set rcpm bit
@ 2018-05-11  3:35   ` Yinbo Zhu
  0 siblings, 0 replies; 35+ messages in thread
From: Yinbo Zhu @ 2018-05-11  3:35 UTC (permalink / raw)
  To: linux-arm-kernel

From: Zhang Ying-22455 <ying.zhang22455@nxp.com>

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

Signed-off-by: Zhang Ying-22455 <ying.zhang22455@nxp.com>
---
 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 at 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

^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [PATCH 8/9] arm64: dts: ls1046a: Add the identify of the platform to support to set rcpm bit
  2018-05-11  3:35 ` Yinbo Zhu
  (?)
@ 2018-05-11  3:35   ` Yinbo Zhu
  -1 siblings, 0 replies; 35+ messages in thread
From: Yinbo Zhu @ 2018-05-11  3:35 UTC (permalink / raw)
  To: yinbo.zhu, Rob Herring, Mark Rutland, Catalin Marinas ),
	Will Deacon ), Lorenzo Pieralisi ),
	Li Yang
  Cc: xiaobo.xie, ran.wang_1, Daniel Lezcano, Thomas Gleixner,
	Shawn Guo, Madalin Bucur, Hou Zhiqiang, Changming Huang,
	Minghuan Lian, Zhao Qiang, Fabio Estevam, jiaheng . fan, Po Liu,
	Nipun Gupta, Horia Geantă,
	Priyanka Jain, Sumit Garg, costi, Bogdan Purcareata, Meng Yi,
	Wang Dongsheng, open list:CLOCKSOURCE, CLOCKEVENT DRIVERS,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	linux-arm-kernel, open list:FREESCALE SOC DRIVERS, Tang Yuantian,
	ying.zhang22455

From: Zhang Ying-22455 <ying.zhang22455@nxp.com>

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

Signed-off-by: Zhang Ying-22455 <ying.zhang22455@nxp.com>
---
 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

^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [PATCH 8/9] arm64: dts: ls1046a: Add the identify of the platform to support to set rcpm bit
@ 2018-05-11  3:35   ` Yinbo Zhu
  0 siblings, 0 replies; 35+ messages in thread
From: Yinbo Zhu @ 2018-05-11  3:35 UTC (permalink / raw)
  To: yinbo.zhu, Rob Herring, Mark Rutland, Catalin Marinas ),
	Will Deacon ), Lorenzo Pieralisi ),
	Li Yang
  Cc: xiaobo.xie, ran.wang_1, Daniel Lezcano, Thomas Gleixner,
	Shawn Guo, Madalin Bucur, Hou Zhiqiang, Changming Huang,
	Minghuan Lian, Zhao Qiang, Fabio Estevam, jiaheng . fan, Po Liu,
	Nipun Gupta, Horia Geantă,
	Priyanka Jain, Sumit Garg, costi, Bogdan Purcareata, Meng Yi

From: Zhang Ying-22455 <ying.zhang22455@nxp.com>

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

Signed-off-by: Zhang Ying-22455 <ying.zhang22455@nxp.com>
---
 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

^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [PATCH 8/9] arm64: dts: ls1046a: Add the identify of the platform to support to set rcpm bit
@ 2018-05-11  3:35   ` Yinbo Zhu
  0 siblings, 0 replies; 35+ messages in thread
From: Yinbo Zhu @ 2018-05-11  3:35 UTC (permalink / raw)
  To: linux-arm-kernel

From: Zhang Ying-22455 <ying.zhang22455@nxp.com>

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

Signed-off-by: Zhang Ying-22455 <ying.zhang22455@nxp.com>
---
 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 at 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

^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [PATCH 9/9] armv8: add psci 0.2 stardard support
  2018-05-11  3:35 ` Yinbo Zhu
  (?)
@ 2018-05-11  3:35   ` Yinbo Zhu
  -1 siblings, 0 replies; 35+ messages in thread
From: Yinbo Zhu @ 2018-05-11  3:35 UTC (permalink / raw)
  To: yinbo.zhu, Rob Herring, Mark Rutland, Catalin Marinas ),
	Will Deacon ), Lorenzo Pieralisi ),
	Li Yang
  Cc: xiaobo.xie, ran.wang_1, Daniel Lezcano, Thomas Gleixner,
	Shawn Guo, Madalin Bucur, Hou Zhiqiang, Changming Huang,
	Minghuan Lian, Zhao Qiang, Fabio Estevam, jiaheng . fan, Po Liu,
	Nipun Gupta, Horia Geantă,
	Priyanka Jain, Sumit Garg, costi, Bogdan Purcareata, Meng Yi,
	Wang Dongsheng, open list:CLOCKSOURCE, CLOCKEVENT DRIVERS,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	linux-arm-kernel, open list:FREESCALE SOC DRIVERS, Tang Yuantian,
	ying.zhang22455, Yuantian Tang

From: Yuantian Tang <andy.tang@nxp.com>

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 <andy.tang@nxp.com>
---
 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

^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [PATCH 9/9] armv8: add psci 0.2 stardard support
@ 2018-05-11  3:35   ` Yinbo Zhu
  0 siblings, 0 replies; 35+ messages in thread
From: Yinbo Zhu @ 2018-05-11  3:35 UTC (permalink / raw)
  To: yinbo.zhu, Rob Herring, Mark Rutland, Catalin Marinas ),
	Will Deacon ), Lorenzo Pieralisi ),
	Li Yang
  Cc: xiaobo.xie, ran.wang_1, Daniel Lezcano, Thomas Gleixner,
	Shawn Guo, Madalin Bucur, Hou Zhiqiang, Changming Huang,
	Minghuan Lian, Zhao Qiang, Fabio Estevam, jiaheng . fan, Po Liu,
	Nipun Gupta, Horia Geantă,
	Priyanka Jain, Sumit Garg, costi, Bogdan Purcareata, Meng Yi

From: Yuantian Tang <andy.tang@nxp.com>

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 <andy.tang@nxp.com>
---
 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

^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [PATCH 9/9] armv8: add psci 0.2 stardard support
@ 2018-05-11  3:35   ` Yinbo Zhu
  0 siblings, 0 replies; 35+ messages in thread
From: Yinbo Zhu @ 2018-05-11  3:35 UTC (permalink / raw)
  To: linux-arm-kernel

From: Yuantian Tang <andy.tang@nxp.com>

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 <andy.tang@nxp.com>
---
 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

^ permalink raw reply related	[flat|nested] 35+ messages in thread

* RE: [PATCH 3/9] soc: fsl: set rcpm bit for FTM
  2018-05-11  3:35   ` Yinbo Zhu
  (?)
  (?)
@ 2018-05-11 17:00     ` Leo Li
  -1 siblings, 0 replies; 35+ messages in thread
From: Leo Li @ 2018-05-11 17:00 UTC (permalink / raw)
  To: Yinbo Zhu, Yinbo Zhu, Rob Herring, Mark Rutland,
	Catalin Marinas ), Will Deacon ), Lorenzo Pieralisi )
  Cc: Xiaobo Xie, Ran Wang, Daniel Lezcano, Thomas Gleixner, Shawn Guo,
	Madalin-cristian Bucur, Z.q. Hou, Jerry Huang, M.h. Lian,
	Qiang Zhao, Fabio Estevam, Jiaheng Fan, Po Liu, Nipun Gupta,
	Horia Geantă,
	Priyanka Jain, Sumit Garg, costi, Bogdan Purcareata,
	open list:CLOCKSOURCE, CLOCKEVENT DRIVERS,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	linux-arm-kernel, open list:FREESCALE SOC DRIVERS, Andy Tang,
	Ying Zhang



> -----Original Message-----
> From: Yinbo Zhu [mailto:yinbo.zhu@nxp.com]
> Sent: Thursday, May 10, 2018 10:35 PM
> To: Yinbo Zhu <yinbo.zhu@nxp.com>; Rob Herring <robh+dt@kernel.org>;
> Mark Rutland <mark.rutland@arm.com>; Catalin Marinas )
> <catalin.marinas@arm.com>; Will Deacon ) <will.deacon@arm.com>;
> Lorenzo Pieralisi ) <lorenzo.pieralisi@arm.com>; Leo Li <leoyang.li@nxp.com>
> Cc: Xiaobo Xie <xiaobo.xie@nxp.com>; Ran Wang <ran.wang_1@nxp.com>;
> Daniel Lezcano <daniel.lezcano@linaro.org>; Thomas Gleixner
> <tglx@linutronix.de>; Shawn Guo <shawnguo@kernel.org>; Madalin-cristian
> Bucur <madalin.bucur@nxp.com>; Z.q. Hou <zhiqiang.hou@nxp.com>; Jerry
> Huang <jerry.huang@nxp.com>; M.h. Lian <minghuan.lian@nxp.com>;
> Qiang Zhao <qiang.zhao@nxp.com>; Fabio Estevam
> <fabio.estevam@nxp.com>; Jiaheng Fan <jiaheng.fan@nxp.com>; Po Liu
> <po.liu@nxp.com>; Nipun Gupta <nipun.gupta@nxp.com>; Horia Geantă
> <horia.geanta@nxp.com>; Priyanka Jain <priyanka.jain@nxp.com>; Sumit
> Garg <sumit.garg@nxp.com>; costi <constantin.tudor@freescale.com>;
> Bogdan Purcareata <bogdan.purcareata@nxp.com>; Meng Yi
> <meng.yi@nxp.com>; Wang Dongsheng <dongsheng.wang@nxp.com>; open
> list:CLOCKSOURCE, CLOCKEVENT DRIVERS <linux-kernel@vger.kernel.org>;
> open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS
> <devicetree@vger.kernel.org>; linux-arm-kernel@lists.infradead.org; open
> list:FREESCALE SOC DRIVERS <linuxppc-dev@lists.ozlabs.org>; Andy Tang
> <andy.tang@nxp.com>; Ying Zhang <ying.zhang22455@nxp.com>
> Subject: [PATCH 3/9] soc: fsl: set rcpm bit for FTM
> 
> From: Zhang Ying-22455 <ying.zhang22455@nxp.com>
> 
> 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 <ying.zhang22455@nxp.com>
> Signed-off-by: Yinbo Zhu <yinbo.zhu@nxp.com>
> ---
>  .../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

^ permalink raw reply	[flat|nested] 35+ messages in thread

* RE: [PATCH 3/9] soc: fsl: set rcpm bit for FTM
@ 2018-05-11 17:00     ` Leo Li
  0 siblings, 0 replies; 35+ messages in thread
From: Leo Li @ 2018-05-11 17:00 UTC (permalink / raw)
  To: Yinbo Zhu
  Cc: Xiaobo Xie, Ran Wang, Daniel Lezcano, Thomas Gleixner, Shawn Guo,
	Madalin-cristian Bucur, Z.q. Hou, Jerry Huang, M.h. Lian,
	Qiang Zhao, Fabio Estevam, Jiaheng Fan, Po Liu, Nipun Gupta,
	Horia Geantă,
	Priyanka Jain, Sumit Garg, costi, Bogdan Purcareata



> -----Original Message-----
> From: Yinbo Zhu [mailto:yinbo.zhu@nxp.com]
> Sent: Thursday, May 10, 2018 10:35 PM
> To: Yinbo Zhu <yinbo.zhu@nxp.com>; Rob Herring <robh+dt@kernel.org>;
> Mark Rutland <mark.rutland@arm.com>; Catalin Marinas )
> <catalin.marinas@arm.com>; Will Deacon ) <will.deacon@arm.com>;
> Lorenzo Pieralisi ) <lorenzo.pieralisi@arm.com>; Leo Li <leoyang.li@nxp.com>
> Cc: Xiaobo Xie <xiaobo.xie@nxp.com>; Ran Wang <ran.wang_1@nxp.com>;
> Daniel Lezcano <daniel.lezcano@linaro.org>; Thomas Gleixner
> <tglx@linutronix.de>; Shawn Guo <shawnguo@kernel.org>; Madalin-cristian
> Bucur <madalin.bucur@nxp.com>; Z.q. Hou <zhiqiang.hou@nxp.com>; Jerry
> Huang <jerry.huang@nxp.com>; M.h. Lian <minghuan.lian@nxp.com>;
> Qiang Zhao <qiang.zhao@nxp.com>; Fabio Estevam
> <fabio.estevam@nxp.com>; Jiaheng Fan <jiaheng.fan@nxp.com>; Po Liu
> <po.liu@nxp.com>; Nipun Gupta <nipun.gupta@nxp.com>; Horia Geantă
> <horia.geanta@nxp.com>; Priyanka Jain <priyanka.jain@nxp.com>; Sumit
> Garg <sumit.garg@nxp.com>; costi <constantin.tudor@freescale.com>;
> Bogdan Purcareata <bogdan.purcareata@nxp.com>; Meng Yi
> <meng.yi@nxp.com>; Wang Dongsheng <dongsheng.wang@nxp.com>; open
> list:CLOCKSOURCE, CLOCKEVENT DRIVERS <linux-kernel@vger.kernel.org>;
> open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS
> <devicetree@vger.kernel.org>; linux-arm-kernel@lists.infradead.org; open
> list:FREESCALE SOC DRIVERS <linuxppc-dev@lists.ozlabs.org>; Andy Tang
> <andy.tang@nxp.com>; Ying Zhang <ying.zhang22455@nxp.com>
> Subject: [PATCH 3/9] soc: fsl: set rcpm bit for FTM
> 
> From: Zhang Ying-22455 <ying.zhang22455@nxp.com>
> 
> 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 <ying.zhang22455@nxp.com>
> Signed-off-by: Yinbo Zhu <yinbo.zhu@nxp.com>
> ---
>  .../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

^ permalink raw reply	[flat|nested] 35+ messages in thread

* RE: [PATCH 3/9] soc: fsl: set rcpm bit for FTM
@ 2018-05-11 17:00     ` Leo Li
  0 siblings, 0 replies; 35+ messages in thread
From: Leo Li @ 2018-05-11 17:00 UTC (permalink / raw)
  To: Yinbo Zhu, Yinbo Zhu, Rob Herring, Mark Rutland,
	Catalin Marinas ), Will Deacon ), Lorenzo Pieralisi )
  Cc: Xiaobo Xie, Ran Wang, Daniel Lezcano, Thomas Gleixner, Shawn Guo,
	Madalin-cristian Bucur, Z.q. Hou, Jerry Huang, M.h. Lian,
	Qiang Zhao, Fabio Estevam, Jiaheng Fan, Po Liu, Nipun Gupta,
	Horia Geantă,
	Priyanka Jain, Sumit Garg, costi, Bogdan Purcareata,
	open list:CLOCKSOURCE, CLOCKEVENT DRIVERS,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	linux-arm-kernel, open list:FREESCALE SOC DRIVERS, Andy Tang,
	Ying Zhang



> -----Original Message-----
> From: Yinbo Zhu [mailto:yinbo.zhu@nxp.com]
> Sent: Thursday, May 10, 2018 10:35 PM
> To: Yinbo Zhu <yinbo.zhu@nxp.com>; Rob Herring <robh+dt@kernel.org>;
> Mark Rutland <mark.rutland@arm.com>; Catalin Marinas )
> <catalin.marinas@arm.com>; Will Deacon ) <will.deacon@arm.com>;
> Lorenzo Pieralisi ) <lorenzo.pieralisi@arm.com>; Leo Li <leoyang.li@nxp.c=
om>
> Cc: Xiaobo Xie <xiaobo.xie@nxp.com>; Ran Wang <ran.wang_1@nxp.com>;
> Daniel Lezcano <daniel.lezcano@linaro.org>; Thomas Gleixner
> <tglx@linutronix.de>; Shawn Guo <shawnguo@kernel.org>; Madalin-cristian
> Bucur <madalin.bucur@nxp.com>; Z.q. Hou <zhiqiang.hou@nxp.com>; Jerry
> Huang <jerry.huang@nxp.com>; M.h. Lian <minghuan.lian@nxp.com>;
> Qiang Zhao <qiang.zhao@nxp.com>; Fabio Estevam
> <fabio.estevam@nxp.com>; Jiaheng Fan <jiaheng.fan@nxp.com>; Po Liu
> <po.liu@nxp.com>; Nipun Gupta <nipun.gupta@nxp.com>; Horia Geant=E3
> <horia.geanta@nxp.com>; Priyanka Jain <priyanka.jain@nxp.com>; Sumit
> Garg <sumit.garg@nxp.com>; costi <constantin.tudor@freescale.com>;
> Bogdan Purcareata <bogdan.purcareata@nxp.com>; Meng Yi
> <meng.yi@nxp.com>; Wang Dongsheng <dongsheng.wang@nxp.com>; open
> list:CLOCKSOURCE, CLOCKEVENT DRIVERS <linux-kernel@vger.kernel.org>;
> open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS
> <devicetree@vger.kernel.org>; linux-arm-kernel@lists.infradead.org; open
> list:FREESCALE SOC DRIVERS <linuxppc-dev@lists.ozlabs.org>; Andy Tang
> <andy.tang@nxp.com>; Ying Zhang <ying.zhang22455@nxp.com>
> Subject: [PATCH 3/9] soc: fsl: set rcpm bit for FTM
>=20
> From: Zhang Ying-22455 <ying.zhang22455@nxp.com>
>=20
> 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.
>=20
> Signed-off-by: Zhang Ying-22455 <ying.zhang22455@nxp.com>
> Signed-off-by: Yinbo Zhu <yinbo.zhu@nxp.com>
> ---
>  .../devicetree/bindings/timer/fsl,ftm-timer.txt    |    7 ++
>  drivers/soc/fsl/layerscape/ftm_alarm.c             |   92 ++++++++++++++=
++++-
>  2 files changed, 94 insertions(+), 5 deletions(-)
>=20
> 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:
>=20
>  - 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 fo=
r 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 s=
et 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 r=
eview.

Regards,
Leo

^ permalink raw reply	[flat|nested] 35+ messages in thread

* [PATCH 3/9] soc: fsl: set rcpm bit for FTM
@ 2018-05-11 17:00     ` Leo Li
  0 siblings, 0 replies; 35+ messages in thread
From: Leo Li @ 2018-05-11 17:00 UTC (permalink / raw)
  To: linux-arm-kernel



> -----Original Message-----
> From: Yinbo Zhu [mailto:yinbo.zhu at nxp.com]
> Sent: Thursday, May 10, 2018 10:35 PM
> To: Yinbo Zhu <yinbo.zhu@nxp.com>; Rob Herring <robh+dt@kernel.org>;
> Mark Rutland <mark.rutland@arm.com>; Catalin Marinas )
> <catalin.marinas@arm.com>; Will Deacon ) <will.deacon@arm.com>;
> Lorenzo Pieralisi ) <lorenzo.pieralisi@arm.com>; Leo Li <leoyang.li@nxp.com>
> Cc: Xiaobo Xie <xiaobo.xie@nxp.com>; Ran Wang <ran.wang_1@nxp.com>;
> Daniel Lezcano <daniel.lezcano@linaro.org>; Thomas Gleixner
> <tglx@linutronix.de>; Shawn Guo <shawnguo@kernel.org>; Madalin-cristian
> Bucur <madalin.bucur@nxp.com>; Z.q. Hou <zhiqiang.hou@nxp.com>; Jerry
> Huang <jerry.huang@nxp.com>; M.h. Lian <minghuan.lian@nxp.com>;
> Qiang Zhao <qiang.zhao@nxp.com>; Fabio Estevam
> <fabio.estevam@nxp.com>; Jiaheng Fan <jiaheng.fan@nxp.com>; Po Liu
> <po.liu@nxp.com>; Nipun Gupta <nipun.gupta@nxp.com>; Horia Geant?
> <horia.geanta@nxp.com>; Priyanka Jain <priyanka.jain@nxp.com>; Sumit
> Garg <sumit.garg@nxp.com>; costi <constantin.tudor@freescale.com>;
> Bogdan Purcareata <bogdan.purcareata@nxp.com>; Meng Yi
> <meng.yi@nxp.com>; Wang Dongsheng <dongsheng.wang@nxp.com>; open
> list:CLOCKSOURCE, CLOCKEVENT DRIVERS <linux-kernel@vger.kernel.org>;
> open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS
> <devicetree@vger.kernel.org>; linux-arm-kernel at lists.infradead.org; open
> list:FREESCALE SOC DRIVERS <linuxppc-dev@lists.ozlabs.org>; Andy Tang
> <andy.tang@nxp.com>; Ying Zhang <ying.zhang22455@nxp.com>
> Subject: [PATCH 3/9] soc: fsl: set rcpm bit for FTM
> 
> From: Zhang Ying-22455 <ying.zhang22455@nxp.com>
> 
> 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 <ying.zhang22455@nxp.com>
> Signed-off-by: Yinbo Zhu <yinbo.zhu@nxp.com>
> ---
>  .../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

^ permalink raw reply	[flat|nested] 35+ messages in thread

* RE: [PATCH 3/9] soc: fsl: set rcpm bit for FTM
  2018-05-11 17:00     ` Leo Li
  (?)
  (?)
@ 2018-05-14  7:47       ` Yinbo Zhu
  -1 siblings, 0 replies; 35+ messages in thread
From: Yinbo Zhu @ 2018-05-14  7:47 UTC (permalink / raw)
  To: Leo Li, Rob Herring, Mark Rutland, Catalin Marinas ),
	Will Deacon ), Lorenzo Pieralisi )
  Cc: Xiaobo Xie, Ran Wang, Daniel Lezcano, Thomas Gleixner, Shawn Guo,
	Madalin-cristian Bucur, Z.q. Hou, Jerry Huang, M.h. Lian,
	Qiang Zhao, Fabio Estevam, Jiaheng Fan, Po Liu, Nipun Gupta,
	Horia Geantă,
	Priyanka Jain, Sumit Garg, costi, Bogdan Purcareata,
	open list:CLOCKSOURCE, CLOCKEVENT DRIVERS,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	linux-arm-kernel, open list:FREESCALE SOC DRIVERS, Andy Tang,
	Ying Zhang



-----Original Message-----
From: Leo Li 
Sent: 2018年5月12日 1:00
To: Yinbo Zhu <yinbo.zhu@nxp.com>; Yinbo Zhu <yinbo.zhu@nxp.com>; Rob Herring <robh+dt@kernel.org>; Mark Rutland <mark.rutland@arm.com>; Catalin Marinas ) <catalin.marinas@arm.com>; Will Deacon ) <will.deacon@arm.com>; Lorenzo Pieralisi ) <lorenzo.pieralisi@arm.com>
Cc: Xiaobo Xie <xiaobo.xie@nxp.com>; Ran Wang <ran.wang_1@nxp.com>; Daniel Lezcano <daniel.lezcano@linaro.org>; Thomas Gleixner <tglx@linutronix.de>; Shawn Guo <shawnguo@kernel.org>; Madalin-cristian Bucur <madalin.bucur@nxp.com>; Z.q. Hou <zhiqiang.hou@nxp.com>; Jerry Huang <jerry.huang@nxp.com>; M.h. Lian <minghuan.lian@nxp.com>; Qiang Zhao <qiang.zhao@nxp.com>; Fabio Estevam <fabio.estevam@nxp.com>; Jiaheng Fan <jiaheng.fan@nxp.com>; Po Liu <po.liu@nxp.com>; Nipun Gupta <nipun.gupta@nxp.com>; Horia Geantă <horia.geanta@nxp.com>; Priyanka Jain <priyanka.jain@nxp.com>; Sumit Garg <sumit.garg@nxp.com>; costi <constantin.tudor@freescale.com>; Bogdan Purcareata <bogdan.purcareata@nxp.com>; open list:CLOCKSOURCE, CLOCKEVENT DRIVERS <linux-kernel@vger.kernel.org>; open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS <devicetree@vger.kernel.org>; linux-arm-kernel@lists.infradead.org; open list:FREESCALE SOC DRIVERS <linuxppc-dev@lists.ozlabs.org>; Andy Tang <andy.tang@nxp.com>; Ying Zhang <ying.zhang22455@nxp.com>
Subject: RE: [PATCH 3/9] soc: fsl: set rcpm bit for FTM



> -----Original Message-----
> From: Yinbo Zhu [mailto:yinbo.zhu@nxp.com]
> Sent: Thursday, May 10, 2018 10:35 PM
> To: Yinbo Zhu <yinbo.zhu@nxp.com>; Rob Herring <robh+dt@kernel.org>; 
> Mark Rutland <mark.rutland@arm.com>; Catalin Marinas ) 
> <catalin.marinas@arm.com>; Will Deacon ) <will.deacon@arm.com>; 
> Lorenzo Pieralisi ) <lorenzo.pieralisi@arm.com>; Leo Li 
> <leoyang.li@nxp.com>
> Cc: Xiaobo Xie <xiaobo.xie@nxp.com>; Ran Wang <ran.wang_1@nxp.com>; 
> Daniel Lezcano <daniel.lezcano@linaro.org>; Thomas Gleixner 
> <tglx@linutronix.de>; Shawn Guo <shawnguo@kernel.org>; 
> Madalin-cristian Bucur <madalin.bucur@nxp.com>; Z.q. Hou 
> <zhiqiang.hou@nxp.com>; Jerry Huang <jerry.huang@nxp.com>; M.h. Lian 
> <minghuan.lian@nxp.com>; Qiang Zhao <qiang.zhao@nxp.com>; Fabio 
> Estevam <fabio.estevam@nxp.com>; Jiaheng Fan <jiaheng.fan@nxp.com>; Po 
> Liu <po.liu@nxp.com>; Nipun Gupta <nipun.gupta@nxp.com>; Horia Geantă 
> <horia.geanta@nxp.com>; Priyanka Jain <priyanka.jain@nxp.com>; Sumit 
> Garg <sumit.garg@nxp.com>; costi <constantin.tudor@freescale.com>; 
> Bogdan Purcareata <bogdan.purcareata@nxp.com>; Meng Yi 
> <meng.yi@nxp.com>; Wang Dongsheng <dongsheng.wang@nxp.com>; open 
> list:CLOCKSOURCE, CLOCKEVENT DRIVERS <linux-kernel@vger.kernel.org>; 
> open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS 
> <devicetree@vger.kernel.org>; linux-arm-kernel@lists.infradead.org; 
> open list:FREESCALE SOC DRIVERS <linuxppc-dev@lists.ozlabs.org>; Andy 
> Tang <andy.tang@nxp.com>; Ying Zhang <ying.zhang22455@nxp.com>
> Subject: [PATCH 3/9] soc: fsl: set rcpm bit for FTM
> 
> From: Zhang Ying-22455 <ying.zhang22455@nxp.com>
> 
> 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 <ying.zhang22455@nxp.com>
> Signed-off-by: Yinbo Zhu <yinbo.zhu@nxp.com>
> ---
>  .../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.

^ permalink raw reply	[flat|nested] 35+ messages in thread

* RE: [PATCH 3/9] soc: fsl: set rcpm bit for FTM
@ 2018-05-14  7:47       ` Yinbo Zhu
  0 siblings, 0 replies; 35+ messages in thread
From: Yinbo Zhu @ 2018-05-14  7:47 UTC (permalink / raw)
  To: Leo Li, Rob Herring, Mark Rutland, Catalin Marinas ),
	Will Deacon ), Lorenzo Pieralisi )
  Cc: Xiaobo Xie, Ran Wang, Daniel Lezcano, Thomas Gleixner, Shawn Guo,
	Madalin-cristian Bucur, Z.q. Hou, Jerry Huang, M.h. Lian,
	Qiang Zhao, Fabio Estevam, Jiaheng Fan, Po Liu, Nipun Gupta,
	Horia Geantă,
	Priyanka Jain, Sumit Garg, costi, Bogdan Purcareata



-----Original Message-----
From: Leo Li 
Sent: 2018年5月12日 1:00
To: Yinbo Zhu <yinbo.zhu@nxp.com>; Yinbo Zhu <yinbo.zhu@nxp.com>; Rob Herring <robh+dt@kernel.org>; Mark Rutland <mark.rutland@arm.com>; Catalin Marinas ) <catalin.marinas@arm.com>; Will Deacon ) <will.deacon@arm.com>; Lorenzo Pieralisi ) <lorenzo.pieralisi@arm.com>
Cc: Xiaobo Xie <xiaobo.xie@nxp.com>; Ran Wang <ran.wang_1@nxp.com>; Daniel Lezcano <daniel.lezcano@linaro.org>; Thomas Gleixner <tglx@linutronix.de>; Shawn Guo <shawnguo@kernel.org>; Madalin-cristian Bucur <madalin.bucur@nxp.com>; Z.q. Hou <zhiqiang.hou@nxp.com>; Jerry Huang <jerry.huang@nxp.com>; M.h. Lian <minghuan.lian@nxp.com>; Qiang Zhao <qiang.zhao@nxp.com>; Fabio Estevam <fabio.estevam@nxp.com>; Jiaheng Fan <jiaheng.fan@nxp.com>; Po Liu <po.liu@nxp.com>; Nipun Gupta <nipun.gupta@nxp.com>; Horia Geantă <horia.geanta@nxp.com>; Priyanka Jain <priyanka.jain@nxp.com>; Sumit Garg <sumit.garg@nxp.com>; costi <constantin.tudor@freescale.com>; Bogdan Purcareata <bogdan.purcareata@nxp.com>; open list:CLOCKSOURCE, CLOCKEVENT DRIVERS <linux-kernel@vger.kernel.org>; open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS <devicetree@vger.kernel.org>; linux-arm-kernel@lists.infradead.org; open list:FREESCALE SOC DRIVERS <linuxppc-dev@lists.ozlabs.org>; Andy Tang <andy.tang@nxp.com>; Ying Zhang <ying.zhang22455@nxp.com>
Subject: RE: [PATCH 3/9] soc: fsl: set rcpm bit for FTM



> -----Original Message-----
> From: Yinbo Zhu [mailto:yinbo.zhu@nxp.com]
> Sent: Thursday, May 10, 2018 10:35 PM
> To: Yinbo Zhu <yinbo.zhu@nxp.com>; Rob Herring <robh+dt@kernel.org>; 
> Mark Rutland <mark.rutland@arm.com>; Catalin Marinas ) 
> <catalin.marinas@arm.com>; Will Deacon ) <will.deacon@arm.com>; 
> Lorenzo Pieralisi ) <lorenzo.pieralisi@arm.com>; Leo Li 
> <leoyang.li@nxp.com>
> Cc: Xiaobo Xie <xiaobo.xie@nxp.com>; Ran Wang <ran.wang_1@nxp.com>; 
> Daniel Lezcano <daniel.lezcano@linaro.org>; Thomas Gleixner 
> <tglx@linutronix.de>; Shawn Guo <shawnguo@kernel.org>; 
> Madalin-cristian Bucur <madalin.bucur@nxp.com>; Z.q. Hou 
> <zhiqiang.hou@nxp.com>; Jerry Huang <jerry.huang@nxp.com>; M.h. Lian 
> <minghuan.lian@nxp.com>; Qiang Zhao <qiang.zhao@nxp.com>; Fabio 
> Estevam <fabio.estevam@nxp.com>; Jiaheng Fan <jiaheng.fan@nxp.com>; Po 
> Liu <po.liu@nxp.com>; Nipun Gupta <nipun.gupta@nxp.com>; Horia Geantă 
> <horia.geanta@nxp.com>; Priyanka Jain <priyanka.jain@nxp.com>; Sumit 
> Garg <sumit.garg@nxp.com>; costi <constantin.tudor@freescale.com>; 
> Bogdan Purcareata <bogdan.purcareata@nxp.com>; Meng Yi 
> <meng.yi@nxp.com>; Wang Dongsheng <dongsheng.wang@nxp.com>; open 
> list:CLOCKSOURCE, CLOCKEVENT DRIVERS <linux-kernel@vger.kernel.org>; 
> open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS 
> <devicetree@vger.kernel.org>; linux-arm-kernel@lists.infradead.org; 
> open list:FREESCALE SOC DRIVERS <linuxppc-dev@lists.ozlabs.org>; Andy 
> Tang <andy.tang@nxp.com>; Ying Zhang <ying.zhang22455@nxp.com>
> Subject: [PATCH 3/9] soc: fsl: set rcpm bit for FTM
> 
> From: Zhang Ying-22455 <ying.zhang22455@nxp.com>
> 
> 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 <ying.zhang22455@nxp.com>
> Signed-off-by: Yinbo Zhu <yinbo.zhu@nxp.com>
> ---
>  .../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.

^ permalink raw reply	[flat|nested] 35+ messages in thread

* RE: [PATCH 3/9] soc: fsl: set rcpm bit for FTM
@ 2018-05-14  7:47       ` Yinbo Zhu
  0 siblings, 0 replies; 35+ messages in thread
From: Yinbo Zhu @ 2018-05-14  7:47 UTC (permalink / raw)
  To: Leo Li, Rob Herring, Mark Rutland, Catalin Marinas ),
	Will Deacon ), Lorenzo Pieralisi )
  Cc: Xiaobo Xie, Ran Wang, Daniel Lezcano, Thomas Gleixner, Shawn Guo,
	Madalin-cristian Bucur, Z.q. Hou, Jerry Huang, M.h. Lian,
	Qiang Zhao, Fabio Estevam, Jiaheng Fan, Po Liu, Nipun Gupta,
	Horia Geantă,
	Priyanka Jain, Sumit Garg, costi, Bogdan Purcareata,
	open list:CLOCKSOURCE, CLOCKEVENT DRIVERS,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	linux-arm-kernel, open list:FREESCALE SOC DRIVERS, Andy Tang,
	Ying Zhang

DQoNCi0tLS0tT3JpZ2luYWwgTWVzc2FnZS0tLS0tDQpGcm9tOiBMZW8gTGkgDQpTZW50OiAyMDE4
5bm0NeaciDEy5pelIDE6MDANClRvOiBZaW5ibyBaaHUgPHlpbmJvLnpodUBueHAuY29tPjsgWWlu
Ym8gWmh1IDx5aW5iby56aHVAbnhwLmNvbT47IFJvYiBIZXJyaW5nIDxyb2JoK2R0QGtlcm5lbC5v
cmc+OyBNYXJrIFJ1dGxhbmQgPG1hcmsucnV0bGFuZEBhcm0uY29tPjsgQ2F0YWxpbiBNYXJpbmFz
ICkgPGNhdGFsaW4ubWFyaW5hc0Bhcm0uY29tPjsgV2lsbCBEZWFjb24gKSA8d2lsbC5kZWFjb25A
YXJtLmNvbT47IExvcmVuem8gUGllcmFsaXNpICkgPGxvcmVuem8ucGllcmFsaXNpQGFybS5jb20+
DQpDYzogWGlhb2JvIFhpZSA8eGlhb2JvLnhpZUBueHAuY29tPjsgUmFuIFdhbmcgPHJhbi53YW5n
XzFAbnhwLmNvbT47IERhbmllbCBMZXpjYW5vIDxkYW5pZWwubGV6Y2Fub0BsaW5hcm8ub3JnPjsg
VGhvbWFzIEdsZWl4bmVyIDx0Z2x4QGxpbnV0cm9uaXguZGU+OyBTaGF3biBHdW8gPHNoYXduZ3Vv
QGtlcm5lbC5vcmc+OyBNYWRhbGluLWNyaXN0aWFuIEJ1Y3VyIDxtYWRhbGluLmJ1Y3VyQG54cC5j
b20+OyBaLnEuIEhvdSA8emhpcWlhbmcuaG91QG54cC5jb20+OyBKZXJyeSBIdWFuZyA8amVycnku
aHVhbmdAbnhwLmNvbT47IE0uaC4gTGlhbiA8bWluZ2h1YW4ubGlhbkBueHAuY29tPjsgUWlhbmcg
WmhhbyA8cWlhbmcuemhhb0BueHAuY29tPjsgRmFiaW8gRXN0ZXZhbSA8ZmFiaW8uZXN0ZXZhbUBu
eHAuY29tPjsgSmlhaGVuZyBGYW4gPGppYWhlbmcuZmFuQG54cC5jb20+OyBQbyBMaXUgPHBvLmxp
dUBueHAuY29tPjsgTmlwdW4gR3VwdGEgPG5pcHVuLmd1cHRhQG54cC5jb20+OyBIb3JpYSBHZWFu
dMSDIDxob3JpYS5nZWFudGFAbnhwLmNvbT47IFByaXlhbmthIEphaW4gPHByaXlhbmthLmphaW5A
bnhwLmNvbT47IFN1bWl0IEdhcmcgPHN1bWl0LmdhcmdAbnhwLmNvbT47IGNvc3RpIDxjb25zdGFu
dGluLnR1ZG9yQGZyZWVzY2FsZS5jb20+OyBCb2dkYW4gUHVyY2FyZWF0YSA8Ym9nZGFuLnB1cmNh
cmVhdGFAbnhwLmNvbT47IG9wZW4gbGlzdDpDTE9DS1NPVVJDRSwgQ0xPQ0tFVkVOVCBEUklWRVJT
IDxsaW51eC1rZXJuZWxAdmdlci5rZXJuZWwub3JnPjsgb3BlbiBsaXN0Ok9QRU4gRklSTVdBUkUg
QU5EIEZMQVRURU5FRCBERVZJQ0UgVFJFRSBCSU5ESU5HUyA8ZGV2aWNldHJlZUB2Z2VyLmtlcm5l
bC5vcmc+OyBsaW51eC1hcm0ta2VybmVsQGxpc3RzLmluZnJhZGVhZC5vcmc7IG9wZW4gbGlzdDpG
UkVFU0NBTEUgU09DIERSSVZFUlMgPGxpbnV4cHBjLWRldkBsaXN0cy5vemxhYnMub3JnPjsgQW5k
eSBUYW5nIDxhbmR5LnRhbmdAbnhwLmNvbT47IFlpbmcgWmhhbmcgPHlpbmcuemhhbmcyMjQ1NUBu
eHAuY29tPg0KU3ViamVjdDogUkU6IFtQQVRDSCAzLzldIHNvYzogZnNsOiBzZXQgcmNwbSBiaXQg
Zm9yIEZUTQ0KDQoNCg0KPiAtLS0tLU9yaWdpbmFsIE1lc3NhZ2UtLS0tLQ0KPiBGcm9tOiBZaW5i
byBaaHUgW21haWx0bzp5aW5iby56aHVAbnhwLmNvbV0NCj4gU2VudDogVGh1cnNkYXksIE1heSAx
MCwgMjAxOCAxMDozNSBQTQ0KPiBUbzogWWluYm8gWmh1IDx5aW5iby56aHVAbnhwLmNvbT47IFJv
YiBIZXJyaW5nIDxyb2JoK2R0QGtlcm5lbC5vcmc+OyANCj4gTWFyayBSdXRsYW5kIDxtYXJrLnJ1
dGxhbmRAYXJtLmNvbT47IENhdGFsaW4gTWFyaW5hcyApIA0KPiA8Y2F0YWxpbi5tYXJpbmFzQGFy
bS5jb20+OyBXaWxsIERlYWNvbiApIDx3aWxsLmRlYWNvbkBhcm0uY29tPjsgDQo+IExvcmVuem8g
UGllcmFsaXNpICkgPGxvcmVuem8ucGllcmFsaXNpQGFybS5jb20+OyBMZW8gTGkgDQo+IDxsZW95
YW5nLmxpQG54cC5jb20+DQo+IENjOiBYaWFvYm8gWGllIDx4aWFvYm8ueGllQG54cC5jb20+OyBS
YW4gV2FuZyA8cmFuLndhbmdfMUBueHAuY29tPjsgDQo+IERhbmllbCBMZXpjYW5vIDxkYW5pZWwu
bGV6Y2Fub0BsaW5hcm8ub3JnPjsgVGhvbWFzIEdsZWl4bmVyIA0KPiA8dGdseEBsaW51dHJvbml4
LmRlPjsgU2hhd24gR3VvIDxzaGF3bmd1b0BrZXJuZWwub3JnPjsgDQo+IE1hZGFsaW4tY3Jpc3Rp
YW4gQnVjdXIgPG1hZGFsaW4uYnVjdXJAbnhwLmNvbT47IFoucS4gSG91IA0KPiA8emhpcWlhbmcu
aG91QG54cC5jb20+OyBKZXJyeSBIdWFuZyA8amVycnkuaHVhbmdAbnhwLmNvbT47IE0uaC4gTGlh
biANCj4gPG1pbmdodWFuLmxpYW5AbnhwLmNvbT47IFFpYW5nIFpoYW8gPHFpYW5nLnpoYW9Abnhw
LmNvbT47IEZhYmlvIA0KPiBFc3RldmFtIDxmYWJpby5lc3RldmFtQG54cC5jb20+OyBKaWFoZW5n
IEZhbiA8amlhaGVuZy5mYW5AbnhwLmNvbT47IFBvIA0KPiBMaXUgPHBvLmxpdUBueHAuY29tPjsg
TmlwdW4gR3VwdGEgPG5pcHVuLmd1cHRhQG54cC5jb20+OyBIb3JpYSBHZWFudMSDIA0KPiA8aG9y
aWEuZ2VhbnRhQG54cC5jb20+OyBQcml5YW5rYSBKYWluIDxwcml5YW5rYS5qYWluQG54cC5jb20+
OyBTdW1pdCANCj4gR2FyZyA8c3VtaXQuZ2FyZ0BueHAuY29tPjsgY29zdGkgPGNvbnN0YW50aW4u
dHVkb3JAZnJlZXNjYWxlLmNvbT47IA0KPiBCb2dkYW4gUHVyY2FyZWF0YSA8Ym9nZGFuLnB1cmNh
cmVhdGFAbnhwLmNvbT47IE1lbmcgWWkgDQo+IDxtZW5nLnlpQG54cC5jb20+OyBXYW5nIERvbmdz
aGVuZyA8ZG9uZ3NoZW5nLndhbmdAbnhwLmNvbT47IG9wZW4gDQo+IGxpc3Q6Q0xPQ0tTT1VSQ0Us
IENMT0NLRVZFTlQgRFJJVkVSUyA8bGludXgta2VybmVsQHZnZXIua2VybmVsLm9yZz47IA0KPiBv
cGVuIGxpc3Q6T1BFTiBGSVJNV0FSRSBBTkQgRkxBVFRFTkVEIERFVklDRSBUUkVFIEJJTkRJTkdT
IA0KPiA8ZGV2aWNldHJlZUB2Z2VyLmtlcm5lbC5vcmc+OyBsaW51eC1hcm0ta2VybmVsQGxpc3Rz
LmluZnJhZGVhZC5vcmc7IA0KPiBvcGVuIGxpc3Q6RlJFRVNDQUxFIFNPQyBEUklWRVJTIDxsaW51
eHBwYy1kZXZAbGlzdHMub3psYWJzLm9yZz47IEFuZHkgDQo+IFRhbmcgPGFuZHkudGFuZ0BueHAu
Y29tPjsgWWluZyBaaGFuZyA8eWluZy56aGFuZzIyNDU1QG54cC5jb20+DQo+IFN1YmplY3Q6IFtQ
QVRDSCAzLzldIHNvYzogZnNsOiBzZXQgcmNwbSBiaXQgZm9yIEZUTQ0KPiANCj4gRnJvbTogWmhh
bmcgWWluZy0yMjQ1NSA8eWluZy56aGFuZzIyNDU1QG54cC5jb20+DQo+IA0KPiBTZXQgUkNQTSBm
b3IgRlRNIHdoZW4gdXNpbmcgRlRNIGFzIHdha2V1cCBzb3VyY2UuIEJlY2F1c2UgdGhlIFJDUE0g
DQo+IG1vZHVsZSBvZiBlYWNoIHBsYXRmb3JtIGhhcyBkaWZmZXJlbnQgYmlnLWVuZCBhbmQgbGl0
dGxlLWVuZCBtb2RlLCANCj4gdGhlcmUgbmVlZCB0byBzZXQgUkNQTSBkZXBlbmRpbmcgb24gdGhl
IHBsYXRmb3JtLg0KPiANCj4gU2lnbmVkLW9mZi1ieTogWmhhbmcgWWluZy0yMjQ1NSA8eWluZy56
aGFuZzIyNDU1QG54cC5jb20+DQo+IFNpZ25lZC1vZmYtYnk6IFlpbmJvIFpodSA8eWluYm8uemh1
QG54cC5jb20+DQo+IC0tLQ0KPiAgLi4uL2RldmljZXRyZWUvYmluZGluZ3MvdGltZXIvZnNsLGZ0
bS10aW1lci50eHQgICAgfCAgICA3ICsrDQo+ICBkcml2ZXJzL3NvYy9mc2wvbGF5ZXJzY2FwZS9m
dG1fYWxhcm0uYyAgICAgICAgICAgICB8ICAgOTIgKysrKysrKysrKysrKysrKysrLQ0KPiAgMiBm
aWxlcyBjaGFuZ2VkLCA5NCBpbnNlcnRpb25zKCspLCA1IGRlbGV0aW9ucygtKQ0KPiANCj4gZGlm
ZiAtLWdpdCBhL0RvY3VtZW50YXRpb24vZGV2aWNldHJlZS9iaW5kaW5ncy90aW1lci9mc2wsZnRt
LXRpbWVyLnR4dA0KPiBiL0RvY3VtZW50YXRpb24vZGV2aWNldHJlZS9iaW5kaW5ncy90aW1lci9m
c2wsZnRtLXRpbWVyLnR4dA0KPiBpbmRleCBhYThjNDAyLi4xNWVhZDU4IDEwMDY0NA0KPiAtLS0g
YS9Eb2N1bWVudGF0aW9uL2RldmljZXRyZWUvYmluZGluZ3MvdGltZXIvZnNsLGZ0bS10aW1lci50
eHQNCj4gKysrIGIvRG9jdW1lbnRhdGlvbi9kZXZpY2V0cmVlL2JpbmRpbmdzL3RpbWVyL2ZzbCxm
dG0tdGltZXIudHh0DQo+IEBAIC0zLDYgKzMsMTMgQEAgRnJlZXNjYWxlIEZsZXhUaW1lciBNb2R1
bGUgKEZUTSkgVGltZXIgIFJlcXVpcmVkDQo+IHByb3BlcnRpZXM6DQo+IA0KPiAgLSBjb21wYXRp
YmxlIDogc2hvdWxkIGJlICJmc2wsZnRtLXRpbWVyIg0KDQo+SGkgWWluZ2JvLA0KDQo+VGhpcyBp
cyBhIGNoYW5nZSB0aGF0IGJyZWFrcyBiYWNrd2FyZCBjb21wYXRpYmlsaXR5IGFuZCBub3QgYWNj
ZXB0YWJsZS4NCkhpIGxlbywNCg0KVGhpcyBwYXRjaCBpZiBJIGtlZXAgdGhlIGNoYW5nZSBhcyBp
bm5lciBwYXRjaCBhbmQgcHVzaCBpdCB0byBkYXNoLWxpbm51eCBidXQgSSB3aWxsIG5vdCBwdXNo
IGl0IHRvIHVwc3RyZWFtLCBJdCdzIG9rYXk/DQpBcyBmYXIgYXMgSSBrbm93LCB0aGVyZSB3YXMg
YSBvdGhlciBwYXRjaCBhbmQgZmlsZSBmb3IgcmVwbGFjZSB0aGUgZmlsZSBhbmQgdGhhdCB0aGUg
cGF0Y2ggaXMgYWxyZWFkeSBvbiB0aGUgdXBzdHJlYW0gDQpodHRwczovL3BhdGNod29yay5rZXJu
ZWwub3JnL3BhdGNoLzkzOTEyOTMvDQoNCj4gKyBQb3NzaWJsZSBjb21wYXRpYmxlcyBmb3IgQVJN
Og0KPiArICAgICAiZnNsLGxzMTAxMmEtZnRtIg0KPiArICAgICAiZnNsLGxzMTAyMWEtZnRtIg0K
PiArICAgICAiZnNsLGxzMTA0M2EtZnRtIg0KPiArICAgICAiZnNsLGxzMTA0NmEtZnRtIg0KPiAr
ICAgICAiZnNsLGxzMTA4OGEtZnRtIg0KPiArICAgICAiZnNsLGxzMjA4eGEtZnRtIg0KPiAgLSBy
ZWcgOiBTcGVjaWZpZXMgYmFzZSBwaHlzaWNhbCBhZGRyZXNzIGFuZCBzaXplIG9mIHRoZSByZWdp
c3RlciBzZXRzIGZvciB0aGUNCj4gICAgY2xvY2sgZXZlbnQgZGV2aWNlIGFuZCBjbG9jayBzb3Vy
Y2UgZGV2aWNlLg0KPiAgLSBpbnRlcnJ1cHRzIDogU2hvdWxkIGJlIHRoZSBjbG9jayBldmVudCBk
ZXZpY2UgaW50ZXJydXB0Lg0KPiBkaWZmIC0tZ2l0IGEvZHJpdmVycy9zb2MvZnNsL2xheWVyc2Nh
cGUvZnRtX2FsYXJtLmMNCj4gYi9kcml2ZXJzL3NvYy9mc2wvbGF5ZXJzY2FwZS9mdG1fYWxhcm0u
Yw0KPiBpbmRleCA2Zjk4ODJmLi44MTFkY2ZhIDEwMDY0NA0KPiAtLS0gYS9kcml2ZXJzL3NvYy9m
c2wvbGF5ZXJzY2FwZS9mdG1fYWxhcm0uYw0KPiArKysgYi9kcml2ZXJzL3NvYy9mc2wvbGF5ZXJz
Y2FwZS9mdG1fYWxhcm0uYw0KDQo+VGhlcmUgaXMgbm8gc3VjaCBmaWxlIGluIHRoZSBtYWlubGlu
ZSBrZXJuZWwuICBTbyBpdCBsb29rcyBsaWtlIHRoZSBwYXRjaCBzZXQgaXMNCg0KPiBiYXNlZCBv
biBzb21lIGludGVybmFsIGdpdCByZXBvIGluc3RlYWQgb2YgdGhlIHVwc3RyZWFtIExpbnV4IGtl
cm5lbC4gIFRoaXMga2luZCBvZiBwYXRjaGVzDQoNCj4gc2hvdWxkbid0IGJlIHNlbnQgdG8gdGhl
IHVwc3RyZWFtIG1haWxpbmcgbGlzdCBmb3IgcmV2aWV3Lg0KDQo+UmVnYXJkcywNCg0KPkxlbw0K
VGhpcyBwYXRjaCB3aWxsIG5vdCB0byB1cHN0cmVhbS4NCg0KUmVnYXJkcywNCg0KWWluYm8uDQo=

^ permalink raw reply	[flat|nested] 35+ messages in thread

* [PATCH 3/9] soc: fsl: set rcpm bit for FTM
@ 2018-05-14  7:47       ` Yinbo Zhu
  0 siblings, 0 replies; 35+ messages in thread
From: Yinbo Zhu @ 2018-05-14  7:47 UTC (permalink / raw)
  To: linux-arm-kernel



-----Original Message-----
From: Leo Li 
Sent: 2018?5?12? 1:00
To: Yinbo Zhu <yinbo.zhu@nxp.com>; Yinbo Zhu <yinbo.zhu@nxp.com>; Rob Herring <robh+dt@kernel.org>; Mark Rutland <mark.rutland@arm.com>; Catalin Marinas ) <catalin.marinas@arm.com>; Will Deacon ) <will.deacon@arm.com>; Lorenzo Pieralisi ) <lorenzo.pieralisi@arm.com>
Cc: Xiaobo Xie <xiaobo.xie@nxp.com>; Ran Wang <ran.wang_1@nxp.com>; Daniel Lezcano <daniel.lezcano@linaro.org>; Thomas Gleixner <tglx@linutronix.de>; Shawn Guo <shawnguo@kernel.org>; Madalin-cristian Bucur <madalin.bucur@nxp.com>; Z.q. Hou <zhiqiang.hou@nxp.com>; Jerry Huang <jerry.huang@nxp.com>; M.h. Lian <minghuan.lian@nxp.com>; Qiang Zhao <qiang.zhao@nxp.com>; Fabio Estevam <fabio.estevam@nxp.com>; Jiaheng Fan <jiaheng.fan@nxp.com>; Po Liu <po.liu@nxp.com>; Nipun Gupta <nipun.gupta@nxp.com>; Horia Geant? <horia.geanta@nxp.com>; Priyanka Jain <priyanka.jain@nxp.com>; Sumit Garg <sumit.garg@nxp.com>; costi <constantin.tudor@freescale.com>; Bogdan Purcareata <bogdan.purcareata@nxp.com>; open list:CLOCKSOURCE, CLOCKEVENT DRIVERS <linux-kernel@vger.kernel.org>; open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS <devicetree@vger.kernel.org>; linux-arm-kernel at lists.infradead.org; open list:FREESCALE SOC DRIVERS <linuxppc-dev@lists.ozlabs.org>; Andy Tang <andy.tang@nxp.com>; Ying Zhang <ying.zhang22455@nxp.com>
Subject: RE: [PATCH 3/9] soc: fsl: set rcpm bit for FTM



> -----Original Message-----
> From: Yinbo Zhu [mailto:yinbo.zhu at nxp.com]
> Sent: Thursday, May 10, 2018 10:35 PM
> To: Yinbo Zhu <yinbo.zhu@nxp.com>; Rob Herring <robh+dt@kernel.org>; 
> Mark Rutland <mark.rutland@arm.com>; Catalin Marinas ) 
> <catalin.marinas@arm.com>; Will Deacon ) <will.deacon@arm.com>; 
> Lorenzo Pieralisi ) <lorenzo.pieralisi@arm.com>; Leo Li 
> <leoyang.li@nxp.com>
> Cc: Xiaobo Xie <xiaobo.xie@nxp.com>; Ran Wang <ran.wang_1@nxp.com>; 
> Daniel Lezcano <daniel.lezcano@linaro.org>; Thomas Gleixner 
> <tglx@linutronix.de>; Shawn Guo <shawnguo@kernel.org>; 
> Madalin-cristian Bucur <madalin.bucur@nxp.com>; Z.q. Hou 
> <zhiqiang.hou@nxp.com>; Jerry Huang <jerry.huang@nxp.com>; M.h. Lian 
> <minghuan.lian@nxp.com>; Qiang Zhao <qiang.zhao@nxp.com>; Fabio 
> Estevam <fabio.estevam@nxp.com>; Jiaheng Fan <jiaheng.fan@nxp.com>; Po 
> Liu <po.liu@nxp.com>; Nipun Gupta <nipun.gupta@nxp.com>; Horia Geant? 
> <horia.geanta@nxp.com>; Priyanka Jain <priyanka.jain@nxp.com>; Sumit 
> Garg <sumit.garg@nxp.com>; costi <constantin.tudor@freescale.com>; 
> Bogdan Purcareata <bogdan.purcareata@nxp.com>; Meng Yi 
> <meng.yi@nxp.com>; Wang Dongsheng <dongsheng.wang@nxp.com>; open 
> list:CLOCKSOURCE, CLOCKEVENT DRIVERS <linux-kernel@vger.kernel.org>; 
> open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS 
> <devicetree@vger.kernel.org>; linux-arm-kernel at lists.infradead.org; 
> open list:FREESCALE SOC DRIVERS <linuxppc-dev@lists.ozlabs.org>; Andy 
> Tang <andy.tang@nxp.com>; Ying Zhang <ying.zhang22455@nxp.com>
> Subject: [PATCH 3/9] soc: fsl: set rcpm bit for FTM
> 
> From: Zhang Ying-22455 <ying.zhang22455@nxp.com>
> 
> 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 <ying.zhang22455@nxp.com>
> Signed-off-by: Yinbo Zhu <yinbo.zhu@nxp.com>
> ---
>  .../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.

^ permalink raw reply	[flat|nested] 35+ messages in thread

end of thread, other threads:[~2018-05-14  7:47 UTC | newest]

Thread overview: 35+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-11  3:35 [PATCH 1/9] armv8: pm: add rcpm module support Yinbo Zhu
2018-05-11  3:35 ` Yinbo Zhu
2018-05-11  3:35 ` Yinbo Zhu
2018-05-11  3:35 ` [PATCH 2/9] armv8: pm: Fix issue of rcpm driver wrongly program other IP control bits Yinbo Zhu
2018-05-11  3:35   ` Yinbo Zhu
2018-05-11  3:35   ` Yinbo Zhu
2018-05-11  3:35 ` [PATCH 3/9] soc: fsl: set rcpm bit for FTM Yinbo Zhu
2018-05-11  3:35   ` Yinbo Zhu
2018-05-11  3:35   ` Yinbo Zhu
2018-05-11 17:00   ` Leo Li
2018-05-11 17:00     ` Leo Li
2018-05-11 17:00     ` Leo Li
2018-05-11 17:00     ` Leo Li
2018-05-14  7:47     ` Yinbo Zhu
2018-05-14  7:47       ` Yinbo Zhu
2018-05-14  7:47       ` Yinbo Zhu
2018-05-14  7:47       ` Yinbo Zhu
2018-05-11  3:35 ` [PATCH 4/9] arm64: dts: ls208xa: Add the identify of the platform to support to set rcpm bit Yinbo Zhu
2018-05-11  3:35   ` Yinbo Zhu
2018-05-11  3:35   ` Yinbo Zhu
2018-05-11  3:35 ` [PATCH 5/9] drivers: firmware: psci: use psci v0.2 to implement sleep Yinbo Zhu
2018-05-11  3:35   ` Yinbo Zhu
2018-05-11  3:35   ` Yinbo Zhu
2018-05-11  3:35 ` [PATCH 6/9] soc: fsl: fix the compilation issue Yinbo Zhu
2018-05-11  3:35   ` Yinbo Zhu
2018-05-11  3:35   ` Yinbo Zhu
2018-05-11  3:35 ` [PATCH 7/9] arm64: dts: ls1043a: Add the identify of the platform to support to set rcpm bit Yinbo Zhu
2018-05-11  3:35   ` Yinbo Zhu
2018-05-11  3:35   ` Yinbo Zhu
2018-05-11  3:35 ` [PATCH 8/9] arm64: dts: ls1046a: " Yinbo Zhu
2018-05-11  3:35   ` Yinbo Zhu
2018-05-11  3:35   ` Yinbo Zhu
2018-05-11  3:35 ` [PATCH 9/9] armv8: add psci 0.2 stardard support Yinbo Zhu
2018-05-11  3:35   ` Yinbo Zhu
2018-05-11  3:35   ` Yinbo Zhu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.