From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: horms@verge.net.au, linux-renesas-soc@vger.kernel.org,
devicetree@vger.kernel.org, robh+dt@kernel.org,
mark.rutland@arm.com, dwmw2@infradead.org
Cc: magnus.damm@gmail.com
Subject: [PATCH v3 02/11] soc: renesas: rcar-sysc: add R8A7743 support
Date: Wed, 05 Oct 2016 14:35:01 -0700 (PDT) [thread overview]
Message-ID: <1691511.DcOcZO89eZ@wasted.cogentembedded.com> (raw)
In-Reply-To: <2056698.ncAHq8vRQ3@wasted.cogentembedded.com>
Add support for RZ/G1M (R8A7743) SoC power areas to the R-Car SYSC driver.
Based on the original (and large) patch by Dmitry Shifrin
<dmitry.shifrin@cogentembedded.com>.
Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
Changes in version 2:
- documented the R8A7743 SYSC device tree binding;
- added "R-Car" to the patch description;
- added Geert's tag.
Documentation/devicetree/bindings/power/renesas,rcar-sysc.txt | 7 +-
drivers/soc/renesas/Makefile | 1
drivers/soc/renesas/r8a7743-sysc.c | 32 ++++++++++
drivers/soc/renesas/rcar-sysc.c | 3
drivers/soc/renesas/rcar-sysc.h | 1
5 files changed, 41 insertions(+), 3 deletions(-)
Index: renesas/Documentation/devicetree/bindings/power/renesas,rcar-sysc.txt
===================================================================
--- renesas.orig/Documentation/devicetree/bindings/power/renesas,rcar-sysc.txt
+++ renesas/Documentation/devicetree/bindings/power/renesas,rcar-sysc.txt
@@ -1,12 +1,13 @@
-DT bindings for the Renesas R-Car System Controller
+DT bindings for the Renesas R-Car (RZ/G) System Controller
== System Controller Node ==
-The R-Car System Controller provides power management for the CPU cores and
-various coprocessors.
+The R-Car (RZ/G) System Controller provides power management for the CPU cores
+and various coprocessors.
Required properties:
- compatible: Must contain exactly one of the following:
+ - "renesas,r8a7743-sysc" (RZ/G1M)
- "renesas,r8a7779-sysc" (R-Car H1)
- "renesas,r8a7790-sysc" (R-Car H2)
- "renesas,r8a7791-sysc" (R-Car M2-W)
Index: renesas/drivers/soc/renesas/Makefile
===================================================================
--- renesas.orig/drivers/soc/renesas/Makefile
+++ renesas/drivers/soc/renesas/Makefile
@@ -1,3 +1,4 @@
+obj-$(CONFIG_ARCH_R8A7743) += rcar-sysc.o r8a7743-sysc.o
obj-$(CONFIG_ARCH_R8A7779) += rcar-sysc.o r8a7779-sysc.o
obj-$(CONFIG_ARCH_R8A7790) += rcar-sysc.o r8a7790-sysc.o
obj-$(CONFIG_ARCH_R8A7791) += rcar-sysc.o r8a7791-sysc.o
Index: renesas/drivers/soc/renesas/r8a7743-sysc.c
===================================================================
--- /dev/null
+++ renesas/drivers/soc/renesas/r8a7743-sysc.c
@@ -0,0 +1,32 @@
+/*
+ * Renesas RZ/G1M System Controller
+ *
+ * Copyright (C) 2016 Cogent Embedded Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation; of the License.
+ */
+
+#include <linux/bug.h>
+#include <linux/kernel.h>
+
+#include <dt-bindings/power/r8a7743-sysc.h>
+
+#include "rcar-sysc.h"
+
+static const struct rcar_sysc_area r8a7743_areas[] __initconst = {
+ { "always-on", 0, 0, R8A7743_PD_ALWAYS_ON, -1, PD_ALWAYS_ON },
+ { "ca15-scu", 0x180, 0, R8A7743_PD_CA15_SCU, R8A7743_PD_ALWAYS_ON,
+ PD_SCU },
+ { "ca15-cpu0", 0x40, 0, R8A7743_PD_CA15_CPU0, R8A7743_PD_CA15_SCU,
+ PD_CPU_NOCR },
+ { "ca15-cpu1", 0x40, 1, R8A7743_PD_CA15_CPU1, R8A7743_PD_CA15_SCU,
+ PD_CPU_NOCR },
+ { "sgx", 0xc0, 0, R8A7743_PD_SGX, R8A7743_PD_ALWAYS_ON },
+};
+
+const struct rcar_sysc_info r8a7743_sysc_info __initconst = {
+ .areas = r8a7743_areas,
+ .num_areas = ARRAY_SIZE(r8a7743_areas),
+};
Index: renesas/drivers/soc/renesas/rcar-sysc.c
===================================================================
--- renesas.orig/drivers/soc/renesas/rcar-sysc.c
+++ renesas/drivers/soc/renesas/rcar-sysc.c
@@ -275,6 +275,9 @@ finalize:
}
static const struct of_device_id rcar_sysc_matches[] = {
+#ifdef CONFIG_ARCH_R8A7743
+ { .compatible = "renesas,r8a7743-sysc", .data = &r8a7743_sysc_info },
+#endif
#ifdef CONFIG_ARCH_R8A7779
{ .compatible = "renesas,r8a7779-sysc", .data = &r8a7779_sysc_info },
#endif
Index: renesas/drivers/soc/renesas/rcar-sysc.h
===================================================================
--- renesas.orig/drivers/soc/renesas/rcar-sysc.h
+++ renesas/drivers/soc/renesas/rcar-sysc.h
@@ -50,6 +50,7 @@ struct rcar_sysc_info {
unsigned int num_areas;
};
+extern const struct rcar_sysc_info r8a7743_sysc_info;
extern const struct rcar_sysc_info r8a7779_sysc_info;
extern const struct rcar_sysc_info r8a7790_sysc_info;
extern const struct rcar_sysc_info r8a7791_sysc_info;
next prev parent reply other threads:[~2016-10-05 21:35 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-05 21:23 [PATCH v3 0/11] Add R8A7743/SK-RZG1M board support Sergei Shtylyov
2016-10-05 21:31 ` [PATCH v3 01/11] ARM: shmobile: r8a7743: add power domain index macros Sergei Shtylyov
2016-10-07 3:14 ` Simon Horman
2016-10-05 21:35 ` Sergei Shtylyov [this message]
2016-10-07 3:15 ` [PATCH v3 02/11] soc: renesas: rcar-sysc: add R8A7743 support Simon Horman
2016-10-05 21:37 ` [PATCH v3 03/11] ARM: shmobile: r8a7743: basic SoC support Sergei Shtylyov
2016-10-07 3:15 ` Simon Horman
2016-10-07 8:33 ` Laurent Pinchart
2016-10-07 10:02 ` Sergei Shtylyov
2016-10-07 10:11 ` Geert Uytterhoeven
2016-10-08 2:31 ` Simon Horman
2016-10-08 21:14 ` Laurent Pinchart
2016-10-05 21:38 ` [PATCH v3 04/11] ARM: dts: r8a7743: initial SoC device tree Sergei Shtylyov
2016-10-07 3:09 ` Simon Horman
2016-10-07 7:50 ` Geert Uytterhoeven
2016-10-07 9:57 ` Sergei Shtylyov
2016-10-08 2:28 ` Simon Horman
2016-10-19 8:16 ` Geert Uytterhoeven
2016-10-05 21:39 ` [PATCH v3 05/11] ARM: dts: r8a7743: add SYS-DMAC support Sergei Shtylyov
2016-10-05 21:41 ` [PATCH v3 06/11] ARM: dts: r8a7743: add [H]SCIF{A|B} support Sergei Shtylyov
2016-10-19 8:34 ` Geert Uytterhoeven
2016-10-05 21:42 ` [PATCH v3 07/11] ARM: dts: r8a7743: add Ether support Sergei Shtylyov
2016-10-17 14:48 ` Geert Uytterhoeven
2016-10-05 21:43 ` [PATCH v3 08/11] ARM: dts: r8a7743: add IRQC support Sergei Shtylyov
2016-10-17 14:46 ` Geert Uytterhoeven
2016-10-05 21:45 ` [PATCH v3 09/11] DT: arm: shmobile: document SK-RZG1M board Sergei Shtylyov
2016-10-07 3:21 ` Simon Horman
2016-10-05 21:47 ` [PATCH v3 10/11] ARM: dts: sk-rzg1m: initial device tree Sergei Shtylyov
2016-10-05 21:48 ` [PATCH v3 11/11] ARM: dts: sk-rzg1m: add Ether support Sergei Shtylyov
2016-10-19 8:17 ` Geert Uytterhoeven
2016-10-07 16:40 ` [PATCH v3 0/11] Add R8A7743/SK-RZG1M board support Sergei Shtylyov
2016-10-12 8:09 ` Simon Horman
2016-10-12 8:29 ` Sergei Shtylyov
2016-10-20 9:24 ` Simon Horman
2016-10-20 9:56 ` Geert Uytterhoeven
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1691511.DcOcZO89eZ@wasted.cogentembedded.com \
--to=sergei.shtylyov@cogentembedded.com \
--cc=devicetree@vger.kernel.org \
--cc=dwmw2@infradead.org \
--cc=horms@verge.net.au \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=magnus.damm@gmail.com \
--cc=mark.rutland@arm.com \
--cc=robh+dt@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox