Seeing conflict with IPMMU driver under ACPI
Hi, with your IPMMU driver enabled under 4.13 we’re seeing a crash on boot: [ 13.785164] Unable to handle kernel NULL pointer dereference at virtual address 0018 [ 13.793254] [0018] user address but active_mm is swapper [ 13.799600] Internal error: Oops: 9604 [#1] SMP [ 13.804466] Modules linked in: aes_neon_bs aes_neon_blk crypto_simd cryptd [ 13.811334] CPU: 152 PID: 1529 Comm: kworker/152:1 Not tainted 4.13.0-9-generic #10-Ubuntu [ 13.819584] Hardware name: Default string Cavium ThunderX2/Default string, BIOS 5.13 07/20/2017 [ 13.828285] Workqueue: events deferred_probe_work_func [ 13.833410] task: 80bee93d task.stack: 80bee93dc000 [ 13.839330] PC is at iommu_ops_from_fwnode+0x4c/0x90 [ 13.844282] LR is at iommu_ops_from_fwnode+0x28/0x90 The ARM SMMUv3 driver (which our platform implements) seems to be losing iommu_ops to the IPMMU driver. Note: our platform uses ACPI for device enumeration. I have no way to test this, but is there a reason the set_iommu isn’t in _probe? diff --git a/drivers/iommu/ipmmu-vmsa.c b/drivers/iommu/ipmmu-vmsa.c index 2a38aa1..d4c72da 100644 --- a/drivers/iommu/ipmmu-vmsa.c +++ b/drivers/iommu/ipmmu-vmsa.c @@ -1066,6 +1066,9 @@ static int ipmmu_probe(struct platform_device *pdev) platform_set_drvdata(pdev, mmu); + if (!iommu_present(_bus_type)) + bus_set_iommu(_bus_type, _ops); + return 0; } @@ -1108,9 +,6 @@ static int __init ipmmu_init(void) if (ret < 0) return ret; - if (!iommu_present(_bus_type)) - bus_set_iommu(_bus_type, _ops); - return 0; } If I’m wrong, my apologies. Thank you, Ananth Jasty Lead Software Engineer Cavium
Re: [PATCH/RFC 1/3] dt-bindings: i2c: i2c-gpio: Add support for named gpios
On Mon, Sep 18, 2017 at 6:52 PM, Rob Herringwrote: > In theory yes, but reality is pretty much everyone follows it. There's > no other way to specify active high vs. low for example. Furthermore, > if someone wanted to do flags in their own custom way, that would > still work. It is still the controller (or GPIO core) that interprets > the flags, not the client. > > This is a new binding, so only new DT will have it and we can apply > new standards. I'd like to get a picture of any one-cell GPIO DTS:es and/or drivers still around. I would like to deal with them somehow. When we started the big DT migration this was one of the areas we made some screwups in, admittedly, but someone just has to go first, and that was incidentally GPIO controllers. At this time people were even playing around with DT bindings in BNF form, which is why the GPIO binding is a bit .. esoteric at times. I guess I should fix that. Yours, Linus Walleij
Re: [PATCH] dt-bindings: net: renesas-ravb: Add support for R8A77995 RAVB
From: Yoshihiro ShimodaDate: Thu, 14 Sep 2017 09:06:38 +0900 > Add a new compatible string for the R8A77995 (R-Car D3) RAVB. > > Acked-by: Geert Uytterhoeven > Signed-off-by: Yoshihiro Shimoda Applied to net-next.
Re: [PATCH] ravb: document R8A77970 bindings
From: Sergei ShtylyovDate: Tue, 12 Sep 2017 23:02:08 +0300 > R-Car V3M (R8A77970) SoC also has the R-Car gen3 compatible EtherAVB > device, so document the SoC specific bindings. > > Signed-off-by: Sergei Shtylyov Applied to net-next.
[PATCH] arm64: defconfig: enable thermal driver for Renesas R-Car Gen3
We want this driver to detect critical temperatures in time. Signed-off-by: Wolfram Sang--- arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig index a83012a7f4b83d..1eb0544699272e 100644 --- a/arch/arm64/configs/defconfig +++ b/arch/arm64/configs/defconfig @@ -316,6 +316,7 @@ CONFIG_CPU_THERMAL=y CONFIG_THERMAL_EMULATION=y CONFIG_BRCMSTB_THERMAL=m CONFIG_EXYNOS_THERMAL=y +CONFIG_RCAR_GEN3_THERMAL=y CONFIG_ROCKCHIP_THERMAL=m CONFIG_WATCHDOG=y CONFIG_S3C2410_WATCHDOG=y -- 2.11.0
Re: [PATCH/RFC 1/3] dt-bindings: i2c: i2c-gpio: Add support for named gpios
On Thu, Sep 7, 2017 at 6:42 AM, Geert Uytterhoevenwrote: > Hi Rob, > > On Thu, Aug 31, 2017 at 7:55 PM, Rob Herring wrote: >> On Thu, Aug 24, 2017 at 11:21:12AM +0200, Geert Uytterhoeven wrote: >>> The current i2c-gpio DT bindings use a single unnamed "gpios" property >>> to refer to the SDA and SCL signal lines by index. This is error-prone >>> for the casual DT writer and reviewer, as one has to look up the order >>> in the DT bindings. >>> >>> Fix this by amending the DT bindings to use two separate named gpios >>> properties, and deprecate the old unnamed variant. >>> >>> Signed-off-by: Geert Uytterhoeven >>> --- >>> Documentation/devicetree/bindings/i2c/i2c-gpio.txt | 5 +++-- >>> 1 file changed, 3 insertions(+), 2 deletions(-) >>> >>> diff --git a/Documentation/devicetree/bindings/i2c/i2c-gpio.txt >>> b/Documentation/devicetree/bindings/i2c/i2c-gpio.txt >>> index 4f8ec947c6bd9cad..61033f73577dd70e 100644 >>> --- a/Documentation/devicetree/bindings/i2c/i2c-gpio.txt >>> +++ b/Documentation/devicetree/bindings/i2c/i2c-gpio.txt >>> @@ -2,8 +2,9 @@ Device-Tree bindings for i2c gpio driver >>> >>> Required properties: >>> - compatible = "i2c-gpio"; >>> - - gpios: sda and scl gpio >>> - >>> + - sda-gpios: gpio used for the sda signal >>> + - scl-gpios: gpio used for the scl signal >>> + - gpios: sda and scl gpio, alternative for {sda,scl}-gpios >>> (deprecated) >>> >>> Optional properties: >>> - i2c-gpio,sda-open-drain: sda as open drain >> >> Well, if we're going to change things, we should drop these open-drain >> properties. We have open-drain flags in gpio cells, so we don't need >> these I think. > > It depends. Some GPIO controllers use #gpio-cells = 1, lacking flags. We should stop allowing that or at least require that anyone using i2c-gpio have flags. If they are added this new i2c-gpio binding, then they can add flags too. > Furthermore, the gpio-specifiers are controller-specific, and not all GPIO > controllers supporting flags follow the semi-standard flag definitions in > . In theory yes, but reality is pretty much everyone follows it. There's no other way to specify active high vs. low for example. Furthermore, if someone wanted to do flags in their own custom way, that would still work. It is still the controller (or GPIO core) that interprets the flags, not the client. This is a new binding, so only new DT will have it and we can apply new standards. Rob
RE: [PATCH 4/8] ARM: dts: iwg22d: Enable SDHI0 controller
Hi Simon, Apologies for the delay in getting back to you. > -Original Message- > From: Simon Horman [mailto:ho...@verge.net.au] > Sent: 15 September 2017 09:06 > To: Chris Paterson> Cc: Rob Herring ; Mark Rutland ; > Magnus Damm ; > Russell King ; Fabrizio Castro > ; devicet...@vger.kernel.org; linux-renesas- > s...@vger.kernel.org; linux-arm-ker...@lists.infradead.org > Subject: Re: [PATCH 4/8] ARM: dts: iwg22d: Enable SDHI0 controller > > On Wed, Sep 13, 2017 at 06:05:37PM +0100, Chris Paterson wrote: > > From: Fabrizio Castro > > > > Enable the SDHI0 controller on iWave RZ/G1E carrier board. > > ... > > > @@ -63,3 +88,15 @@ > > micrel,led-mode = <1>; > > }; > > }; > > + > > + { > > +pinctrl-0 = <_pins>; > > +pinctrl-1 = <_pins_uhs>; > > +pinctrl-names = "default", "state_uhs"; > > + > > +vmmc-supply = <_3p3v>; > > +vqmmc-supply = <_sdhi0>; > > +cd-gpios = < 6 GPIO_ACTIVE_LOW>; > > I take that the absence of a wp-gpio means that that this is a µSD slot. > Could you help me by documenting this correctly on > http://elinux.org/index.php?title=Renesas-MMC-Enabled-Speeds ? > > For some reason I thought that SDHI0 wasn't exposed at all, so I guess > my reading of the documentation was incorrect. > > > I think you also want sd-uhs-sdr50 here too. > You can test it by removing the sd-uhs-sdr104 property. Whilst playing with uhs properties I have noticed that with the version of the DT I was using I couldn't put sdhi0 into an uhs mode and that was down to the fact that the driver wasn't driving the regulator to 1.8V. This happens because (in my case) the power regulator gets probed after the sdhi does, and the sdhi code doesn't seem to deal with it. Am I the only one with this problem or is it a known problem? Thanks, Fabrizio > > > +sd-uhs-sdr104; > > +status = "okay"; > > +}; > > -- > > 1.9.1 > > Renesas Electronics Europe Ltd, Dukes Meadow, Millboard Road, Bourne End, Buckinghamshire, SL8 5FH, UK. Registered in England & Wales under Registered No. 04586709.
[PATCH] arm64: dts: salvator-common: add 12V regulator to backlight
This fixes the warning "pwm-backlight backlight: backlight supply power not found, using dummy regulator". Fixes: b33be33670217533 ("arm64: dts: salvator-x: Add panel backlight support") Reported-by: Geert UytterhoevenSigned-off-by: Ulrich Hecht --- arch/arm64/boot/dts/renesas/salvator-common.dtsi | 10 ++ 1 file changed, 10 insertions(+) diff --git a/arch/arm64/boot/dts/renesas/salvator-common.dtsi b/arch/arm64/boot/dts/renesas/salvator-common.dtsi index e3d8310..fa2a1f7 100644 --- a/arch/arm64/boot/dts/renesas/salvator-common.dtsi +++ b/arch/arm64/boot/dts/renesas/salvator-common.dtsi @@ -63,6 +63,7 @@ brightness-levels = <256 128 64 16 8 4 0>; default-brightness-level = <6>; + power-supply = <_12v>; enable-gpios = < 7 GPIO_ACTIVE_HIGH>; }; @@ -107,6 +108,15 @@ regulator-always-on; }; + reg_12v: regulator2 { + compatible = "regulator-fixed"; + regulator-name = "fixed-12V"; + regulator-min-microvolt = <1200>; + regulator-max-microvolt = <1200>; + regulator-boot-on; + regulator-always-on; + }; + rsnd_ak4613: sound { compatible = "simple-audio-card"; -- 2.7.4
[PATCH v3 07/12] ARM: dts: r8a7740: Remove CMT renesas,channels-mask
From: Magnus DammUpdate the DTS to remove the now deprecated "renesas,channels-mask" property. The channel information is now kept in the device driver and can easily be determined based on the compat string. Signed-off-by: Magnus Damm Signed-off-by: Geert Uytterhoeven --- v3: - Take over from Magnus, - Split in per-SoC patches, v2: - Rebased on top of power-domain changes, - Added Acked-by and Tested-by from Geert. --- arch/arm/boot/dts/r8a7740.dtsi | 3 --- 1 file changed, 3 deletions(-) diff --git a/arch/arm/boot/dts/r8a7740.dtsi b/arch/arm/boot/dts/r8a7740.dtsi index d37d22682a632035..95c408b11991fb77 100644 --- a/arch/arm/boot/dts/r8a7740.dtsi +++ b/arch/arm/boot/dts/r8a7740.dtsi @@ -74,9 +74,6 @@ clocks = <_clks R8A7740_CLK_CMT1>; clock-names = "fck"; power-domains = <_c5>; - - renesas,channels-mask = <0x3f>; - status = "disabled"; }; -- 2.7.4
[PATCH v3 11/12] ARM: dts: r8a7794: Remove CMT renesas,channels-mask
From: Magnus DammUpdate the DTS to remove the now deprecated "renesas,channels-mask" property. The channel information is now kept in the device driver and can easily be determined based on the compat string. Signed-off-by: Magnus Damm Signed-off-by: Geert Uytterhoeven --- v3: - Take over from Magnus, - Split in per-SoC patches, v2: - Rebased on top of power-domain changes, - Added Acked-by and Tested-by from Geert. --- arch/arm/boot/dts/r8a7794.dtsi | 4 1 file changed, 4 deletions(-) diff --git a/arch/arm/boot/dts/r8a7794.dtsi b/arch/arm/boot/dts/r8a7794.dtsi index fd223607ef81075f..e57335de50880587 100644 --- a/arch/arm/boot/dts/r8a7794.dtsi +++ b/arch/arm/boot/dts/r8a7794.dtsi @@ -189,8 +189,6 @@ power-domains = < R8A7794_PD_ALWAYS_ON>; resets = < 124>; - renesas,channels-mask = <0x60>; - status = "disabled"; }; @@ -210,8 +208,6 @@ power-domains = < R8A7794_PD_ALWAYS_ON>; resets = < 329>; - renesas,channels-mask = <0xff>; - status = "disabled"; }; -- 2.7.4
[PATCH v3 09/12] ARM: dts: r8a7791: Remove CMT renesas,channels-mask
From: Magnus DammUpdate the DTS to remove the now deprecated "renesas,channels-mask" property. The channel information is now kept in the device driver and can easily be determined based on the compat string. Signed-off-by: Magnus Damm Signed-off-by: Geert Uytterhoeven --- v3: - Take over from Magnus, - Split in per-SoC patches, v2: - Rebased on top of power-domain changes, - Added Acked-by and Tested-by from Geert. --- arch/arm/boot/dts/r8a7791.dtsi | 4 1 file changed, 4 deletions(-) diff --git a/arch/arm/boot/dts/r8a7791.dtsi b/arch/arm/boot/dts/r8a7791.dtsi index 09a9a213f90d445b..9b17800f36b1fde0 100644 --- a/arch/arm/boot/dts/r8a7791.dtsi +++ b/arch/arm/boot/dts/r8a7791.dtsi @@ -265,8 +265,6 @@ power-domains = < R8A7791_PD_ALWAYS_ON>; resets = < 124>; - renesas,channels-mask = <0x60>; - status = "disabled"; }; @@ -286,8 +284,6 @@ power-domains = < R8A7791_PD_ALWAYS_ON>; resets = < 329>; - renesas,channels-mask = <0xff>; - status = "disabled"; }; -- 2.7.4
[PATCH v3 05/12] ARM: dts: r8a7794: Update CMT compat strings
From: Magnus DammUse recently updated R-Car Gen2 CMT0 and CMT1 compat strings. With this change in place we can keep device-specific configuration in the driver and the driver can be able to support CMT1 specific features. Signed-off-by: Magnus Damm Acked-by: Laurent Pinchart Signed-off-by: Geert Uytterhoeven --- v3: - Take over from Magnus, - Update compatible values, - Split in per-SoC patches, v2: - Added Acked-by and Tested-by from Geert, - Added Acked-by from Laurent. --- arch/arm/boot/dts/r8a7794.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/boot/dts/r8a7794.dtsi b/arch/arm/boot/dts/r8a7794.dtsi index 035c33715b65a6b7..fd223607ef81075f 100644 --- a/arch/arm/boot/dts/r8a7794.dtsi +++ b/arch/arm/boot/dts/r8a7794.dtsi @@ -180,7 +180,7 @@ }; cmt0: timer@ffca { - compatible = "renesas,cmt-48-gen2"; + compatible = "renesas,r8a7794-cmt0", "renesas,rcar-gen2-cmt0"; reg = <0 0xffca 0 0x1004>; interrupts = , ; @@ -195,7 +195,7 @@ }; cmt1: timer@e613 { - compatible = "renesas,cmt-48-gen2"; + compatible = "renesas,r8a7794-cmt1", "renesas,rcar-gen2-cmt1"; reg = <0 0xe613 0 0x1004>; interrupts = , , -- 2.7.4
[PATCH v3 08/12] ARM: dts: r8a7790: Remove CMT renesas,channels-mask
From: Magnus DammUpdate the DTS to remove the now deprecated "renesas,channels-mask" property. The channel information is now kept in the device driver and can easily be determined based on the compat string. Signed-off-by: Magnus Damm Signed-off-by: Geert Uytterhoeven --- v3: - Take over from Magnus, - Split in per-SoC patches, v2: - Rebased on top of power-domain changes, - Added Acked-by and Tested-by from Geert. --- arch/arm/boot/dts/r8a7790.dtsi | 4 1 file changed, 4 deletions(-) diff --git a/arch/arm/boot/dts/r8a7790.dtsi b/arch/arm/boot/dts/r8a7790.dtsi index 886844bb773114a5..252c9664d0836838 100644 --- a/arch/arm/boot/dts/r8a7790.dtsi +++ b/arch/arm/boot/dts/r8a7790.dtsi @@ -305,8 +305,6 @@ power-domains = < R8A7790_PD_ALWAYS_ON>; resets = < 124>; - renesas,channels-mask = <0x60>; - status = "disabled"; }; @@ -326,8 +324,6 @@ power-domains = < R8A7790_PD_ALWAYS_ON>; resets = < 329>; - renesas,channels-mask = <0xff>; - status = "disabled"; }; -- 2.7.4
[PATCH v3 00/12] ARM: dts: renesas: Update DTS for CMT DT binding rework
Hi Simon, Magnus, This patch series updates the CMT device nodes in the various Renesas DTS files sh_cmt clocksource driver for the recent DT binding rework that was merged in v4.14-rc1. This series is an evolutionary improvement of Magnus Damm's series "[PATCH v2 00/11] clocksource: sh_cmt: DT binding rework V2". It complements Magnus' series "[PATCH v3 00/06] clocksource: sh_cmt: DT binding rework V3" and "[PATCH v4 00/06] clocksource: sh_cmt: DT binding rework V4", which included DT binding updates only. - Patches 1-5 update the compatible values for the CMT0 and CMT1 device nodes on R-Mobile APE6 and R-Car Gen2, - Patches 6-12 remove the now obsolete "renesas,channels-mask" properties from the CMT device nodes on all affected SoCs. Changes compared to v2: - Take over from Magnus, - Update compatible values, - Split in per-SoC patches, Dependencies: - This patch series has a runtime dependency on "[PATCH v3 0/7] clocksource: sh_cmt: Update driver for DT binding rework", and thus must not be applied yet, - Patches were created against renesas-devel-20170918-v4.14-rc1. Thanks! Magnus Damm (12): ARM: dts: r8a73a4: Update CMT compat string ARM: dts: r8a7790: Update CMT compat strings ARM: dts: r8a7791: Update CMT compat strings ARM: dts: r8a7793: Update CMT compat strings ARM: dts: r8a7794: Update CMT compat strings ARM: dts: r8a73a4: Remove CMT renesas,channels-mask ARM: dts: r8a7740: Remove CMT renesas,channels-mask ARM: dts: r8a7790: Remove CMT renesas,channels-mask ARM: dts: r8a7791: Remove CMT renesas,channels-mask ARM: dts: r8a7793: Remove CMT renesas,channels-mask ARM: dts: r8a7794: Remove CMT renesas,channels-mask ARM: dts: sh73a0: Remove CMT renesas,channels-mask arch/arm/boot/dts/r8a73a4.dtsi | 5 + arch/arm/boot/dts/r8a7740.dtsi | 3 --- arch/arm/boot/dts/r8a7790.dtsi | 8 ++-- arch/arm/boot/dts/r8a7791.dtsi | 8 ++-- arch/arm/boot/dts/r8a7793.dtsi | 8 ++-- arch/arm/boot/dts/r8a7794.dtsi | 8 ++-- arch/arm/boot/dts/sh73a0.dtsi | 3 --- 7 files changed, 9 insertions(+), 34 deletions(-) -- 2.7.4 Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds
[PATCH v3 04/12] ARM: dts: r8a7793: Update CMT compat strings
From: Magnus DammUse recently updated R-Car Gen2 CMT0 and CMT1 compat strings. With this change in place we can keep device-specific configuration in the driver and the driver can be able to support CMT1 specific features. Signed-off-by: Magnus Damm Acked-by: Laurent Pinchart Signed-off-by: Geert Uytterhoeven --- v3: - Take over from Magnus, - Update compatible values, - Split in per-SoC patches, v2: - Added Acked-by and Tested-by from Geert, - Added Acked-by from Laurent. --- arch/arm/boot/dts/r8a7793.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/boot/dts/r8a7793.dtsi b/arch/arm/boot/dts/r8a7793.dtsi index aa19b93494bfaab0..41b66bb0747a339e 100644 --- a/arch/arm/boot/dts/r8a7793.dtsi +++ b/arch/arm/boot/dts/r8a7793.dtsi @@ -247,7 +247,7 @@ }; cmt0: timer@ffca { - compatible = "renesas,cmt-48-r8a7793", "renesas,cmt-48-gen2"; + compatible = "renesas,r8a7793-cmt0", "renesas,rcar-gen2-cmt0"; reg = <0 0xffca 0 0x1004>; interrupts = , ; @@ -262,7 +262,7 @@ }; cmt1: timer@e613 { - compatible = "renesas,cmt-48-r8a7793", "renesas,cmt-48-gen2"; + compatible = "renesas,r8a7793-cmt1", "renesas,rcar-gen2-cmt1"; reg = <0 0xe613 0 0x1004>; interrupts = , , -- 2.7.4
[PATCH v3 03/12] ARM: dts: r8a7791: Update CMT compat strings
From: Magnus DammUse recently updated R-Car Gen2 CMT0 and CMT1 compat strings. With this change in place we can keep device-specific configuration in the driver and the driver can be able to support CMT1 specific features. Signed-off-by: Magnus Damm Acked-by: Laurent Pinchart Signed-off-by: Geert Uytterhoeven --- v3: - Take over from Magnus, - Update compatible values, - Split in per-SoC patches, v2: - Added Acked-by and Tested-by from Geert, - Added Acked-by from Laurent. --- arch/arm/boot/dts/r8a7791.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/boot/dts/r8a7791.dtsi b/arch/arm/boot/dts/r8a7791.dtsi index 5a8a158470765d89..09a9a213f90d445b 100644 --- a/arch/arm/boot/dts/r8a7791.dtsi +++ b/arch/arm/boot/dts/r8a7791.dtsi @@ -256,7 +256,7 @@ }; cmt0: timer@ffca { - compatible = "renesas,cmt-48-r8a7791", "renesas,cmt-48-gen2"; + compatible = "renesas,r8a7791-cmt0", "renesas,rcar-gen2-cmt0"; reg = <0 0xffca 0 0x1004>; interrupts = , ; @@ -271,7 +271,7 @@ }; cmt1: timer@e613 { - compatible = "renesas,cmt-48-r8a7791", "renesas,cmt-48-gen2"; + compatible = "renesas,r8a7791-cmt1", "renesas,rcar-gen2-cmt1"; reg = <0 0xe613 0 0x1004>; interrupts = , , -- 2.7.4
[PATCH v3 06/12] ARM: dts: r8a73a4: Remove CMT renesas,channels-mask
From: Magnus DammUpdate the DTS to remove the now deprecated "renesas,channels-mask" property. The channel information is now kept in the device driver and can easily be determined based on the compat string. Signed-off-by: Magnus Damm Signed-off-by: Geert Uytterhoeven --- v3: - Take over from Magnus, - Split in per-SoC patches, v2: - Rebased on top of power-domain changes, - Added Acked-by and Tested-by from Geert. --- arch/arm/boot/dts/r8a73a4.dtsi | 3 --- 1 file changed, 3 deletions(-) diff --git a/arch/arm/boot/dts/r8a73a4.dtsi b/arch/arm/boot/dts/r8a73a4.dtsi index 3d2c218f2bc816a4..f39a94fb36664906 100644 --- a/arch/arm/boot/dts/r8a73a4.dtsi +++ b/arch/arm/boot/dts/r8a73a4.dtsi @@ -137,9 +137,6 @@ clocks = <_clks R8A73A4_CLK_CMT1>; clock-names = "fck"; power-domains = <_c5>; - - renesas,channels-mask = <0xff>; - status = "disabled"; }; -- 2.7.4
[PATCH v3 7/7] clocksource: sh_cmt: Use of_device_get_match_data() helper
Use the existing of_device_get_match_data() helper instead of open-coding its functionality. Signed-off-by: Geert Uytterhoeven--- v3: - New. --- drivers/clocksource/sh_cmt.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/clocksource/sh_cmt.c b/drivers/clocksource/sh_cmt.c index 89c514cf59a44e48..70b3cf8e23d01bd8 100644 --- a/drivers/clocksource/sh_cmt.c +++ b/drivers/clocksource/sh_cmt.c @@ -25,6 +25,7 @@ #include #include #include +#include #include #include #include @@ -956,10 +957,7 @@ static int sh_cmt_setup(struct sh_cmt_device *cmt, struct platform_device *pdev) raw_spin_lock_init(>lock); if (IS_ENABLED(CONFIG_OF) && pdev->dev.of_node) { - const struct of_device_id *id; - - id = of_match_node(sh_cmt_of_table, pdev->dev.of_node); - cmt->info = id->data; + cmt->info = of_device_get_match_data(>dev); cmt->hw_channels = cmt->info->channels_mask; } else if (pdev->dev.platform_data) { struct sh_timer_config *cfg = pdev->dev.platform_data; -- 2.7.4
[PATCH v3 01/12] ARM: dts: r8a73a4: Update CMT compat string
From: Magnus DammUse the recently updated r8a73a4 CMT1 compat string. With this change in place we can keep device-specific configuration in the driver and the driver can be able to support CMT1 specific features. Signed-off-by: Magnus Damm Acked-by: Laurent Pinchart Signed-off-by: Geert Uytterhoeven --- v3: - Take over from Magnus, - Update compatible values, - Split in per-SoC patches, v2: - Added Acked-by and Tested-by from Geert, - Added Acked-by from Laurent. --- arch/arm/boot/dts/r8a73a4.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/r8a73a4.dtsi b/arch/arm/boot/dts/r8a73a4.dtsi index 310222634570d98f..3d2c218f2bc816a4 100644 --- a/arch/arm/boot/dts/r8a73a4.dtsi +++ b/arch/arm/boot/dts/r8a73a4.dtsi @@ -131,7 +131,7 @@ }; cmt1: timer@e613 { - compatible = "renesas,cmt-48-r8a73a4", "renesas,cmt-48-gen2"; + compatible = "renesas,r8a73a4-cmt1", "renesas,rcar-gen2-cmt1"; reg = <0 0xe613 0 0x1004>; interrupts = ; clocks = <_clks R8A73A4_CLK_CMT1>; -- 2.7.4
[PATCH v3 5/7] clocksource: sh_cmt: Mark "renesas,cmt-48-gen2" deprecated
Document in the driver that "renesas,cmt-48-gen2" is deprecated, but still supported for backward compatibility with old DTBs, cfr. commit 4e18111ff38f0664 ("devicetree: bindings: Remove deprecated properties"). Signed-off-by: Geert Uytterhoeven--- v3: - New. --- drivers/clocksource/sh_cmt.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/clocksource/sh_cmt.c b/drivers/clocksource/sh_cmt.c index 8546736e3bc8e961..61a9225097065cc4 100644 --- a/drivers/clocksource/sh_cmt.c +++ b/drivers/clocksource/sh_cmt.c @@ -935,7 +935,11 @@ MODULE_DEVICE_TABLE(platform, sh_cmt_id_table); static const struct of_device_id sh_cmt_of_table[] __maybe_unused = { { .compatible = "renesas,cmt-48", .data = _cmt_info[SH_CMT_48BIT] }, - { .compatible = "renesas,cmt-48-gen2", .data = _cmt_info[SH_CMT0_RCAR_GEN2] }, + { + /* deprecated, preserved for backward compatibility */ + .compatible = "renesas,cmt-48-gen2", + .data = _cmt_info[SH_CMT0_RCAR_GEN2] + }, { .compatible = "renesas,rcar-gen2-cmt0", .data = _cmt_info[SH_CMT0_RCAR_GEN2] }, { .compatible = "renesas,rcar-gen2-cmt1", .data = _cmt_info[SH_CMT1_RCAR_GEN2] }, { } -- 2.7.4
[PATCH v3 6/7] clocksource: sh_cmt: Remove unused "renesas,channels-mask" handling
The in-driver channel configuration in sh_cmt_info.channels_mask is now always set for all CMT devices instantiated from DT. Hence the "renesas,channels-mask" property is no longer checked, and its handling can be removed, cfr. commit 4e18111ff38f0664 ("devicetree: bindings: Remove deprecated properties"). Signed-off-by: Geert Uytterhoeven--- v3: - New. --- drivers/clocksource/sh_cmt.c | 18 +- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/drivers/clocksource/sh_cmt.c b/drivers/clocksource/sh_cmt.c index 61a9225097065cc4..89c514cf59a44e48 100644 --- a/drivers/clocksource/sh_cmt.c +++ b/drivers/clocksource/sh_cmt.c @@ -946,14 +946,6 @@ static const struct of_device_id sh_cmt_of_table[] __maybe_unused = { }; MODULE_DEVICE_TABLE(of, sh_cmt_of_table); -static int sh_cmt_parse_dt(struct sh_cmt_device *cmt) -{ - struct device_node *np = cmt->pdev->dev.of_node; - - return of_property_read_u32(np, "renesas,channels-mask", - >hw_channels); -} - static int sh_cmt_setup(struct sh_cmt_device *cmt, struct platform_device *pdev) { unsigned int mask; @@ -968,15 +960,7 @@ static int sh_cmt_setup(struct sh_cmt_device *cmt, struct platform_device *pdev) id = of_match_node(sh_cmt_of_table, pdev->dev.of_node); cmt->info = id->data; - - /* prefer in-driver channel configuration over DT */ - if (cmt->info->channels_mask) { - cmt->hw_channels = cmt->info->channels_mask; - } else { - ret = sh_cmt_parse_dt(cmt); - if (ret < 0) - return ret; - } + cmt->hw_channels = cmt->info->channels_mask; } else if (pdev->dev.platform_data) { struct sh_timer_config *cfg = pdev->dev.platform_data; const struct platform_device_id *id = pdev->id_entry; -- 2.7.4
[PATCH v3 02/12] ARM: dts: r8a7790: Update CMT compat strings
From: Magnus DammUse recently updated R-Car Gen2 CMT0 and CMT1 compat strings. With this change in place we can keep device-specific configuration in the driver and the driver can be able to support CMT1 specific features. Signed-off-by: Magnus Damm Acked-by: Laurent Pinchart Signed-off-by: Geert Uytterhoeven --- v3: - Take over from Magnus, - Update compatible values, - Split in per-SoC patches, v2: - Added Acked-by and Tested-by from Geert, - Added Acked-by from Laurent. --- arch/arm/boot/dts/r8a7790.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/boot/dts/r8a7790.dtsi b/arch/arm/boot/dts/r8a7790.dtsi index 081cf5cdb13bf2ce..886844bb773114a5 100644 --- a/arch/arm/boot/dts/r8a7790.dtsi +++ b/arch/arm/boot/dts/r8a7790.dtsi @@ -296,7 +296,7 @@ }; cmt0: timer@ffca { - compatible = "renesas,cmt-48-r8a7790", "renesas,cmt-48-gen2"; + compatible = "renesas,r8a7790-cmt0", "renesas,rcar-gen2-cmt0"; reg = <0 0xffca 0 0x1004>; interrupts = , ; @@ -311,7 +311,7 @@ }; cmt1: timer@e613 { - compatible = "renesas,cmt-48-r8a7790", "renesas,cmt-48-gen2"; + compatible = "renesas,r8a7790-cmt1", "renesas,rcar-gen2-cmt1"; reg = <0 0xe613 0 0x1004>; interrupts = , , -- 2.7.4
[PATCH v3 2/7] clocksource: sh_cmt: Use 0x3f mask for SH_CMT_48BIT case
From: Magnus DammAlways use 0x3f as channel mask for the SH_CMT_48BIT type of devices. Once this patch is applied the "renesas,channels-mask" property will be ignored by the driver for older devices matching SH_CMT_48BIT. In the future when all CMT types store channel mask in the driver then we will be able to deprecate and remove "renesas,channels-mask" from DTS. Signed-off-by: Magnus Damm Acked-by: Laurent Pinchart Signed-off-by: Geert Uytterhoeven --- v3: - Take over from Magnus, - Change channels_mask from "unsigned long" to "unsigned int, as it's assigned to sh_cmt_device.hw_channels, which is "unsigned int", v2: - Fixed compile error, - Added Acked-by and Tested-by from Geert, - Added Acked-by from Laurent. --- drivers/clocksource/sh_cmt.c | 14 +++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/drivers/clocksource/sh_cmt.c b/drivers/clocksource/sh_cmt.c index e09e8bf0bb9bf536..c104c80424c88f08 100644 --- a/drivers/clocksource/sh_cmt.c +++ b/drivers/clocksource/sh_cmt.c @@ -74,6 +74,8 @@ enum sh_cmt_model { struct sh_cmt_info { enum sh_cmt_model model; + unsigned int channels_mask; + unsigned long width; /* 16 or 32 bit version of hardware block */ unsigned long overflow_bit; unsigned long clear_bits; @@ -212,6 +214,7 @@ static const struct sh_cmt_info sh_cmt_info[] = { }, [SH_CMT_48BIT] = { .model = SH_CMT_48BIT, + .channels_mask = 0x3f, .width = 32, .overflow_bit = SH_CMT32_CMCSR_CMF, .clear_bits = ~(SH_CMT32_CMCSR_CMF | SH_CMT32_CMCSR_OVF), @@ -966,9 +969,14 @@ static int sh_cmt_setup(struct sh_cmt_device *cmt, struct platform_device *pdev) id = of_match_node(sh_cmt_of_table, pdev->dev.of_node); cmt->info = id->data; - ret = sh_cmt_parse_dt(cmt); - if (ret < 0) - return ret; + /* prefer in-driver channel configuration over DT */ + if (cmt->info->channels_mask) { + cmt->hw_channels = cmt->info->channels_mask; + } else { + ret = sh_cmt_parse_dt(cmt); + if (ret < 0) + return ret; + } } else if (pdev->dev.platform_data) { struct sh_timer_config *cfg = pdev->dev.platform_data; const struct platform_device_id *id = pdev->id_entry; -- 2.7.4
[PATCH v3 12/12] ARM: dts: sh73a0: Remove CMT renesas,channels-mask
From: Magnus DammUpdate the DTS to remove the now deprecated "renesas,channels-mask" property. The channel information is now kept in the device driver and can easily be determined based on the compat string. Signed-off-by: Magnus Damm Signed-off-by: Geert Uytterhoeven --- v3: - Take over from Magnus, - Split in per-SoC patches, v2: - Rebased on top of power-domain changes, - Added Acked-by and Tested-by from Geert. --- arch/arm/boot/dts/sh73a0.dtsi | 3 --- 1 file changed, 3 deletions(-) diff --git a/arch/arm/boot/dts/sh73a0.dtsi b/arch/arm/boot/dts/sh73a0.dtsi index 4ea5c5a16c57eed5..43495792f801d9b3 100644 --- a/arch/arm/boot/dts/sh73a0.dtsi +++ b/arch/arm/boot/dts/sh73a0.dtsi @@ -98,9 +98,6 @@ clocks = <_clks SH73A0_CLK_CMT1>; clock-names = "fck"; power-domains = <_c5>; - - renesas,channels-mask = <0x3f>; - status = "disabled"; }; -- 2.7.4
[PATCH v3 10/12] ARM: dts: r8a7793: Remove CMT renesas,channels-mask
From: Magnus DammUpdate the DTS to remove the now deprecated "renesas,channels-mask" property. The channel information is now kept in the device driver and can easily be determined based on the compat string. Signed-off-by: Magnus Damm Signed-off-by: Geert Uytterhoeven --- v3: - Take over from Magnus, - Split in per-SoC patches, v2: - Rebased on top of power-domain changes, - Added Acked-by and Tested-by from Geert. --- arch/arm/boot/dts/r8a7793.dtsi | 4 1 file changed, 4 deletions(-) diff --git a/arch/arm/boot/dts/r8a7793.dtsi b/arch/arm/boot/dts/r8a7793.dtsi index 41b66bb0747a339e..af91c88e3b5b2482 100644 --- a/arch/arm/boot/dts/r8a7793.dtsi +++ b/arch/arm/boot/dts/r8a7793.dtsi @@ -256,8 +256,6 @@ power-domains = < R8A7793_PD_ALWAYS_ON>; resets = < 124>; - renesas,channels-mask = <0x60>; - status = "disabled"; }; @@ -277,8 +275,6 @@ power-domains = < R8A7793_PD_ALWAYS_ON>; resets = < 329>; - renesas,channels-mask = <0xff>; - status = "disabled"; }; -- 2.7.4
[PATCH v3 0/7] clocksource: sh_cmt: Update driver for DT binding rework
Hi Daniel, Thomas, Rob, Mark, Magnus, This patch series updates the sh_cmt clocksource driver for the recent DT binding rework that was merged in v4.14-rc1. This series is an evolutionary improvement of Magnus Damm's series "[PATCH v2 00/11] clocksource: sh_cmt: DT binding rework V2". It complements Magnus' series "[PATCH v3 00/06] clocksource: sh_cmt: DT binding rework V3" and "[PATCH v4 00/06] clocksource: sh_cmt: DT binding rework V4", which included DT binding updates only. - Patch 1 fixes wrong vendor/soc ordering in the SoC-specific compatible values (This issue was raised during review before, but was not addressed in later iterations of the DT binding rework. Oh well, things like that happen when there's more than 2 years between initial submission and acceptance...), - Patches 2 to 6 implement the updated DT bindings, as already accepted upstream, and amended in patch 1. - Patch 7 is a small cleanup. Changes compared to v2: - Take over from Magnus, - Drop DT binding updates that were revised and accepted upstream, - Fix SoC-specific compatible values, - Change channels_mask from "unsigned long" to "unsigned int, - Remove support for "renesas,cmt-32*", - Mark "renesas,cmt-48-gen2" deprecated, - Remove unused "renesas,channels-mask" handling, - Use of_device_get_match_data() helper. Thanks! Geert Uytterhoeven (5): dt-bindings: timer: renesas,cmt: Fix SoC-specific compatible values clocksource: sh_cmt: Remove support for "renesas,cmt-32*" clocksource: sh_cmt: Mark "renesas,cmt-48-gen2" deprecated clocksource: sh_cmt: Remove unused "renesas,channels-mask" handling clocksource: sh_cmt: Use of_device_get_match_data() helper Magnus Damm (2): clocksource: sh_cmt: Use 0x3f mask for SH_CMT_48BIT case clocksource: sh_cmt: Support separate R-Car Gen2 CMT0/1 .../devicetree/bindings/timer/renesas,cmt.txt | 24 +++ drivers/clocksource/sh_cmt.c | 76 ++ 2 files changed, 45 insertions(+), 55 deletions(-) -- 2.7.4 Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds
[PATCH v3 4/7] clocksource: sh_cmt: Remove support for "renesas,cmt-32*"
Remove driver matching support for the unused "renesas,cmt-32" and "renesas,cmt-32-fast" compatible values, cfr. commit 203bb3479958c48a ("devicetree: bindings: Remove unused 32-bit CMT bindings"). As this removes the last user of SH_CMT_32BIT_FAST, all support for this variant is removed from the driver. Signed-off-by: Geert Uytterhoeven--- v3: - New. --- drivers/clocksource/sh_cmt.c | 20 1 file changed, 20 deletions(-) diff --git a/drivers/clocksource/sh_cmt.c b/drivers/clocksource/sh_cmt.c index 45af436483f39cb0..8546736e3bc8e961 100644 --- a/drivers/clocksource/sh_cmt.c +++ b/drivers/clocksource/sh_cmt.c @@ -66,7 +66,6 @@ struct sh_cmt_device; enum sh_cmt_model { SH_CMT_16BIT, SH_CMT_32BIT, - SH_CMT_32BIT_FAST, SH_CMT_48BIT, SH_CMT0_RCAR_GEN2, SH_CMT1_RCAR_GEN2, @@ -203,16 +202,6 @@ static const struct sh_cmt_info sh_cmt_info[] = { .read_count = sh_cmt_read32, .write_count = sh_cmt_write32, }, - [SH_CMT_32BIT_FAST] = { - .model = SH_CMT_32BIT_FAST, - .width = 32, - .overflow_bit = SH_CMT32_CMCSR_CMF, - .clear_bits = ~(SH_CMT32_CMCSR_CMF | SH_CMT32_CMCSR_OVF), - .read_control = sh_cmt_read16, - .write_control = sh_cmt_write16, - .read_count = sh_cmt_read32, - .write_count = sh_cmt_write32, - }, [SH_CMT_48BIT] = { .model = SH_CMT_48BIT, .channels_mask = 0x3f, @@ -890,13 +879,6 @@ static int sh_cmt_setup_channel(struct sh_cmt_channel *ch, unsigned int index, case SH_CMT_48BIT: ch->ioctrl = cmt->mapbase + 0x10 + ch->hwidx * 0x10; break; - case SH_CMT_32BIT_FAST: - /* -* The 32-bit "fast" timer has a single channel at hwidx 5 but -* is located at offset 0x40 instead of 0x60 for some reason. -*/ - ch->ioctrl = cmt->mapbase + 0x40; - break; case SH_CMT0_RCAR_GEN2: case SH_CMT1_RCAR_GEN2: ch->iostart = cmt->mapbase + ch->hwidx * 0x100; @@ -952,8 +934,6 @@ static const struct platform_device_id sh_cmt_id_table[] = { MODULE_DEVICE_TABLE(platform, sh_cmt_id_table); static const struct of_device_id sh_cmt_of_table[] __maybe_unused = { - { .compatible = "renesas,cmt-32", .data = _cmt_info[SH_CMT_32BIT] }, - { .compatible = "renesas,cmt-32-fast", .data = _cmt_info[SH_CMT_32BIT_FAST] }, { .compatible = "renesas,cmt-48", .data = _cmt_info[SH_CMT_48BIT] }, { .compatible = "renesas,cmt-48-gen2", .data = _cmt_info[SH_CMT0_RCAR_GEN2] }, { .compatible = "renesas,rcar-gen2-cmt0", .data = _cmt_info[SH_CMT0_RCAR_GEN2] }, -- 2.7.4
[PATCH v3 1/7] dt-bindings: timer: renesas,cmt: Fix SoC-specific compatible values
While the new family-specific compatible values introduced by commit 6f54cc1adcc8957f ("devicetree: bindings: R-Car Gen2 CMT0 and CMT1 bindings") use the recommended order ",-", the new SoC-specific compatible values still use the old and deprecated order ",-". Switch the SoC-specific compatible values to the recommended order while there are no upstream users of these compatible values yet. Fixes: 7f03a0ecfdc786c1 ("devicetree: bindings: r8a73a4 and R-Car Gen2 CMT bindings") Fixes: 63d9e8ca0dd4bfa4 ("devicetree: bindings: Deprecate property, update example") Signed-off-by: Geert Uytterhoeven--- v3: - New. --- .../devicetree/bindings/timer/renesas,cmt.txt | 24 +++--- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/Documentation/devicetree/bindings/timer/renesas,cmt.txt b/Documentation/devicetree/bindings/timer/renesas,cmt.txt index 6ca6b9e582a0e803..d740989eb56981cb 100644 --- a/Documentation/devicetree/bindings/timer/renesas,cmt.txt +++ b/Documentation/devicetree/bindings/timer/renesas,cmt.txt @@ -20,16 +20,16 @@ Required Properties: (CMT1 on sh73a0 and r8a7740) This is a fallback for the above renesas,cmt-48-* entries. -- "renesas,cmt0-r8a73a4" for the 32-bit CMT0 device included in r8a73a4. -- "renesas,cmt1-r8a73a4" for the 48-bit CMT1 device included in r8a73a4. -- "renesas,cmt0-r8a7790" for the 32-bit CMT0 device included in r8a7790. -- "renesas,cmt1-r8a7790" for the 48-bit CMT1 device included in r8a7790. -- "renesas,cmt0-r8a7791" for the 32-bit CMT0 device included in r8a7791. -- "renesas,cmt1-r8a7791" for the 48-bit CMT1 device included in r8a7791. -- "renesas,cmt0-r8a7793" for the 32-bit CMT0 device included in r8a7793. -- "renesas,cmt1-r8a7793" for the 48-bit CMT1 device included in r8a7793. -- "renesas,cmt0-r8a7794" for the 32-bit CMT0 device included in r8a7794. -- "renesas,cmt1-r8a7794" for the 48-bit CMT1 device included in r8a7794. +- "renesas,r8a73a4-cmt0" for the 32-bit CMT0 device included in r8a73a4. +- "renesas,r8a73a4-cmt1" for the 48-bit CMT1 device included in r8a73a4. +- "renesas,r8a7790-cmt0" for the 32-bit CMT0 device included in r8a7790. +- "renesas,r8a7790-cmt1" for the 48-bit CMT1 device included in r8a7790. +- "renesas,r8a7791-cmt0" for the 32-bit CMT0 device included in r8a7791. +- "renesas,r8a7791-cmt1" for the 48-bit CMT1 device included in r8a7791. +- "renesas,r8a7793-cmt0" for the 32-bit CMT0 device included in r8a7793. +- "renesas,r8a7793-cmt1" for the 48-bit CMT1 device included in r8a7793. +- "renesas,r8a7794-cmt0" for the 32-bit CMT0 device included in r8a7794. +- "renesas,r8a7794-cmt1" for the 48-bit CMT1 device included in r8a7794. - "renesas,rcar-gen2-cmt0" for 32-bit CMT0 devices included in R-Car Gen2. - "renesas,rcar-gen2-cmt1" for 48-bit CMT1 devices included in R-Car Gen2. @@ -46,7 +46,7 @@ Required Properties: Example: R8A7790 (R-Car H2) CMT0 and CMT1 nodes cmt0: timer@ffca { - compatible = "renesas,cmt0-r8a7790", "renesas,rcar-gen2-cmt0"; + compatible = "renesas,r8a7790-cmt0", "renesas,rcar-gen2-cmt0"; reg = <0 0xffca 0 0x1004>; interrupts = <0 142 IRQ_TYPE_LEVEL_HIGH>, <0 142 IRQ_TYPE_LEVEL_HIGH>; @@ -55,7 +55,7 @@ Example: R8A7790 (R-Car H2) CMT0 and CMT1 nodes }; cmt1: timer@e613 { - compatible = "renesas,cmt1-r8a7790", "renesas,rcar-gen2-cmt1"; + compatible = "renesas,r8a7790-cmt1", "renesas,rcar-gen2-cmt1"; reg = <0 0xe613 0 0x1004>; interrupts = <0 120 IRQ_TYPE_LEVEL_HIGH>, <0 121 IRQ_TYPE_LEVEL_HIGH>, -- 2.7.4
[PATCH v3 3/7] clocksource: sh_cmt: Support separate R-Car Gen2 CMT0/1
From: Magnus DammAdd support for the new R-Car Gen2 CMT0 and CMT1 bindings. Support for the old DT binding is still kept around, however devices using such binding will be treated as a low-feature CMT0 device. If users want to make use of CMT1-specific features then they need to update their DTBs. No special CMT1-specific features are however implemented by his patch, only DT bindings are redone as groundwork for future feature patches. Signed-off-by: Magnus Damm Acked-by: Laurent Pinchart Signed-off-by: Geert Uytterhoeven --- v3: - Take over from Magnus, - Update compatible values, v2: - Added Acked-by and Tested-by from Geert, - Added Acked-by from Laurent. --- drivers/clocksource/sh_cmt.c | 38 +++--- 1 file changed, 27 insertions(+), 11 deletions(-) diff --git a/drivers/clocksource/sh_cmt.c b/drivers/clocksource/sh_cmt.c index c104c80424c88f08..45af436483f39cb0 100644 --- a/drivers/clocksource/sh_cmt.c +++ b/drivers/clocksource/sh_cmt.c @@ -39,16 +39,16 @@ struct sh_cmt_device; * SoC but also on the particular instance. The following table lists the main * characteristics of those flavours. * - * 16B 32B 32B-F 48B 48B-2 + * 16B 32B 32B-F 48B R-Car Gen2 * - * Channels2 1/4 1 6 2/8 * Control Width 16 16 16 16 32 * Counter Width 16 32 32 32/48 32/48 * Shared Start/Stop Y Y Y Y N * - * The 48-bit gen2 version has a per-channel start/stop register located in the - * channel registers block. All other versions have a shared start/stop register - * located in the global space. + * The r8a73a4 / R-Car Gen2 version has a per-channel start/stop register + * located in the channel registers block. All other versions have a shared + * start/stop register located in the global space. * * Channels are indexed from 0 to N-1 in the documentation. The channel index * infers the start/stop bit position in the control register and the channel @@ -68,7 +68,8 @@ enum sh_cmt_model { SH_CMT_32BIT, SH_CMT_32BIT_FAST, SH_CMT_48BIT, - SH_CMT_48BIT_GEN2, + SH_CMT0_RCAR_GEN2, + SH_CMT1_RCAR_GEN2, }; struct sh_cmt_info { @@ -223,8 +224,20 @@ static const struct sh_cmt_info sh_cmt_info[] = { .read_count = sh_cmt_read32, .write_count = sh_cmt_write32, }, - [SH_CMT_48BIT_GEN2] = { - .model = SH_CMT_48BIT_GEN2, + [SH_CMT0_RCAR_GEN2] = { + .model = SH_CMT0_RCAR_GEN2, + .channels_mask = 0x60, + .width = 32, + .overflow_bit = SH_CMT32_CMCSR_CMF, + .clear_bits = ~(SH_CMT32_CMCSR_CMF | SH_CMT32_CMCSR_OVF), + .read_control = sh_cmt_read32, + .write_control = sh_cmt_write32, + .read_count = sh_cmt_read32, + .write_count = sh_cmt_write32, + }, + [SH_CMT1_RCAR_GEN2] = { + .model = SH_CMT1_RCAR_GEN2, + .channels_mask = 0xff, .width = 32, .overflow_bit = SH_CMT32_CMCSR_CMF, .clear_bits = ~(SH_CMT32_CMCSR_CMF | SH_CMT32_CMCSR_OVF), @@ -862,6 +875,7 @@ static int sh_cmt_setup_channel(struct sh_cmt_channel *ch, unsigned int index, ch->cmt = cmt; ch->index = index; ch->hwidx = hwidx; + ch->timer_bit = hwidx; /* * Compute the address of the channel control register block. For the @@ -883,9 +897,11 @@ static int sh_cmt_setup_channel(struct sh_cmt_channel *ch, unsigned int index, */ ch->ioctrl = cmt->mapbase + 0x40; break; - case SH_CMT_48BIT_GEN2: + case SH_CMT0_RCAR_GEN2: + case SH_CMT1_RCAR_GEN2: ch->iostart = cmt->mapbase + ch->hwidx * 0x100; ch->ioctrl = ch->iostart + 0x10; + ch->timer_bit = 0; break; } @@ -897,8 +913,6 @@ static int sh_cmt_setup_channel(struct sh_cmt_channel *ch, unsigned int index, ch->match_value = ch->max_match_value; raw_spin_lock_init(>lock); - ch->timer_bit = cmt->info->model == SH_CMT_48BIT_GEN2 ? 0 : ch->hwidx; - ret = sh_cmt_register(ch, dev_name(>pdev->dev), clockevent, clocksource); if (ret) { @@ -941,7 +955,9 @@ static const struct of_device_id sh_cmt_of_table[] __maybe_unused = { { .compatible = "renesas,cmt-32", .data = _cmt_info[SH_CMT_32BIT] }, { .compatible = "renesas,cmt-32-fast", .data = _cmt_info[SH_CMT_32BIT_FAST] }, { .compatible = "renesas,cmt-48", .data =
Re: [PATCH v3 01/18] arm: shmobile: Document Kingfisher board DT bindings
On Mon, Sep 18, 2017 at 10:51:39AM +0200, Geert Uytterhoeven wrote: > On Sat, Sep 16, 2017 at 8:48 PM, Vladimir Barinov >wrote: > > Add Kingfisher Device tree bindings Documentation, listing it as a > > supported board. > > Kingfisher is the H3ULCB/M3ULCB extension board. > > > > Signed-off-by: Vladimir Barinov > > Acked-by: Geert Uytterhoeven Thanks, applied.
Re: [PATCH v2 4/8] arm64: dts: renesas: r8a77970: add [H]SCIF support
On Mon, Sep 18, 2017 at 10:49:46AM +0200, Geert Uytterhoeven wrote: > On Fri, Sep 15, 2017 at 9:43 PM, Sergei Shtylyov >wrote: > > Describe [H]SCIF ports in the R8A77970 device tree. > > > > Based on the original (and large) patch by Daisuke Matsushita > > . > > > > Signed-off-by: Vladimir Barinov > > Signed-off-by: Sergei Shtylyov > > Reviewed-by: Geert Uytterhoeven Thanks, applied.
Re: [PATCH v2 5/8] arm64: dts: renesas: r8a77970: add EtherAVB support
On Fri, Sep 15, 2017 at 10:43:23PM +0300, Sergei Shtylyov wrote: > Define the generic R8A77970 part of the EtherAVB device node. > > Based on the original (and large) patch by Daisuke Matsushita >. > > Signed-off-by: Vladimir Barinov > Signed-off-by: Sergei Shtylyov > Reviewed-by: Geert Uytterhoeven Thanks, applied.
Re: [renesas:arm64-dt-for-v4.15 47/48] Error: arch/arm64/boot/dts/renesas/r8a77995.dtsi:153.27-28 syntax error
On Mon, Sep 18, 2017 at 10:44:35AM +0200, Geert Uytterhoeven wrote: > Hi Simon, > > On Mon, Sep 18, 2017 at 10:42 AM, Simon Hormanwrote: > > On Fri, Sep 15, 2017 at 07:35:56PM +0200, Geert Uytterhoeven wrote: > >> On Fri, Sep 15, 2017 at 4:10 PM, kbuild test robot > >> wrote: > >> > tree: > >> > https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas.git > >> > arm64-dt-for-v4.15 > >> > head: 815e3b5923c6a8c6614d0d4d3bcba532402b1de4 > >> > commit: ddd7da4b39f805a8050ee662cc72a2c7f53160f5 [47/48] arm64: dts: > >> > renesas: r8a77995: add GPIO device nodes > >> > config: arm64-allmodconfig (attached as .config) > >> > compiler: aarch64-linux-gnu-gcc (Debian 6.1.1-9) 6.1.1 20160705 > >> > reproduce: > >> > wget > >> > https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross > >> > -O ~/bin/make.cross > >> > chmod +x ~/bin/make.cross > >> > git checkout ddd7da4b39f805a8050ee662cc72a2c7f53160f5 > >> > # save the attached .config to linux build tree > >> > make.cross ARCH=arm64 > >> > > >> > All errors (new ones prefixed by >>): > >> > > >> >>> Error: arch/arm64/boot/dts/renesas/r8a77995.dtsi:153.27-28 syntax error > >> > >> The definition of R8A77995_PD_ALWAYS_ON doesn't exist yet in that branch. > >> It will have to be rebased on top of v4.14-rc1 on Monday. > > > > During the rebasing I noticed that the following is needed. > > Commit ids are in my local next branch which I plan to push later today. > > > > From: Simon Horman > > Subject: [PATCH] arm64: dts: renesas: r8a77995: include r8a77995-sysc.h > > > > r8a77995-sysc.h is needed by R8A77970_PD_ALWAYS_ON which > > is used in the following commits. I plan to squash this patch > > into the first of those commits. > > > > Fixes: a858b7bbae45 ("arm64: dts: renesas: r8a77995: add GPIO device nodes") > > Fixes: 9aed640c65bc ("arm64: dts: renesas: r8a77995: Add EthernetAVB device > > node") > > Cc: Yoshihiro Shimoda > > Signed-off-by: Simon Horman > > Like https://patchwork.kernel.org/patch/9854907/ ? > That one should be applied first. Thanks, I had forgotten about that. I will apply it.
Re: [PATCH 0/4] arm64: dts: renesas: Add Support for R-Car D3 and Draak
On Thu, Jul 27, 2017 at 05:16:23PM +0200, Simon Horman wrote: > On Thu, Jul 20, 2017 at 02:54:33PM +0200, Geert Uytterhoeven wrote: > > Hi Simon, Magnus, > > > > This patch series adds minimal support for the R-Car D3 SoC and the > > Draak development board, allowing to boot from a ramdisk using a serial > > console. > > > > - The first two patches add DT sources for R-Car D3 and Draak. > > Due to the use of hardcoded constants, they have no further (build) > > dependencies (obviously there is a runtime dependency). > > - The last two patches replace the hardcoded constants by symbols from > > DT binding headers, and thus depend on those headers. Hence it > > should be postponed to v4.15. > > > > For proper operation, this depends on the 3 series I have just sent: > > - [PATCH 0/3] arm64: renesas: Base R-Car D3 support, > > I have applied the above patchset for v4.14. > > > - [PATCH 0/4] soc: renesas: Add R-Car D3 support, > > And this one too. > > > - [PATCH 0/4] clk: renesas: Add R-Car D3 support. > > And this one seems to have been acked, so I assume you will > apply it once you are back from holidays. > > So I have applied the first two patches for v4.14. > Please repost the remaining two after v4.13-rc6 at which time I should > be able to queue them up for v4.15. I have now done so.
Re: [PATCH] dt: Add vendor prefix 'shimafuji'
On Thu, Sep 14, 2017 at 4:18 PM, Vladimir Barinovwrote: > Add Shimafuji Electric, Inc. to the list of device tree vendor > prefixes > > Signed-off-by: Vladimir Barinov Acked-by: Geert Uytterhoeven Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds
Re: [PATCH v3 01/18] arm: shmobile: Document Kingfisher board DT bindings
On Sat, Sep 16, 2017 at 8:48 PM, Vladimir Barinovwrote: > Add Kingfisher Device tree bindings Documentation, listing it as a > supported board. > Kingfisher is the H3ULCB/M3ULCB extension board. > > Signed-off-by: Vladimir Barinov Acked-by: Geert Uytterhoeven Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds
Re: [PATCH v2 4/8] arm64: dts: renesas: r8a77970: add [H]SCIF support
On Fri, Sep 15, 2017 at 9:43 PM, Sergei Shtylyovwrote: > Describe [H]SCIF ports in the R8A77970 device tree. > > Based on the original (and large) patch by Daisuke Matsushita > . > > Signed-off-by: Vladimir Barinov > Signed-off-by: Sergei Shtylyov Reviewed-by: Geert Uytterhoeven Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds
Re: [renesas:arm64-dt-for-v4.15 47/48] Error: arch/arm64/boot/dts/renesas/r8a77995.dtsi:153.27-28 syntax error
Hi Simon, On Mon, Sep 18, 2017 at 10:42 AM, Simon Hormanwrote: > On Fri, Sep 15, 2017 at 07:35:56PM +0200, Geert Uytterhoeven wrote: >> On Fri, Sep 15, 2017 at 4:10 PM, kbuild test robot >> wrote: >> > tree: https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas.git >> > arm64-dt-for-v4.15 >> > head: 815e3b5923c6a8c6614d0d4d3bcba532402b1de4 >> > commit: ddd7da4b39f805a8050ee662cc72a2c7f53160f5 [47/48] arm64: dts: >> > renesas: r8a77995: add GPIO device nodes >> > config: arm64-allmodconfig (attached as .config) >> > compiler: aarch64-linux-gnu-gcc (Debian 6.1.1-9) 6.1.1 20160705 >> > reproduce: >> > wget >> > https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross >> > -O ~/bin/make.cross >> > chmod +x ~/bin/make.cross >> > git checkout ddd7da4b39f805a8050ee662cc72a2c7f53160f5 >> > # save the attached .config to linux build tree >> > make.cross ARCH=arm64 >> > >> > All errors (new ones prefixed by >>): >> > >> >>> Error: arch/arm64/boot/dts/renesas/r8a77995.dtsi:153.27-28 syntax error >> >> The definition of R8A77995_PD_ALWAYS_ON doesn't exist yet in that branch. >> It will have to be rebased on top of v4.14-rc1 on Monday. > > During the rebasing I noticed that the following is needed. > Commit ids are in my local next branch which I plan to push later today. > > From: Simon Horman > Subject: [PATCH] arm64: dts: renesas: r8a77995: include r8a77995-sysc.h > > r8a77995-sysc.h is needed by R8A77970_PD_ALWAYS_ON which > is used in the following commits. I plan to squash this patch > into the first of those commits. > > Fixes: a858b7bbae45 ("arm64: dts: renesas: r8a77995: add GPIO device nodes") > Fixes: 9aed640c65bc ("arm64: dts: renesas: r8a77995: Add EthernetAVB device > node") > Cc: Yoshihiro Shimoda > Signed-off-by: Simon Horman Like https://patchwork.kernel.org/patch/9854907/ ? That one should be applied first. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds
Re: [renesas:arm64-dt-for-v4.15 47/48] Error: arch/arm64/boot/dts/renesas/r8a77995.dtsi:153.27-28 syntax error
On Fri, Sep 15, 2017 at 07:35:56PM +0200, Geert Uytterhoeven wrote: > On Fri, Sep 15, 2017 at 4:10 PM, kbuild test robot >wrote: > > tree: https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas.git > > arm64-dt-for-v4.15 > > head: 815e3b5923c6a8c6614d0d4d3bcba532402b1de4 > > commit: ddd7da4b39f805a8050ee662cc72a2c7f53160f5 [47/48] arm64: dts: > > renesas: r8a77995: add GPIO device nodes > > config: arm64-allmodconfig (attached as .config) > > compiler: aarch64-linux-gnu-gcc (Debian 6.1.1-9) 6.1.1 20160705 > > reproduce: > > wget > > https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O > > ~/bin/make.cross > > chmod +x ~/bin/make.cross > > git checkout ddd7da4b39f805a8050ee662cc72a2c7f53160f5 > > # save the attached .config to linux build tree > > make.cross ARCH=arm64 > > > > All errors (new ones prefixed by >>): > > > >>> Error: arch/arm64/boot/dts/renesas/r8a77995.dtsi:153.27-28 syntax error > > The definition of R8A77995_PD_ALWAYS_ON doesn't exist yet in that branch. > It will have to be rebased on top of v4.14-rc1 on Monday. During the rebasing I noticed that the following is needed. Commit ids are in my local next branch which I plan to push later today. From: Simon Horman Subject: [PATCH] arm64: dts: renesas: r8a77995: include r8a77995-sysc.h r8a77995-sysc.h is needed by R8A77970_PD_ALWAYS_ON which is used in the following commits. I plan to squash this patch into the first of those commits. Fixes: a858b7bbae45 ("arm64: dts: renesas: r8a77995: add GPIO device nodes") Fixes: 9aed640c65bc ("arm64: dts: renesas: r8a77995: Add EthernetAVB device node") Cc: Yoshihiro Shimoda Signed-off-by: Simon Horman --- arch/arm64/boot/dts/renesas/r8a77995.dtsi | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/boot/dts/renesas/r8a77995.dtsi b/arch/arm64/boot/dts/renesas/r8a77995.dtsi index 3d477b9d702d..7da4ec188480 100644 --- a/arch/arm64/boot/dts/renesas/r8a77995.dtsi +++ b/arch/arm64/boot/dts/renesas/r8a77995.dtsi @@ -11,6 +11,7 @@ #include #include +#include / { compatible = "renesas,r8a77995"; -- 2.1.4
Re: [PATCH v2 7/8] arm64: dts: renesas: initial Eagle board device tree
On Fri, Sep 15, 2017 at 10:43:25PM +0300, Sergei Shtylyov wrote: > Add the initial device tree for the R8A77970 SoC based Eagle board. > The board has 1 debug serial port (SCIF0); include support for it, > so that the serial console can work. > > Based on the original (and large) patch by Vladimir Barinov >. > > Signed-off-by: Vladimir Barinov > Signed-off-by: Sergei Shtylyov > > --- > arch/arm64/boot/dts/renesas/Makefile |1 > arch/arm64/boot/dts/renesas/r8a77970-eagle.dts | 45 > + > 2 files changed, 46 insertions(+) > > Index: renesas/arch/arm64/boot/dts/renesas/Makefile > === > --- renesas.orig/arch/arm64/boot/dts/renesas/Makefile > +++ renesas/arch/arm64/boot/dts/renesas/Makefile > @@ -2,6 +2,7 @@ dtb-$(CONFIG_ARCH_R8A7795) += r8a7795-sa > dtb-$(CONFIG_ARCH_R8A7795) += r8a7795-salvator-xs.dtb > dtb-$(CONFIG_ARCH_R8A7795) += r8a7795-es1-salvator-x.dtb > r8a7795-es1-h3ulcb.dtb > dtb-$(CONFIG_ARCH_R8A7796) += r8a7796-salvator-x.dtb r8a7796-m3ulcb.dtb > +dtb-$(CONFIG_ARCH_R8A77970) += r8a77970-eagle.dtb > dtb-$(CONFIG_ARCH_R8A77995) += r8a77995-draak.dtb Please consider submitting a patch to enable CONFIG_ARCH_R8A77970 in the ARM64 defconfig.
Re: [PATCH v2 3/8] arm64: dts: renesas: r8a77970: add SYS-DMAC support
On Fri, Sep 15, 2017 at 10:43:21PM +0300, Sergei Shtylyov wrote: > Describe SYS-DMAC1/2 in the R8A77970 device tree. > > Based on the original (and large) patch by Daisuke Matsushita >. > > Signed-off-by: Vladimir Barinov > Signed-off-by: Sergei Shtylyov > Reviewed-by: Geert Uytterhoeven Thanks, applied.
Re: [PATCH v2 2/8] arm64: dts: renesas: initial R8A77970 SoC device tree
On Fri, Sep 15, 2017 at 10:43:20PM +0300, Sergei Shtylyov wrote: > The initial R8A77970 SoC device tree including Cortex-A53 CPU, GIC, timer, > CPG, RST, and SYSC. > > Based on the original (and large) patch by Daisuke Matsushita >. > > Signed-off-by: Vladimir Barinov > Signed-off-by: Sergei Shtylyov > Reviewed-by: Geert Uytterhoeven Thanks, applied.
Re: [PATCH v2 1/8] soc: renesas: rcar-sysc: add R8A77970 support
On Fri, Sep 15, 2017 at 10:43:19PM +0300, Sergei Shtylyov wrote: > Add support for R-Car V3M (R8A77970) SoC power areas to the R-Car SYSC > driver. > > Based on the original (and large) patch by Daisuke Matsushita >. > > Signed-off-by: Vladimir Barinov > Signed-off-by: Sergei Shtylyov > Reviewed-by: Geert Uytterhoeven Thanks, applied.
Re: [PATCH 4/4] arm: dts: r8a7790: add cpu capacity-dmips-mhz information
On Wed, Aug 30, 2017 at 03:41:20PM +0100, Dietmar Eggemann wrote: > The following 'capacity-dmips-mhz' dt property values are used: > > Cortex-A15: 1024, Cortex-A7: 539 > > They have been derived form the cpu_efficiency values: > > Cortex-A15: 3891, Cortex-A7: 2048 > > by scaling them so that the Cortex-A15s (big cores) use 1024. > > The cpu_efficiency values were originally derived from the "Big.LITTLE > Processing with ARM Cortex™-A15 & Cortex-A7" white paper > (http://www.cl.cam.ac.uk/~rdm34/big.LITTLE.pdf). Table 1 lists 1.9x > (3891/2048) as the Cortex-A15 vs Cortex-A7 performance ratio for the > Dhrystone benchmark. > > The following platform is affected once cpu-invariant accounting > support is re-connected to the task scheduler: Thanks, applied for v4.15. My understanding from the following comment in the cover letter is that not currently the case and this there is no behavioural change in applying this patch. For the record I observed the following with and without this patch applied. I believe this is the expected result. v4.14-rc1 # cat /sys/devices/system/cpu/cpu*/cpu_capacity 1535 1535 1535 1535 1024 1024 1024 1024 v4.14-rc1 + patch # cat /sys/devices/system/cpu/cpu*/cpu_capacity 1024 1024 1024 1024 539 539 539 539
Re: [PATCH] mmc: sdhci-pci: remove outdated declaration
On 15/09/17 21:13, Wolfram Sang wrote: > The function was removed half a year ago, so this declaration can go, > too. > > Fixes: 51ced59cc02e0d ("mmc: sdhci-pci: Use ACPI DSM to get driver strength > for some Intel devices") > Signed-off-by: Wolfram SangAcked-by: Adrian Hunter > --- > include/linux/mmc/sdhci-pci-data.h | 3 --- > 1 file changed, 3 deletions(-) > > diff --git a/include/linux/mmc/sdhci-pci-data.h > b/include/linux/mmc/sdhci-pci-data.h > index fda15b6d4135d3..618f90d6e1ba1a 100644 > --- a/include/linux/mmc/sdhci-pci-data.h > +++ b/include/linux/mmc/sdhci-pci-data.h > @@ -14,7 +14,4 @@ struct sdhci_pci_data { > > extern struct sdhci_pci_data *(*sdhci_pci_get_data)(struct pci_dev *pdev, > int slotno); > - > -extern int sdhci_pci_spt_drive_strength; > - > #endif >