Re: [PATCH v2] clk: let clk_disable() return immediately if clk is NULL or error

2016-04-07 Thread Masahiro Yamada
Hi Stephen, 2016-04-08 9:33 GMT+09:00 Stephen Boyd : > On 04/05, Masahiro Yamada wrote: >> The clk_disable() in the common clock framework (drivers/clk/clk.c) >> returns immediately if a given clk is NULL or an error pointer. It >> allows clock consumers to call clk_disable() without IS_ERR_OR_N

Re: [PATCH v2] clk: let clk_disable() return immediately if clk is NULL or error

2016-04-07 Thread Stephen Boyd
On 04/05, Masahiro Yamada wrote: > The clk_disable() in the common clock framework (drivers/clk/clk.c) > returns immediately if a given clk is NULL or an error pointer. It > allows clock consumers to call clk_disable() without IS_ERR_OR_NULL > checking if drivers are only used with the common cloc

Re: [PATCH] ARM: dts: r8a7791: Don't disable referenced optional clocks

2016-04-07 Thread Stephen Boyd
On 04/06, Sjoerd Simons wrote: > On Wed, 2016-04-06 at 15:11 +0200, Geert Uytterhoeven wrote: > > CC Mike, Stephen, linux-clk (this time with the new Mike) > > > > On Wed, Apr 6, 2016 at 2:52 PM, Sjoerd Simons > > wrote: > > > > > > clk_get on a disabled clock node will return EPROBE_DEFER, whic

Re: [PATCH] ARM: dts: r8a7791: Don't disable referenced optional clocks

2016-04-07 Thread Sergei Shtylyov
Hello. On 04/07/2016 10:00 AM, Sjoerd Simons wrote: Hey Sergei, Thanks for your review. You're welcome. :-) On Thu, 2016-04-07 at 02:15 +0300, Sergei Shtylyov wrote: On 04/06/2016 03:52 PM, Sjoerd Simons wrote: clk_get on a disabled clock node will return EPROBE_DEFER, which can cau

Re: [PATCH 0/4] clk: renesas: PM Domain Cleanups and Preparation

2016-04-07 Thread Geert Uytterhoeven
On Wed, Mar 9, 2016 at 8:18 PM, Geert Uytterhoeven wrote: > This patch series performs some cleanups related to PM Domains on the > Renesas clock drivers, and prepares the CPG/MSSR driver for the advent > of R-Car SYSC PM Domains. > > Support for the latter will be introduced in 3 patch series: >

[PATCH v4 03/12] ARM: dts: r8a7791: Add SYSC PM Domains

2016-04-07 Thread Geert Uytterhoeven
Add a device node for the System Controller, and hook it up to the CPG/MSTP Clock Domain. Hook up the Cortex-A15 CPU cores and the Cortex-A15 L2 cache/SCU to their respective PM Domains. Signed-off-by: Geert Uytterhoeven --- v4: - Add power-domains property to the sysc node, to refer to the SoC

[PATCH v4 0/7] PM / Domains: Add DT bindings for the R-Car System Controller

2016-04-07 Thread Geert Uytterhoeven
Hi Simon, Magnus, This patch series introduces DT bindings for the R-Car System Controller, as found on Renesas R-Car H1, R-Car Gen2, and R-Car Gen3 SoCs. Changes compared to v3: - Add Reviewed-by, Acked-by, - Compatible value must contain "exactly one" instead of "one or more",

[PATCH v4 09/12] ARM: dts: r8a7791: Use SYSC "always-on" PM Domain

2016-04-07 Thread Geert Uytterhoeven
Hook up all devices that are part of the CPG/MSTP Clock Domain to the SYSC "always-on" PM Domain, for a more consistent device-power-area description in DT. Signed-off-by: Geert Uytterhoeven --- v4: - New. --- arch/arm/boot/dts/r8a7791.dtsi | 146 - 1 fi

[PATCH v4 00/12] ARM/arm64: dts: rcar: Add SYSC PM domains

2016-04-07 Thread Geert Uytterhoeven
Hi Simon, Magnus, This patch series adds the R-Car System Controller to the DTS files for the various Renesas R-Car SoCs, and hooks up devices to their respective PM domains. This is a dependency for the enablement of DU and VSP on R-Car H3, as on this SoC the VSPs are located in a PM Dom

[PATCH v4 1/7] PM / Domains: Add DT bindings for the R-Car System Controller

2016-04-07 Thread Geert Uytterhoeven
The Renesas R-Car System Controller provides power management for the CPU cores and various coprocessors, following the generic PM domain bindings in Documentation/devicetree/bindings/power/power_domain.txt. This supports R-Car Gen1 (H1), Gen2, and Gen3. Signed-off-by: Geert Uytterhoeven Reviewe

[PATCH v4 10/11] soc: renesas: rcar-sysc: Add support for R-Car E2 power areas

2016-04-07 Thread Geert Uytterhoeven
Signed-off-by: Geert Uytterhoeven --- v4: - Rename R8A7794_PD_SH to R8A7794_PD_SH_4A, "sh" to "sh-4a", - Reformat table, v3: - New (converted from DT to C). --- drivers/soc/renesas/Makefile | 2 +- drivers/soc/renesas/r8a7794-sysc.c | 31 +++ drivers/soc/

[PATCH v4 4/7] soc: renesas: Add r8a7791 SYSC PM Domain Binding Definitions

2016-04-07 Thread Geert Uytterhoeven
Signed-off-by: Geert Uytterhoeven Reviewed-by: Laurent Pinchart --- v4: - Add Reviewed-by, - Rename R8A7791_PD_SH to R8A7791_PD_SH_4A, - Add always-on power area, v3: - New. --- include/dt-bindings/power/r8a7791-sysc.h | 26 ++ 1 file changed, 26 insertions(+) c

[PATCH v4 07/11] soc: renesas: rcar-sysc: Add support for R-Car H2 power areas

2016-04-07 Thread Geert Uytterhoeven
Signed-off-by: Geert Uytterhoeven --- v4: - Rename R8A7790_PD_SH to R8A7790_PD_SH_4A, "sh" to "sh-4a", - Reformat table, v3: - New (converted from DT to C). --- drivers/soc/renesas/Makefile | 2 +- drivers/soc/renesas/r8a7790-sysc.c | 45 ++ drive

[PATCH v4 11/11] soc: renesas: rcar-sysc: Add support for R-Car H3 power areas

2016-04-07 Thread Geert Uytterhoeven
Signed-off-by: Geert Uytterhoeven --- v4: - Remove always-on power area, as it's now implicitly handled by the rcar-sysc driver, - Reformat table, v3: - New (converted from DT to C). --- drivers/soc/renesas/Makefile | 1 + drivers/soc/renesas/r8a7795-sysc.c | 53

[PATCH v4 05/11] soc: renesas: rcar-sysc: Enable Clock Domain for r8a7795 I/O devices

2016-04-07 Thread Geert Uytterhoeven
On R-Car H3, some power areas (e.g. A3VP) contain I/O devices, which are also part of the CPG/MSSR Clock Domain. Hook up the CPG/MSSR Clock Domain attach/detach callbacks to enable power management using module clocks. This also allows to support the Clock Domain for devices in the "always-on" po

[PATCH v4 06/11] soc: renesas: rcar-sysc: Add support for R-Car H1 power areas

2016-04-07 Thread Geert Uytterhoeven
Signed-off-by: Geert Uytterhoeven --- v4: - Drop R8A7779_PD_SH, as it's not documented in the datasheet, - Reformat table, v3: - New (converted from DT to C). --- drivers/soc/renesas/Makefile | 2 +- drivers/soc/renesas/r8a7779-sysc.c | 30 ++ drivers/soc

[PATCH v4 6/7] soc: renesas: Add r8a7794 SYSC PM Domain Binding Definitions

2016-04-07 Thread Geert Uytterhoeven
Signed-off-by: Geert Uytterhoeven Reviewed-by: Laurent Pinchart --- v4: - Add Reviewed-by, - Rename R8A7794_PD_SH to R8A7794_PD_SH_4A, - Add always-on power area, v3: - New. --- include/dt-bindings/power/r8a7794-sysc.h | 26 ++ 1 file changed, 26 insertions(+) c

[PATCH v4 04/11] soc: renesas: rcar-sysc: Make rcar_sysc_power_is_off() static

2016-04-07 Thread Geert Uytterhoeven
As of commit b12ff41658171f53 ("ARM: shmobile: r8a7779: Remove legacy PM Domain remainings"), rcar_sysc_power_is_off() is no longer used from SoC-specific code. Signed-off-by: Geert Uytterhoeven Reviewed-by: Laurent Pinchart --- v4: - Add Reviewed-by, v3: - New. --- drivers/soc/renesas/rca

[PATCH v4 10/12] ARM: dts: r8a7793: Use SYSC "always-on" PM Domain

2016-04-07 Thread Geert Uytterhoeven
Hook up all devices that are part of the CPG/MSTP Clock Domain to the SYSC "always-on" PM Domain, for a more consistent device-power-area description in DT. Signed-off-by: Geert Uytterhoeven --- v4: - New. --- arch/arm/boot/dts/r8a7793.dtsi | 96 +- 1 fi

[PATCH v4 12/12] arm64: dts: r8a7795: Use SYSC "always-on" PM Domain

2016-04-07 Thread Geert Uytterhoeven
Hook up all devices that are part of the CPG/MSSR Clock Domain to the SYSC "always-on" PM Domain, for a more consistent device-power-area description in DT. Signed-off-by: Geert Uytterhoeven --- v4: - New, extracted from "[PATCH v3] arm64: dts: r8a7795: Add SYSC PM Domains", - Use "<&sysc

[PATCH v4 02/12] ARM: dts: r8a7790: Add SYSC PM Domains

2016-04-07 Thread Geert Uytterhoeven
Add a device node for the System Controller, and hook it up to the CPG/MSTP Clock Domain. Hook up the Cortex-A15 and Cortex-A7 CPU cores and L2 caches/SCUs to their respective PM Domains. Signed-off-by: Geert Uytterhoeven --- v4: - Add power-domains property to the sysc node, to refer to the So

[PATCH v4 08/12] ARM: dts: r8a7790: Use SYSC "always-on" PM Domain

2016-04-07 Thread Geert Uytterhoeven
Hook up all devices that are part of the CPG/MSTP Clock Domain to the SYSC "always-on" PM Domain, for a more consistent device-power-area description in DT. Signed-off-by: Geert Uytterhoeven --- v4: - New. --- arch/arm/boot/dts/r8a7790.dtsi | 138 - 1 fi

[PATCH v4 04/12] ARM: dts: r8a7793: Add SYSC PM Domains

2016-04-07 Thread Geert Uytterhoeven
Add a device node for the System Controller, and hook it up to the CPG/MSTP Clock Domain. Hook up the first Cortex-A15 CPU core and the Cortex-A15 L2 cache/SCU to their respective PM Domains. Signed-off-by: Geert Uytterhoeven --- v4: - Add power-domains property to the sysc node, to refer to th

[PATCH v4 01/12] ARM: dts: r8a7779: Add SYSC PM Domains

2016-04-07 Thread Geert Uytterhoeven
Add a device node for the System Controller, and hook it up to the CPG/MSTP Clock Domain. Hook up ARM CPU cores 1-3 to their respective PM Domains. Note that ARM CPU core 0 cannot be shut off. Signed-off-by: Geert Uytterhoeven --- v4: - Add power-domains property to the sysc node, to refer to t

[PATCH v4 09/11] soc: renesas: rcar-sysc: Add support for R-Car M2-N power areas

2016-04-07 Thread Geert Uytterhoeven
R-Car M2-N is identical to R-Car M2-W w.r.t. power domains, so reuse the definitions from the latter. Signed-off-by: Geert Uytterhoeven --- v4: - No changes, v3: - New (converted from DT to C). --- drivers/soc/renesas/Makefile| 3 ++- drivers/soc/renesas/rcar-sysc.c | 3 +++ drivers/soc

[PATCH v4 07/12] ARM: dts: r8a7779: Use SYSC "always-on" PM Domain

2016-04-07 Thread Geert Uytterhoeven
Hook up all devices that are part of the CPG/MSTP Clock Domain to the SYSC "always-on" PM Domain, for a more consistent device-power-area description in DT. Signed-off-by: Geert Uytterhoeven --- v4: - New. --- arch/arm/boot/dts/r8a7779.dtsi | 44 +- 1 fi

[PATCH v4 11/12] ARM: dts: r8a7794: Use SYSC "always-on" PM Domain

2016-04-07 Thread Geert Uytterhoeven
Hook up all devices that are part of the CPG/MSTP Clock Domain to the SYSC "always-on" PM Domain, for a more consistent device-power-area description in DT. Signed-off-by: Geert Uytterhoeven --- v4: - New. --- arch/arm/boot/dts/r8a7794.dtsi | 106 - 1 fi

[PATCH v4 05/12] ARM: dts: r8a7794: Add SYSC PM Domains

2016-04-07 Thread Geert Uytterhoeven
Add a device node for the System Controller, and hook it up to the CPG/MSTP Clock Domain. Hook up the Cortex-A7 CPU cores and the Cortex-A7 L2 cache/SCU to their respective PM Domains. Signed-off-by: Geert Uytterhoeven --- v4: - Add power-domains property to the sysc node, to refer to the SoC's

[PATCH v4 06/12] arm64: dts: r8a7795: Add SYSC PM Domains

2016-04-07 Thread Geert Uytterhoeven
Add a device node for the System Controller, and hook it up to the CPG/MSSR Clock Domain. Hook up the Cortex-A57 CPU cores and the Cortex-A57 and Cortex A53 L2 caches/SCUs to their respective PM Domains. Signed-off-by: Geert Uytterhoeven --- v4: - Add power-domains property to the sysc node, to

[PATCH v4 03/11] soc: renesas: rcar-sysc: Add DT support for SYSC PM domains

2016-04-07 Thread Geert Uytterhoeven
Populate the SYSC PM domains from DT, based on the presence of a device node for the System Controller. The actual power area hiearchy, and features of specific areas are obtained from tables in the C code. The SYSCIER and SYSCIMR register values are derived from the power areas present, which wil

[PATCH v4 02/11] soc: renesas: rcar-sysc: Improve rcar_sysc_power() debug info

2016-04-07 Thread Geert Uytterhoeven
Print requested power domain state. Signed-off-by: Geert Uytterhoeven Reviewed-by: Laurent Pinchart --- v4: - No changes, v3: - Add Reviewed-by, v2: - New. --- drivers/soc/renesas/rcar-sysc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/soc/renesas/rcar-sy

[PATCH v4 00/11] soc: renesas: Add R-Car SYSC PM Domain Support

2016-04-07 Thread Geert Uytterhoeven
Hi Simon, Magnus, This patch series introduces a DT-based driver for the R-Car System Controller, as found on Renesas R-Car H1, R-Car Gen2, and R-Car Gen3 SoCs. This is a dependency for the enablement of DU and VSP on R-Car H3, as the VSPs are located in a PM Domain. Changes compared to

[PATCH v4 08/11] soc: renesas: rcar-sysc: Add support for R-Car M2-W power areas

2016-04-07 Thread Geert Uytterhoeven
Signed-off-by: Geert Uytterhoeven --- v4: - Rename R8A7791_PD_SH to R8A7791_PD_SH_4A, "sh" to "sh-4a", - Reformat table, v3: - New (converted from DT to C). --- drivers/soc/renesas/Makefile | 2 +- drivers/soc/renesas/r8a7791-sysc.c | 31 +++ drivers/soc/

[PATCH v4 3/7] soc: renesas: Add r8a7790 SYSC PM Domain Binding Definitions

2016-04-07 Thread Geert Uytterhoeven
Signed-off-by: Geert Uytterhoeven Reviewed-by: Laurent Pinchart --- v4: - Add Reviewed-by, - Rename R8A7790_PD_SH to R8A7790_PD_SH_4A, - Add always-on power area, v3: - New. --- include/dt-bindings/power/r8a7790-sysc.h | 34 1 file changed, 34 insertions

[PATCH v4 5/7] soc: renesas: Add r8a7793 SYSC PM Domain Binding Definitions

2016-04-07 Thread Geert Uytterhoeven
R-Car M2-N is identical to R-Car M2-W w.r.t. power domains, so reuse the definitions from the latter. Signed-off-by: Geert Uytterhoeven --- v4: - Rename R8A7793_PD_SH to R8A7793_PD_SH_4A, - Use the numbers directly, to make the header file self-contained, - Add always-on power area, v3:

[PATCH v4 01/11] soc: renesas: Move pm-rcar to drivers/soc/renesas/rcar-sysc

2016-04-07 Thread Geert Uytterhoeven
Move the pm-rcar driver from arch/arm/mach-shmobile/ to drivers/soc/renesas/, and its header file to include/linux/soc/renesas/, so it can be shared between arm32 (R-Car H1 and Gen2) and arm64 (R-Car Gen3). Rename it to rcar-sysc as it's really a driver for the R-Car System Controller (SYSC). Kill

[PATCH v4 2/7] soc: renesas: Add r8a7779 SYSC PM Domain Binding Definitions

2016-04-07 Thread Geert Uytterhoeven
Signed-off-by: Geert Uytterhoeven Reviewed-by: Laurent Pinchart --- v4: - Add Reviewed-by, - Drop R8A7779_PD_SH, as it's not documented in the datasheet, - Add always-on power area, v3: - New. --- include/dt-bindings/power/r8a7779-sysc.h | 27 +++ 1 file changed,

[PATCH v4 7/7] soc: renesas: Add r8a7795 SYSC PM Domain Binding Definitions

2016-04-07 Thread Geert Uytterhoeven
Signed-off-by: Geert Uytterhoeven Reviewed-by: Laurent Pinchart --- v4: - Add Reviewed-by, v3: - New. --- include/dt-bindings/power/r8a7795-sysc.h | 42 1 file changed, 42 insertions(+) create mode 100644 include/dt-bindings/power/r8a7795-sysc.h diff --git

Re: [PATCH 4/4] clk: renesas: cpg-mssr: Export cpg_mssr_{at,de}tach_dev()

2016-04-07 Thread Geert Uytterhoeven
On Wed, Mar 9, 2016 at 8:18 PM, Geert Uytterhoeven wrote: > The R-Car SYSC PM Domain driver has to power manage devices in power > areas using clocks. To reuse code and to share knowledge of clocks > suitable for power management, this is ideally done through the existing > cpg_mssr_attach_dev() a

Re: [PATCH v3 0/2] phy: rcar-gen2, rcar-gen3-usb2: add fallback binding

2016-04-07 Thread Kishon Vijay Abraham I
Hi, On Friday 25 March 2016 07:39 AM, Simon Horman wrote: > On Mon, Mar 07, 2016 at 10:58:39AM +0900, Simon Horman wrote: >> Add fallback compatibility strings for rcar phy drivers. >> >> In the case of Renesas R-Car hardware we know that there are generations of >> SoCs, e.g. Gen 2 and Gen 3. But

Re: [Bug]:Koelsch: DU, Could not show an image or picture on HDMI display.

2016-04-07 Thread Cao Minh Hiep
Hi Geert-san, On 04/07/2016 03:56 PM, Geert Uytterhoeven wrote: Hi Hiep-san. On Thu, Apr 7, 2016 at 3:10 AM, Cao Minh Hiep wrote: 2. Your Koelsch has U-Boot 46367b1, while mine has b6af5fc. The former disables many MSTP clocks (incl . GPIO), while the latter keeps them enabled, so t

Re: No serial since ARM: dts: r8a7791: Add BRG support for (H)SCIF

2016-04-07 Thread Sjoerd Simons
On Thu, 2016-04-07 at 01:22 +0300, Sergei Shtylyov wrote: > On 04/06/2016 11:05 PM, Sergei Shtylyov wrote: >  > > > > > > But see also Geerts comment on the > > > relevant thread where he nicely pinpoint what triggered that > > > behaviour. > > > That said I do find it a bit odd to refer to disabl

Re: [PATCH] ARM: dts: r8a7791: Don't disable referenced optional clocks

2016-04-07 Thread Sjoerd Simons
Hey Sergei, Thanks for your review. On Thu, 2016-04-07 at 02:15 +0300, Sergei Shtylyov wrote: > On 04/06/2016 03:52 PM, Sjoerd Simons wrote: > > > > > clk_get on a disabled clock node will return EPROBE_DEFER, which > > can > > cause drivers to be deferred forever if such clocks are referenced

Re: [PATCH] Revert "ARM: dts: porter: Enable SCIF_CLK frequency and pins"

2016-04-07 Thread Geert Uytterhoeven
On Wed, Apr 6, 2016 at 9:32 PM, Sjoerd Simons wrote: > This reverts commit 19417bd9c5112f58ea63e97ba72edabd5e1cc0fe as > according to > http://elinux.org/File:R-CarM2-KOELSCH_PORTER-B_PORTER_C_Comparison.pdf > the external oscilator for SCIF_CLK is not mounted on the porter boards. > > Signed-off-