Skip to contentSkip to conversation

soc/tegra: Enable flowctrl support for Tegra132/210

PATCH Superseded Jon Hunter 2 participants 12 messages Mar 15, 2017 – Mar 20, 2017

Subsystems (4)

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore

Jon Hunter

author maintainer
#0 lore raw

cover soc/tegra: Enable flowctrl support for Tegra132/210

The flowctrl modules is supported by both Tegra132 and Tegra210 devices. These devices already have the flowctrl node defined in their respective *.dtsi device-tree files. The flowctrl driver is currently located in the arch/arm/mach-tegra directory and so can only be used for 32-bit Tegra devices. Move this driver into drivers/soc/tegra so that it can be used for all Tegra devices that support flowctrl.

I have also added a couple clean-up patches.

Jon Hunter (5):
ARM: tegra: WARN if flowctrl is not supported
ARM: tegra: Remove unnecessary inclusion of flowctrl header soc/tegra: Move Tegra flowctrl driver
dt-bindings: tegra: Update compatible strings for Tegra flowctrl soc/tegra: Add initial flowctrl support for Tegra210

 .../bindings/arm/tegra/nvidia,tegra20-flowctrl.txt |   8 +-
 arch/arm/mach-tegra/Kconfig                        |   1 +
 arch/arm/mach-tegra/Makefile                       |   1 -
 arch/arm/mach-tegra/cpuidle-tegra20.c              |   3 +-
 arch/arm/mach-tegra/flowctrl.c                     | 171 -------------------
 arch/arm/mach-tegra/flowctrl.h                     |  66 --------
 arch/arm/mach-tegra/platsmp.c                      |   2 +-
 arch/arm/mach-tegra/pm.c                           |   2 +-
 arch/arm/mach-tegra/reset-handler.S                |   2 +-
 arch/arm/mach-tegra/sleep-tegra20.S                |   3 +-
 arch/arm/mach-tegra/sleep-tegra30.S                |   2 +-
 arch/arm/mach-tegra/sleep.S                        |   2 -
 arch/arm/mach-tegra/tegra.c                        |   2 -
 drivers/soc/tegra/Kconfig                          |   5 +
 drivers/soc/tegra/Makefile                         |   1 +
 drivers/soc/tegra/flowctrl.c                       | 187 +++++++++++++++++++++
 include/soc/tegra/flowctrl.h                       |  62 +++++++
 17 files changed, 271 insertions(+), 249 deletions(-)
 delete mode 100644 arch/arm/mach-tegra/flowctrl.c
 delete mode 100644 arch/arm/mach-tegra/flowctrl.h
 create mode 100644 drivers/soc/tegra/flowctrl.c
 create mode 100644 include/soc/tegra/flowctrl.h
Signature · 1 line
2.7.4
author maintainer
#1 lore raw

PATCH 1/5 ARM: tegra: WARN if flowctrl is not supported

If we fail to map the IO space for the Tegra flowctrl module in tegra_flowctrl_init(), then if any of the public APIs for the Tegra flowctrl driver are called we still still attempt to access the hardware. Fix this by only accessing the hardware if the 'tegra_flowctrl_base' address has not been setup correctly and warn if we attempt to access the hardware when it has not.

---
 arch/arm/mach-tegra/flowctrl.c | 6 ++++++
 1 file changed, 6 insertions(+)
arch/arm/mach-tegra/flowctrl.c +6 -0
index 475e783992fd..40b15e39f849 100644
@@ -47,6 +47,9 @@ static void __iomem *tegra_flowctrl_base;
 
 static void flowctrl_update(u8 offset, u32 value)
 {
+	if (WARN_ONCE(!tegra_flowctrl_base, "Tegra flowctrl not supported!"))
+		return;
+
 	writel(value, tegra_flowctrl_base + offset);
 
 	/* ensure the update has reached the flow controller */
@@ -58,6 +61,9 @@ u32 flowctrl_read_cpu_csr(unsigned int cpuid)
 {
 	u8 offset = flowctrl_offset_cpu_csr[cpuid];
 
+	if (WARN_ONCE(!tegra_flowctrl_base, "Tegra flowctrl not supported!"))
+		return 0;
+
 	return readl(tegra_flowctrl_base + offset);
 }
 
Signature · 1 line
2.7.4
#2 lore raw

PATCH 1/5 ARM: tegra: WARN if flowctrl is not supported

Quoted 17 lines · Jon Hunter

If we fail to map the IO space for the Tegra flowctrl module in tegra_flowctrl_init(), then if any of the public APIs for the Tegra flowctrl driver are called we still still attempt to access the hardware. Fix this by only accessing the hardware if the 'tegra_flowctrl_base' address has not been setup correctly and warn if we attempt to access the hardware when it has not.

---
 arch/arm/mach-tegra/flowctrl.c | 6 ++++++
 1 file changed, 6 insertions(+)
arch/arm/mach-tegra/flowctrl.c +0 -0
index 475e783992fd..40b15e39f849 100644

arch/arm/mach-tegra/flowctrl.c static void __iomem *tegra_flowctrl_base; · line 50

Quoted 4 lines
arch/arm/mach-tegra/flowctrl.c +1 -0
@@ -47,6 +47,9 @@ static void __iomem *tegra_flowctrl_base;
 
 static void flowctrl_update(u8 offset, u32 value)
 {
+	if (WARN_ONCE(!tegra_flowctrl_base, "Tegra flowctrl not supported!"))

Technically I think this string needs a terminating "\n" because it is eventually passed to printk(), even though the WARN_ONCE() will probably format the output correctly even without it.

Also, "not supported" isn't a very accurate description. This has to do with the flow controller not having been initialized yet.

Thierry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20170320/bc2710c7/attachment-0001.sig>

author maintainer
#3 lore raw

PATCH 1/5 ARM: tegra: WARN if flowctrl is not supported

Quoted 21 lines · Thierry Reding

* PGP Signed by an unknown key

Quoted 18 lines · Jon Hunter

If we fail to map the IO space for the Tegra flowctrl module in tegra_flowctrl_init(), then if any of the public APIs for the Tegra flowctrl driver are called we still still attempt to access the hardware. Fix this by only accessing the hardware if the 'tegra_flowctrl_base' address has not been setup correctly and warn if we attempt to access the hardware when it has not.

---
 arch/arm/mach-tegra/flowctrl.c | 6 ++++++
 1 file changed, 6 insertions(+)
arch/arm/mach-tegra/flowctrl.c +0 -0
index 475e783992fd..40b15e39f849 100644
@@ -47,6 +47,9 @@ static void __iomem *tegra_flowctrl_base;
 
Quoted 7 lines

arch/arm/mach-tegra/flowctrl.c static void __iomem *tegra_flowctrl_base; · line 50

Quoted 3 lines
arch/arm/mach-tegra/flowctrl.c +1 -0
 static void flowctrl_update(u8 offset, u32 value)
 {
+	if (WARN_ONCE(!tegra_flowctrl_base, "Tegra flowctrl not supported!"))

Technically I think this string needs a terminating "\n" because it is eventually passed to printk(), even though the WARN_ONCE() will probably format the output correctly even without it.

Yes, will fix up.

Quoted 2 lines

Also, "not supported" isn't a very accurate description. This has to do with the flow controller not having been initialized yet.

Will update to 'not initialised'.

Jon

Signature · 1 line
nvpublic
author maintainer
#4 lore raw

PATCH 2/5 ARM: tegra: Remove unnecessary inclusion of flowctrl header

In reply to Jon Hunter

The Tegra flowctrl.h header is included unnecessarily by the Tegra sleep.S source file. Remove this unnecessary inclusion.

---
 arch/arm/mach-tegra/sleep.S | 2 --
 1 file changed, 2 deletions(-)
arch/arm/mach-tegra/sleep.S +0 -2
index f024a5109e8e..5e3496753df1 100644
@@ -30,8 +30,6 @@
 #include <asm/hardware/cache-l2x0.h>
 
 #include "iomap.h"
-
-#include "flowctrl.h"
 #include "sleep.h"
 
 #define CLK_RESET_CCLK_BURST	0x20
Signature · 1 line
2.7.4
author maintainer
#5 lore raw

PATCH 3/5 soc/tegra: Move Tegra flowctrl driver

In reply to Jon Hunter

The flowctrl driver is required for both ARM and ARM64 Tegra devices and in order to enable support for it for ARM64, move the Tegra flowctrl driver into drivers/soc/tegra.

By moving the flowctrl driver, tegra_flowctrl_init() is now called by via an early initcall and to prevent this function from attempting to mapping IO space for a non-Tegra device, a test for 'soc_is_tegra()' is also added.

---
 arch/arm/mach-tegra/Kconfig           |   1 +
 arch/arm/mach-tegra/Makefile          |   1 -
 arch/arm/mach-tegra/cpuidle-tegra20.c |   3 +-
 arch/arm/mach-tegra/flowctrl.c        | 177 --------------------------------
 arch/arm/mach-tegra/flowctrl.h        |  66 ------------
 arch/arm/mach-tegra/platsmp.c         |   2 +-
 arch/arm/mach-tegra/pm.c              |   2 +-
 arch/arm/mach-tegra/reset-handler.S   |   2 +-
 arch/arm/mach-tegra/sleep-tegra20.S   |   3 +-
 arch/arm/mach-tegra/sleep-tegra30.S   |   2 +-
 arch/arm/mach-tegra/tegra.c           |   2 -
 drivers/soc/tegra/Kconfig             |   5 +
 drivers/soc/tegra/Makefile            |   1 +
 drivers/soc/tegra/flowctrl.c          | 186 ++++++++++++++++++++++++++++++++++
 include/soc/tegra/flowctrl.h          |  62 ++++++++++++
 15 files changed, 263 insertions(+), 252 deletions(-)
 delete mode 100644 arch/arm/mach-tegra/flowctrl.c
 delete mode 100644 arch/arm/mach-tegra/flowctrl.h
 create mode 100644 drivers/soc/tegra/flowctrl.c
 create mode 100644 include/soc/tegra/flowctrl.h
arch/arm/mach-tegra/Kconfig +1 -0
index 329f01c5b6f8..5de9104ee15e 100644
@@ -13,5 +13,6 @@ menuconfig ARCH_TEGRA
 	select ARCH_HAS_RESET_CONTROLLER
 	select RESET_CONTROLLER
 	select SOC_BUS
+	select SOC_TEGRA_FLOWCTRL
 	help
 	  This enables support for NVIDIA Tegra based systems.
arch/arm/mach-tegra/Makefile +0 -1
index fffad2426ee4..3b33f0bb78ae 100644
@@ -2,7 +2,6 @@ asflags-y				+= -march=armv7-a
 
 obj-y                                   += io.o
 obj-y                                   += irq.o
-obj-y					+= flowctrl.o
 obj-y					+= pm.o
 obj-y					+= reset.o
 obj-y					+= reset-handler.o
arch/arm/mach-tegra/cpuidle-tegra20.c +2 -1
index afcee04f2616..76e4c83cd5c8 100644
@@ -26,12 +26,13 @@
 #include <linux/kernel.h>
 #include <linux/module.h>
 
+#include <soc/tegra/flowctrl.h>
+
 #include <asm/cpuidle.h>
 #include <asm/smp_plat.h>
 #include <asm/suspend.h>
 
 #include "cpuidle.h"
-#include "flowctrl.h"
 #include "iomap.h"
 #include "irq.h"
 #include "pm.h"
arch/arm/mach-tegra/flowctrl.c deleted +0 -177

177 lines not on this page · raw message

arch/arm/mach-tegra/flowctrl.h deleted +0 -66

66 lines not on this page · raw message

arch/arm/mach-tegra/platsmp.c +1 -1
index 75620ae73913..b5a2afe99101 100644
@@ -21,6 +21,7 @@
 #include <linux/jiffies.h>
 #include <linux/smp.h>
 
+#include <soc/tegra/flowctrl.h>
 #include <soc/tegra/fuse.h>
 #include <soc/tegra/pmc.h>
 
@@ -30,7 +31,6 @@
 #include <asm/smp_scu.h>
 
 #include "common.h"
-#include "flowctrl.h"
 #include "iomap.h"
 #include "reset.h"
 
arch/arm/mach-tegra/pm.c +1 -1
index b0f48a3946fa..1ad5719779b0 100644
@@ -27,6 +27,7 @@
 #include <linux/spinlock.h>
 #include <linux/suspend.h>
 
+#include <soc/tegra/flowctrl.h>
 #include <soc/tegra/fuse.h>
 #include <soc/tegra/pm.h>
 #include <soc/tegra/pmc.h>
@@ -38,7 +39,6 @@
 #include <asm/suspend.h>
 #include <asm/tlbflush.h>
 
-#include "flowctrl.h"
 #include "iomap.h"
 #include "pm.h"
 #include "reset.h"
arch/arm/mach-tegra/reset-handler.S +1 -1
index e3070fdab80b..805f306fa6f7 100644
@@ -17,12 +17,12 @@
 #include <linux/init.h>
 #include <linux/linkage.h>
 
+#include <soc/tegra/flowctrl.h>
 #include <soc/tegra/fuse.h>
 
 #include <asm/asm-offsets.h>
 #include <asm/cache.h>
 
-#include "flowctrl.h"
 #include "iomap.h"
 #include "reset.h"
 #include "sleep.h"
arch/arm/mach-tegra/sleep-tegra20.S +2 -1
index f5d19667484e..5c8e638ee51a 100644
@@ -20,6 +20,8 @@
 
 #include <linux/linkage.h>
 
+#include <soc/tegra/flowctrl.h>
+
 #include <asm/assembler.h>
 #include <asm/proc-fns.h>
 #include <asm/cp15.h>
@@ -27,7 +29,6 @@
 
 #include "irammap.h"
 #include "sleep.h"
-#include "flowctrl.h"
 
 #define EMC_CFG				0xc
 #define EMC_ADR_CFG			0x10
arch/arm/mach-tegra/sleep-tegra30.S +1 -1
index 16e5ff03383c..dd4a67dabd91 100644
@@ -16,13 +16,13 @@
 
 #include <linux/linkage.h>
 
+#include <soc/tegra/flowctrl.h>
 #include <soc/tegra/fuse.h>
 
 #include <asm/asm-offsets.h>
 #include <asm/assembler.h>
 #include <asm/cache.h>
 
-#include "flowctrl.h"
 #include "irammap.h"
 #include "sleep.h"
 
arch/arm/mach-tegra/tegra.c +0 -2
index e01cbca196b5..649e9e8c7bcc 100644
@@ -48,7 +48,6 @@
 #include "board.h"
 #include "common.h"
 #include "cpuidle.h"
-#include "flowctrl.h"
 #include "iomap.h"
 #include "irq.h"
 #include "pm.h"
@@ -75,7 +74,6 @@ static void __init tegra_init_early(void)
 {
 	of_register_trusted_foundations();
 	tegra_cpu_reset_handler_init();
-	tegra_flowctrl_init();
 }
 
 static void __init tegra_dt_init_irq(void)
drivers/soc/tegra/Kconfig +5 -0
index 208d6edb3fdb..28785814fe22 100644
@@ -59,6 +59,7 @@ if ARM64
 config ARCH_TEGRA_132_SOC
 	bool "NVIDIA Tegra132 SoC"
 	select PINCTRL_TEGRA124
+	select SOC_TEGRA_FLOWCTRL
 	select SOC_TEGRA_PMC
 	help
 	  Enable support for NVIDIA Tegra132 SoC, based on the Denver
@@ -69,6 +70,7 @@ config ARCH_TEGRA_132_SOC
 config ARCH_TEGRA_210_SOC
 	bool "NVIDIA Tegra210 SoC"
 	select PINCTRL_TEGRA210
+	select SOC_TEGRA_FLOWCTRL
 	select SOC_TEGRA_PMC
 	help
 	  Enable support for the NVIDIA Tegra210 SoC. Also known as Tegra X1,
@@ -101,6 +103,9 @@ config ARCH_TEGRA_186_SOC
 endif
 endif
 
+config SOC_TEGRA_FLOWCTRL
+	bool
+
 config SOC_TEGRA_PMC
 	bool
 
drivers/soc/tegra/Makefile +1 -0
index b4425e4319ff..4f81dd55e5d1 100644
@@ -1,5 +1,6 @@
 obj-y += fuse/
 
 obj-y += common.o
+obj-$(CONFIG_SOC_TEGRA_FLOWCTRL) += flowctrl.o
 obj-$(CONFIG_SOC_TEGRA_PMC) += pmc.o
 obj-$(CONFIG_SOC_TEGRA_PMC_TEGRA186) += pmc-tegra186.o
drivers/soc/tegra/flowctrl.c new file +186 -0

186 lines not on this page · raw message

include/soc/tegra/flowctrl.h new file +62 -0

62 lines not on this page · raw message

Signature · 1 line
2.7.4
#6 lore raw

PATCH 3/5 soc/tegra: Move Tegra flowctrl driver

On Wed, Mar 15, 2017 at 01:31:53PM +0000, Jon Hunter wrote:
[...]

Quoted 20 lines
drivers/soc/tegra/flowctrl.c new file +20 -0
+static int __init tegra_flowctrl_init(void)
+{
+	/* hardcoded fallback if device tree node is missing */
+	unsigned long base = 0x60007000;
+	unsigned long size = SZ_4K;
+	struct device_node *np;
+
+	if (!soc_is_tegra())
+		return 0;
+
+	np = of_find_matching_node(NULL, matches);
+	if (np) {
+		struct resource res;
+
+		if (of_address_to_resource(np, 0, &res) == 0) {
+			size = resource_size(&res);
+			base = res.start;
+		}
+
+		of_node_put(np);

drivers/soc/tegra/flowctrl.c line 186

Quoted 10 lines
drivers/soc/tegra/flowctrl.c new file +10 -0
+	}
+
+	tegra_flowctrl_base = ioremap_nocache(base, size);
+
+	if (!tegra_flowctrl_base)
+		return -ENXIO;
+
+	return 0;
+}
+early_initcall(tegra_flowctrl_init);

Do we want to implement a hand-off to a proper driver at some point, similar to what we have for PMC?

Quoted 1 line
include/soc/tegra/flowctrl.h +0 -0

[...]

include/soc/tegra/flowctrl.h line 60

Quoted 8 lines
include/soc/tegra/flowctrl.h +8 -0
+#ifndef __ASSEMBLY__
+u32 flowctrl_read_cpu_csr(unsigned int cpuid);
+void flowctrl_write_cpu_csr(unsigned int cpuid, u32 value);
+void flowctrl_write_cpu_halt(unsigned int cpuid, u32 value);
+
+void flowctrl_cpu_suspend_enter(unsigned int cpuid);
+void flowctrl_cpu_suspend_exit(unsigned int cpuid);
+#endif

Perhaps we want the same type of dummy functions scheme here for !SOC_TEGRA_FLOWCTRL that Arnd proposed for !SOC_TEGRA_PMC?

Quoted 5 lines
include/soc/tegra/flowctrl.h +2 -0
+
+#endif
Signature · 1 line
2.7.4

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20170320/dc5df8d7/attachment.sig>

author maintainer
#7 lore raw

PATCH 3/5 soc/tegra: Move Tegra flowctrl driver

Quoted 29 lines · Thierry Reding

* PGP Signed by an unknown key

On Wed, Mar 15, 2017 at 01:31:53PM +0000, Jon Hunter wrote:
[...]

Quoted 25 lines
drivers/soc/tegra/flowctrl.c new file +25 -0
+static int __init tegra_flowctrl_init(void)
+{
+	/* hardcoded fallback if device tree node is missing */
+	unsigned long base = 0x60007000;
+	unsigned long size = SZ_4K;
+	struct device_node *np;
+
+	if (!soc_is_tegra())
+		return 0;
+
+	np = of_find_matching_node(NULL, matches);
+	if (np) {
+		struct resource res;
+
+		if (of_address_to_resource(np, 0, &res) == 0) {
+			size = resource_size(&res);
+			base = res.start;
+		}
+
+		of_node_put(np);
+	}
+
+	tegra_flowctrl_base = ioremap_nocache(base, size);
+
+	if (!tegra_flowctrl_base)
Quoted 8 lines

drivers/soc/tegra/flowctrl.c line 186

Quoted 5 lines
drivers/soc/tegra/flowctrl.c new file +5 -0
+		return -ENXIO;
+
+	return 0;
+}
+early_initcall(tegra_flowctrl_init);

Do we want to implement a hand-off to a proper driver at some point, similar to what we have for PMC?

Yes I can add, it won't do much apart from remap the io-space, but at least it is registered as a device then.

Quoted 13 lines
Quoted 1 line
include/soc/tegra/flowctrl.h +0 -0

[...]

include/soc/tegra/flowctrl.h line 60

Quoted 8 lines
include/soc/tegra/flowctrl.h +8 -0
+#ifndef __ASSEMBLY__
+u32 flowctrl_read_cpu_csr(unsigned int cpuid);
+void flowctrl_write_cpu_csr(unsigned int cpuid, u32 value);
+void flowctrl_write_cpu_halt(unsigned int cpuid, u32 value);
+
+void flowctrl_cpu_suspend_enter(unsigned int cpuid);
+void flowctrl_cpu_suspend_exit(unsigned int cpuid);
+#endif

Perhaps we want the same type of dummy functions scheme here for !SOC_TEGRA_FLOWCTRL that Arnd proposed for !SOC_TEGRA_PMC?

Yes that is a better solution, so will do the same here.

Jon

Signature · 1 line
nvpublic
#8 lore raw

PATCH 3/5 soc/tegra: Move Tegra flowctrl driver

Quoted 41 lines · Jon Hunter
Quoted 29 lines · Thierry Reding

* PGP Signed by an unknown key

On Wed, Mar 15, 2017 at 01:31:53PM +0000, Jon Hunter wrote:
[...]

Quoted 25 lines
drivers/soc/tegra/flowctrl.c new file +25 -0
+static int __init tegra_flowctrl_init(void)
+{
+	/* hardcoded fallback if device tree node is missing */
+	unsigned long base = 0x60007000;
+	unsigned long size = SZ_4K;
+	struct device_node *np;
+
+	if (!soc_is_tegra())
+		return 0;
+
+	np = of_find_matching_node(NULL, matches);
+	if (np) {
+		struct resource res;
+
+		if (of_address_to_resource(np, 0, &res) == 0) {
+			size = resource_size(&res);
+			base = res.start;
+		}
+
+		of_node_put(np);
+	}
+
+	tegra_flowctrl_base = ioremap_nocache(base, size);
+
+	if (!tegra_flowctrl_base)
Quoted 8 lines

drivers/soc/tegra/flowctrl.c line 186

Quoted 5 lines
drivers/soc/tegra/flowctrl.c new file +5 -0
+		return -ENXIO;
+
+	return 0;
+}
+early_initcall(tegra_flowctrl_init);

Do we want to implement a hand-off to a proper driver at some point, similar to what we have for PMC?

Quoted 2 lines

Yes I can add, it won't do much apart from remap the io-space, but at least it is registered as a device then.

Yeah, the same is true for PMC, but I find it quite convenient to have a struct device * around. Ideally, of course, we'd be able to somehow have deferred probe take care of the dependencies so that we wouldn't have to muck about with these initcalls, but I don't think we're there yet. That "partial" driver would at least be some way in the right direction.

Thierry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20170320/182906aa/attachment.sig>

author maintainer
#9 lore raw

PATCH 4/5 dt-bindings: tegra: Update compatible strings for Tegra flowctrl

In reply to Jon Hunter

Update the compatible strings for Tegra Flow Control driver to match the device-tree source files for Tegra.

---
 .../devicetree/bindings/arm/tegra/nvidia,tegra20-flowctrl.txt     | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/arm/tegra/nvidia,tegra20-flowctrl.txt +7 -1
index ccf0adddc820..d92bf782985f 100644
@@ -1,7 +1,13 @@
 NVIDIA Tegra Flow Controller
 
 Required properties:
-- compatible: Should be "nvidia,tegra<chip>-flowctrl"
+- compatible: Should contain one of the following:
+	For Tegra20 must contain "nvidia,tegra20-flowctrl".
+	For Tegra30 must contain "nvidia,tegra30-flowctrl".
+	For Tegra114 must contain "nvidia,tegra114-flowctrl"
+	For Tegra124 must contain "nvidia,tegra124-flowctrl"
+	For Tegra132 must contain "nvidia,tegra124-flowctrl"
+	For Tegra210 must contain "nvidia,tegra210-flowctrl"
 - reg: Should contain one register range (address and length)
 
 Example:
Signature · 1 line
2.7.4
#10 lore raw

PATCH 4/5 dt-bindings: tegra: Update compatible strings for Tegra flowctrl

Quoted 14 lines · Jon Hunter

Update the compatible strings for Tegra Flow Control driver to match the device-tree source files for Tegra.

---
 .../devicetree/bindings/arm/tegra/nvidia,tegra20-flowctrl.txt     | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/arm/tegra/nvidia,tegra20-flowctrl.txt +0 -0
index ccf0adddc820..d92bf782985f 100644
@@ -1,7 +1,13 @@
 NVIDIA Tegra Flow Controller

Documentation/devicetree/bindings/arm/tegra/nvidia,tegra20-flowctrl.txt line 10

Quoted 10 lines
Documentation/devicetree/bindings/arm/tegra/nvidia,tegra20-flowctrl.txt +7 -1
 
 Required properties:
-- compatible: Should be "nvidia,tegra<chip>-flowctrl"
+- compatible: Should contain one of the following:
+	For Tegra20 must contain "nvidia,tegra20-flowctrl".
+	For Tegra30 must contain "nvidia,tegra30-flowctrl".
+	For Tegra114 must contain "nvidia,tegra114-flowctrl"
+	For Tegra124 must contain "nvidia,tegra124-flowctrl"
+	For Tegra132 must contain "nvidia,tegra124-flowctrl"
+	For Tegra210 must contain "nvidia,tegra210-flowctrl"

I have a slight preference for the format:

"nvidia,tegraXXX-flowctrl...": for TegraXXX

since that's what we've used in other bindings and is also closer to what is, I think, planned for the longer term (i.e. DT bindings with YAML(-like) syntax).

Thierry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20170320/75111c55/attachment.sig>

author maintainer
#11 lore raw

PATCH 5/5 soc/tegra: Add initial flowctrl support for Tegra210

In reply to Jon Hunter

Tegra210 supports the flowctrl module and so add initial support for this device.

---
 drivers/soc/tegra/flowctrl.c | 1 +
 1 file changed, 1 insertion(+)
drivers/soc/tegra/flowctrl.c +1 -0
index b94d9161e448..1a993104e7ff 100644
@@ -147,6 +147,7 @@ void flowctrl_cpu_suspend_exit(unsigned int cpuid)
 }
 
 static const struct of_device_id matches[] __initconst = {
+	{ .compatible = "nvidia,tegra210-flowctrl" },
 	{ .compatible = "nvidia,tegra124-flowctrl" },
 	{ .compatible = "nvidia,tegra114-flowctrl" },
 	{ .compatible = "nvidia,tegra30-flowctrl" },
Signature · 1 line
2.7.4