soc/tegra: Enable flowctrl support for Tegra132/210
Jon Hunter
maintainerv3 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.
Changes since V2:
- Updated Dt compatible strings per Stephen's feedback
- Added patch to update Tegra132 compatible string
Changes since V1:
- Updated warning message per Thierry's feedback
- Added stub functions for public flowctrl APIs
- Added patch to register flowctrl driver as a platform driver
- Updated formatting of DT compatible strings per Thierry's feedback.
Jon Hunter (6):
ARM: tegra: Remove unnecessary inclusion of flowctrl header soc/tegra: Move Tegra flowctrl driver
soc/tegra: flowctrl: Add basic platform driver
dt-bindings: tegra: Update compatible strings for Tegra flowctrl
arm64: tegra: Update the Tegra132 flowctrl compatible string soc/tegra: Add initial flowctrl support for Tegra132/210
.../bindings/arm/tegra/nvidia,tegra20-flowctrl.txt | 8 +- arch/arm/mach-tegra/Makefile | 1 - arch/arm/mach-tegra/cpuidle-tegra20.c | 3 +- arch/arm/mach-tegra/flowctrl.c | 179 ---------------- 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 - arch/arm64/boot/dts/nvidia/tegra132.dtsi | 2 +- drivers/soc/tegra/Kconfig | 9 + drivers/soc/tegra/Makefile | 1 + drivers/soc/tegra/flowctrl.c | 224 +++++++++++++++++++++ include/soc/tegra/flowctrl.h | 82 ++++++++ 17 files changed, 332 insertions(+), 258 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
Jon Hunter
maintainerPATCH v3 1/6 ARM: tegra: Remove unnecessary inclusion of flowctrl header
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
@@ -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
Thierry Reding
AppliedPATCH v3 1/6 ARM: tegra: Remove unnecessary inclusion of flowctrl header
Quoted 7 lines · Jon Hunter
The Tegra
flowctrl.hheader is included unnecessarily by the Tegrasleep.Ssource file. Remove this unnecessary inclusion.Signed-off-by Jon Hunter <[email protected]>--- arch/arm/mach-tegra/sleep.S | 2 -- 1 file changed, 2 deletions(-)
Applied to for-4.12/arm/soc, thanks.
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/20170404/6bddf167/attachment.sig>
Jon Hunter
maintainerPATCH v3 2/6 soc/tegra: Move Tegra flowctrl driver
In reply to Jon HunterThe 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/Makefile | 1 - arch/arm/mach-tegra/cpuidle-tegra20.c | 3 +- arch/arm/mach-tegra/flowctrl.c | 179 -------------------------------- 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 | 7 ++ drivers/soc/tegra/Makefile | 1 + drivers/soc/tegra/flowctrl.c | 187 ++++++++++++++++++++++++++++++++++ include/soc/tegra/flowctrl.h | 82 +++++++++++++++ 14 files changed, 285 insertions(+), 254 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/Makefile +0 -1
@@ -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
@@ -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 -179
179 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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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 +7 -0
@@ -12,6 +12,7 @@ config ARCH_TEGRA_2x_SOC select PINCTRL_TEGRA20 select PL310_ERRATA_727915 if CACHE_L2X0 select PL310_ERRATA_769419 if CACHE_L2X0 + select SOC_TEGRA_FLOWCTRL select SOC_TEGRA_PMC select TEGRA_TIMER help
@@ -24,6 +25,7 @@ config ARCH_TEGRA_3x_SOC select ARM_ERRATA_764369 if SMP select PINCTRL_TEGRA30 select PL310_ERRATA_769419 if CACHE_L2X0 + select SOC_TEGRA_FLOWCTRL select SOC_TEGRA_PMC select TEGRA_TIMER help
@@ -35,6 +37,7 @@ config ARCH_TEGRA_114_SOC select ARM_ERRATA_798181 if SMP select HAVE_ARM_ARCH_TIMER select PINCTRL_TEGRA114 + select SOC_TEGRA_FLOWCTRL select SOC_TEGRA_PMC select TEGRA_TIMER help
@@ -45,6 +48,7 @@ config ARCH_TEGRA_124_SOC bool "Enable support for Tegra124 family" select HAVE_ARM_ARCH_TIMER select PINCTRL_TEGRA124 + select SOC_TEGRA_FLOWCTRL select SOC_TEGRA_PMC select TEGRA_TIMER help
@@ -101,6 +105,9 @@ config ARCH_TEGRA_186_SOC endif endif +config SOC_TEGRA_FLOWCTRL + bool + config SOC_TEGRA_PMC bool
drivers/soc/tegra/Makefile +1 -0
@@ -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 +187 -0
187 lines not on this page · raw message
include/soc/tegra/flowctrl.h new file +82 -0
82 lines not on this page · raw message
Signature · 1 line
2.7.4
Thierry Reding
AppliedPATCH v3 2/6 soc/tegra: Move Tegra flowctrl driver
Quoted 22 lines · 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.Signed-off-by Jon Hunter <[email protected]>--- arch/arm/mach-tegra/Makefile | 1 - arch/arm/mach-tegra/cpuidle-tegra20.c | 3 +- arch/arm/mach-tegra/flowctrl.c | 179 -------------------------------- 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 | 7 ++
Quoted 8 lines
drivers/soc/tegra/Makefile | 1 + drivers/soc/tegra/flowctrl.c | 187 ++++++++++++++++++++++++++++++++++ include/soc/tegra/flowctrl.h | 82 +++++++++++++++ 14 files changed, 285 insertions(+), 254 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
Applied to for-4.12/soc, thanks.
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/20170404/53dd5447/attachment.sig>
Jon Hunter
maintainerPATCH v3 3/6 soc/tegra: flowctrl: Add basic platform driver
In reply to Jon HunterAdd a simple platform driver for the flowctrl module so that it gets registered as a proper device.
--- drivers/soc/tegra/flowctrl.c | 34 ++++++++++++++++++++++++++++++---- 1 file changed, 30 insertions(+), 4 deletions(-)
drivers/soc/tegra/flowctrl.c +30 -4
@@ -24,6 +24,7 @@#include <linux/kernel.h> #include <linux/of.h> #include <linux/of_address.h> +#include <linux/platform_device.h> #include <soc/tegra/common.h> #include <soc/tegra/flowctrl.h>
@@ -47,7 +48,7 @@ static void __iomem *tegra_flowctrl_base;static void flowctrl_update (u8 offset,u32 value) { -if (WARN_ONCE (!tegra_flowctrl_base, +if (WARN_ONCE (IS_ERR_OR_NULL (tegra_flowctrl_base),"Tegra flowctrl not initialised!\n" ))return ;
@@ -62,7 +63,7 @@ u32 flowctrl_read_cpu_csr(unsigned int cpuid) {u8 offset = flowctrl_offset_cpu_csr[cpuid]; -if (WARN_ONCE (!tegra_flowctrl_base, +if (WARN_ONCE (IS_ERR_OR_NULL (tegra_flowctrl_base),"Tegra flowctrl not initialised!\n" ))return 0 ;
@@ -148,7 +149,22 @@ void flowctrl_cpu_suspend_exit(unsigned int cpuid)flowctrl_write_cpu_csr (cpuid, reg); } -static const struct of_device_id matches[]__initconst = { +static int tegra_flowctrl_probe (struct platform_device *pdev) +{ +void __iomem *base = tegra_flowctrl_base; +struct resource *res; + + res =platform_get_resource (pdev,IORESOURCE_MEM ,0 ); + tegra_flowctrl_base =devm_ioremap_resource (&pdev->dev, res); +if (IS_ERR (tegra_flowctrl_base)) +return PTR_ERR (base); + +iounmap (base); + +return 0 ; +} + +static const struct of_device_id tegra_flowctrl_match[] = { { .compatible ="nvidia,tegra124-flowctrl" }, { .compatible ="nvidia,tegra114-flowctrl" }, { .compatible ="nvidia,tegra30-flowctrl" },
@@ -156,6 +172,16 @@ static const struct of_device_id matches[] __initconst = { { } }; +static struct platform_driver tegra_flowctrl_driver = { + .driver = { + .name ="tegra-flowctrl" , + .suppress_bind_attrs = true, + .of_match_table = tegra_flowctrl_match, + }, + .probe = tegra_flowctrl_probe, +}; +builtin_platform_driver (tegra_flowctrl_driver); +static int __init tegra_flowctrl_init (void ) {/* hardcoded fallback if device tree node is missing */
@@ -166,7 +192,7 @@ static int __init tegra_flowctrl_init(void)if (!soc_is_tegra ())return 0 ; - np =of_find_matching_node (NULL , matches); + np =of_find_matching_node (NULL , tegra_flowctrl_match);if (np) {struct resource res;
Signature · 1 line
2.7.4
Thierry Reding
AppliedPATCH v3 3/6 soc/tegra: flowctrl: Add basic platform driver
Quoted 7 lines · Jon Hunter
Add a simple platform driver for the flowctrl module so that it gets registered as a proper device.
Signed-off-by Jon Hunter <[email protected]>--- drivers/soc/tegra/flowctrl.c | 34 ++++++++++++++++++++++++++++++---- 1 file changed, 30 insertions(+), 4 deletions(-)
Applied to for-4.12/soc, thanks.
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/20170404/063c4e9a/attachment-0001.sig>
Jon Hunter
maintainerPATCH v3 4/6 dt-bindings: tegra: Update compatible strings for Tegra flowctrl
In reply to Jon HunterUpdate 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
@@ -1,7 +1,13 @@ NVIDIA Tegra Flow Controller Required properties: -- compatible: Should be "nvidia,tegra<chip>-flowctrl" +- compatible: Should contain one of the following: + - "nvidia,tegra20-flowctrl": for Tegra20 + - "nvidia,tegra30-flowctrl": for Tegra30 + - "nvidia,tegra114-flowctrl": for Tegra114 + - "nvidia,tegra124-flowctrl": for Tegra124 + - "nvidia,tegra132-flowctrl", "nvidia,tegra124-flowctrl": for Tegra132 + - "nvidia,tegra210-flowctrl": for Tegra210 - reg: Should contain one register range (address and length) Example:
Signature · 1 line
2.7.4
Rob Herring
maintainerPATCH v3 4/6 dt-bindings: tegra: Update compatible strings for Tegra flowctrl
Quoted 7 lines · Jon Hunter
Update the compatible strings for Tegra Flow Control driver to match the device-tree source files for Tegra.
Signed-off-by Jon Hunter <[email protected]>--- .../devicetree/bindings/arm/tegra/nvidia,tegra20-flowctrl.txt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
Thierry Reding
AppliedPATCH v3 4/6 dt-bindings: tegra: Update compatible strings for Tegra flowctrl
In reply to Jon HunterQuoted 7 lines · Jon Hunter
Update the compatible strings for Tegra Flow Control driver to match the device-tree source files for Tegra.
Signed-off-by Jon Hunter <[email protected]>--- .../devicetree/bindings/arm/tegra/nvidia,tegra20-flowctrl.txt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
Applied to for-4.12/dt-bindings, thanks.
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/20170404/147fd333/attachment.sig>
Jon Hunter
maintainerPATCH v3 5/6 arm64: tegra: Update the Tegra132 flowctrl compatible string
In reply to Jon HunterUpdate the Tegra132 flowctrl compatible string to include "nvidia,tegra132-flowctrl" so it is aligned with the flowctrl binding documentation.
--- arch/arm64/boot/dts/nvidia/tegra132.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/nvidia/tegra132.dtsi +1 -1
@@ -224,7 +224,7 @@ }; flow-controller at 60007000 { - compatible = "nvidia,tegra124-flowctrl"; + compatible = "nvidia,tegra132-flowctrl", "nvidia,tegra124-flowctrl"; reg = <0x0 0x60007000 0x0 0x1000>; };
Signature · 1 line
2.7.4
Thierry Reding
AppliedPATCH v3 5/6 arm64: tegra: Update the Tegra132 flowctrl compatible string
Quoted 8 lines · Jon Hunter
Update the Tegra132 flowctrl compatible string to include "nvidia,tegra132-flowctrl" so it is aligned with the flowctrl binding documentation.
Signed-off-by Jon Hunter <[email protected]>--- arch/arm64/boot/dts/nvidia/tegra132.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Applied to for-4.12/arm64/dt, thanks.
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/20170404/d2840e42/attachment.sig>
Jon Hunter
maintainerPATCH v3 6/6 soc/tegra: Add initial flowctrl support for Tegra132/210
In reply to Jon HunterTegra132 and Tegra210 support the flowctrl module and so add initial support for these devices.
Please note that Tegra186 does not support the flowctrl module, so update the initialisation function such that we do not fall back and attempt to map the 'hardcoded' address range for Tegra186. Furthermore 64-bit Tegra devices have always had the flowctrl node defined in their device-tree and so only use the 'hardcoded' addresses for 32-bit Tegra devices.
--- drivers/soc/tegra/Kconfig | 2 ++ drivers/soc/tegra/flowctrl.c | 31 +++++++++++++++++++++---------- 2 files changed, 23 insertions(+), 10 deletions(-)
drivers/soc/tegra/Kconfig +2 -0
@@ -63,6 +63,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
@@ -73,6 +74,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,
drivers/soc/tegra/flowctrl.c +21 -10
@@ -165,6 +165,7 @@ static int tegra_flowctrl_probe(struct platform_device *pdev) }static const struct of_device_id tegra_flowctrl_match[] = { + { .compatible ="nvidia,tegra210-flowctrl" }, { .compatible ="nvidia,tegra124-flowctrl" }, { .compatible ="nvidia,tegra114-flowctrl" }, { .compatible ="nvidia,tegra30-flowctrl" },
@@ -184,9 +185,7 @@ builtin_platform_driver(tegra_flowctrl_driver);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 resource res;struct device_node *np;if (!soc_is_tegra ())
@@ -194,17 +193,29 @@ static int __init tegra_flowctrl_init(void) np =of_find_matching_node (NULL , tegra_flowctrl_match);if (np) { -struct resource res; - -if (of_address_to_resource (np,0 , &res) ==0 ) { - size =resource_size (&res); - base = res.start; +if (of_address_to_resource (np,0 , &res) <0 ) { +pr_err ("failed to get flowctrl register\n" ); +return -ENXIO ; } -of_node_put (np); + }else if (IS_ENABLED (CONFIG_ARM )) { +/* +* Hardcoded fallback for 32-bit Tegra +* devices if device tree node is missing. +*/ + res.start =0x60007000 ; + res.end =0x60007fff ; + res.flags =IORESOURCE_MEM ; + }else { +/* +* At this point we're running on a Tegra, +* that doesn't support the flow controller +* (eg. Tegra186), so just return. +*/ +return 0 ; } - tegra_flowctrl_base =ioremap_nocache (base, size); + tegra_flowctrl_base =ioremap_nocache (res.start,resource_size (&res));if (!tegra_flowctrl_base)return -ENXIO ;
Signature · 1 line
2.7.4
Thierry Reding
AppliedPATCH v3 6/6 soc/tegra: Add initial flowctrl support for Tegra132/210
Quoted 10 lines · Jon Hunter
Tegra132 and Tegra210 support the flowctrl module and so add initial support for these devices.
Please note that Tegra186 does not support the flowctrl module, so update the initialisation function such that we do not fall back and attempt to map the 'hardcoded' address range for Tegra186. Furthermore 64-bit Tegra devices have always had the flowctrl node defined in their device-tree and so only use the 'hardcoded' addresses for 32-bit Tegra devices.
Quoted 5 lines
Signed-off-by Jon Hunter <[email protected]>--- drivers/soc/tegra/Kconfig | 2 ++ drivers/soc/tegra/flowctrl.c | 31 +++++++++++++++++++++---------- 2 files changed, 23 insertions(+), 10 deletions(-)
Applied to for-4.12/soc, thanks.
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/20170404/114f3a9a/attachment.sig>