lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Mon,  8 Sep 2014 15:35:39 +0200
From:	Geert Uytterhoeven <geert+renesas@...der.be>
To:	"Rafael J. Wysocki" <rjw@...ysocki.net>,
	Len Brown <len.brown@...el.com>, Pavel Machek <pavel@....cz>,
	Simon Horman <horms@...ge.net.au>,
	Magnus Damm <magnus.damm@...il.com>,
	Rob Herring <robh+dt@...nel.org>,
	Pawel Moll <pawel.moll@....com>,
	Mark Rutland <mark.rutland@....com>,
	Ian Campbell <ijc+devicetree@...lion.org.uk>,
	Kumar Gala <galak@...eaurora.org>
Cc:	Ulf Hansson <ulf.hansson@...aro.org>,
	Tomasz Figa <tomasz.figa@...il.com>,
	Philipp Zabel <philipp.zabel@...il.com>,
	linux-pm@...r.kernel.org, devicetree@...r.kernel.org,
	linux-sh@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
	linux-kernel@...r.kernel.org,
	Geert Uytterhoeven <geert+renesas@...der.be>
Subject: [PATCH/RFC 0/5] ARM: shmobile: R-Mobile: Prototype DT PM domain support

	Hi all,

This patch series contains prototype code to enable DT support for PM domains
on Renesas R-Mobile SoCs.

Currently it's limited to R-Mobile A1 (r8a7740), but given the similarity of
the SYSC System-Controller on the various SH-Mobile/R-Mobile SoCs, and the
abstraction of PM domains in DT, it should be sufficiently generic to handle
other SoCs in the future (e.g. SH-Mobile AP4 (sh7372), SH-Mobile AG5 (sh73a0),
R-Mobile APE6 (r8a73a4)).

Despite my request to add support for non-contiguous arrays for onecell PM
domain providers, I went for representing the SoC's power area hierarchy as a
hierarchy in DT, with multiple PM domain nodes, and using "#power-domain-cells
= <0>" (see also the P.S. below).  The code to support a proper hiearchy turned
out to be surprisingly clean and simple(r).

Dependencies:
  - "[PATCH 00/11] ARM: shmobile: r8a7740/armadillo legacy prototype pm domain
    support", sent by me (www.spinics.net/lists/arm-kernel/msg358037.html),
  - "[PATCH v3 0/9] PM / Domains: Generic OF-based support", sent by Ulf
    Hansson (www.spinics.net/lists/arm-kernel/msg357003.html),
  - "[PATCH 00/15] PM / Domains: Cleanups and remove superfluous APIs", sent by
    Ulf Hansson (www.spinics.net/lists/linux-samsung-soc/msg36407.html).

Note that this still won't work as-is, this is just an RFC.
More fixes are needed in sh-mobile platform glue, and to resolve the bad
interaction with drivers/sh/pm_runtime.c and clk_disable_unused().
But none of these matter for e.g. discussing DT bindings.
With those fixed/worked around, functionality is almost equivalent to the
non-DT case.  Missing are Run-Time management of the module clocks
(pm_clk_*()), and device latencies.

Thanks for your comments!

Geert Uytterhoeven (5):
  PM / Domains: Add DT bindings for power-on/off latencies
  PM / Domains: Add DT bindings for the R-Mobile System Controller
  ARM: shmobile: R-Mobile: Store SYSC base address in rmobile_pm_domain
  ARM: shmobile: R-Mobile: Add DT support for PM domains
  ARM: shmobile: r8a7740 dtsi: Add PM domain support

 .../devicetree/bindings/power/power_domain.txt     |   6 +
 .../bindings/power/renesas,sysc-rmobile.txt        | 106 +++++++++++++
 arch/arm/boot/dts/r8a7740.dtsi                     | 121 +++++++++++++++
 arch/arm/mach-shmobile/Kconfig                     |   3 +-
 arch/arm/mach-shmobile/pm-r8a7740.c                |  14 ++
 arch/arm/mach-shmobile/pm-rmobile.c                | 169 +++++++++++++++++++--
 arch/arm/mach-shmobile/pm-rmobile.h                |   1 +
 arch/arm/mach-shmobile/pm-sh7372.c                 |  11 ++
 8 files changed, 417 insertions(+), 14 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/power/renesas,sysc-rmobile.txt

P.S. I did try "#power-domain-cells = <1>", but the hassle with sparse
     definitions and error-prone multiple arrays (not unlikely, but even worse
     than with the SMTP clock specifiers) was just too much. Not to mention
     representing the C5 "always-on" power area...

	renesas,pm-domain-indices = <
		R8A7740_PD_A4LC R8A7740_PD_A4MP R8A7740_PD_D4
		R8A7740_PD_A4R R8A7740_PD_A3RV R8A7740_PD_A4S
		R8A7740_PD_A3SP R8A7740_PD_A3SM R8A7740_PD_A3SG
		R8A7740_PD_A4SU
	>;
	renesas,pm-domain-names =
		"A4LC", "A4MP", "D4", "A4R", "A3RV", "A4S", "A3SP",
		"A3SM", "A3SG", "A4SU";
	renesas,pm-domain-parents =
		"", "", "", "", "A4R", "", "A4S", "A4S", "A4S", "";

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ