Skip to content

Commit

Permalink
Merge tag 'renesas-rcar-sysc2-for-v4.7' into arm64-dt-pm-domain-for-v4.7
Browse files Browse the repository at this point in the history
Second Round of Renesas ARM Based SoC R-Car SYSC Updates for v4.7

Introduce 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.
  • Loading branch information
Simon Horman committed Apr 27, 2016
2 parents 9f33a8a + 23f1e2e commit 3238ec7
Show file tree
Hide file tree
Showing 33 changed files with 1,023 additions and 232 deletions.
48 changes: 48 additions & 0 deletions Documentation/devicetree/bindings/power/renesas,rcar-sysc.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
DT bindings for the Renesas R-Car System Controller

== System Controller Node ==

The R-Car System Controller provides power management for the CPU cores and
various coprocessors.

Required properties:
- compatible: Must contain exactly one of the following:
- "renesas,r8a7779-sysc" (R-Car H1)
- "renesas,r8a7790-sysc" (R-Car H2)
- "renesas,r8a7791-sysc" (R-Car M2-W)
- "renesas,r8a7792-sysc" (R-Car V2H)
- "renesas,r8a7793-sysc" (R-Car M2-N)
- "renesas,r8a7794-sysc" (R-Car E2)
- "renesas,r8a7795-sysc" (R-Car H3)
- reg: Address start and address range for the device.
- #power-domain-cells: Must be 1.


Example:

sysc: system-controller@e6180000 {
compatible = "renesas,r8a7791-sysc";
reg = <0 0xe6180000 0 0x0200>;
#power-domain-cells = <1>;
};


== PM Domain Consumers ==

Devices residing in a power area must refer to that power area, as documented
by the generic PM domain bindings in
Documentation/devicetree/bindings/power/power_domain.txt.

Required properties:
- power-domains: A phandle and symbolic PM domain specifier, as defined in
<dt-bindings/power/r8a77*-sysc.h>.


Example:

L2_CA15: cache-controller@0 {
compatible = "cache";
power-domains = <&sysc R8A7791_PD_CA15_SCU>;
cache-unified;
cache-level = <2>;
};
4 changes: 4 additions & 0 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -1491,6 +1491,8 @@ Q: http://patchwork.kernel.org/project/linux-renesas-soc/list/
T: git git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas.git next
S: Supported
F: arch/arm64/boot/dts/renesas/
F: drivers/soc/renesas/
F: include/linux/soc/renesas/

ARM/RISCPC ARCHITECTURE
M: Russell King <linux@arm.linux.org.uk>
Expand Down Expand Up @@ -1604,6 +1606,8 @@ F: arch/arm/configs/shmobile_defconfig
F: arch/arm/include/debug/renesas-scif.S
F: arch/arm/mach-shmobile/
F: drivers/sh/
F: drivers/soc/renesas/
F: include/linux/soc/renesas/

ARM/SOCFPGA ARCHITECTURE
M: Dinh Nguyen <dinguyen@opensource.altera.com>
Expand Down
11 changes: 4 additions & 7 deletions arch/arm/mach-shmobile/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,22 @@ config ARCH_SHMOBILE
config ARCH_SHMOBILE_MULTI
bool

config PM_RCAR
bool
select PM
select PM_GENERIC_DOMAINS

config PM_RMOBILE
bool
select PM
select PM_GENERIC_DOMAINS

config ARCH_RCAR_GEN1
bool
select PM_RCAR
select PM
select PM_GENERIC_DOMAINS
select RENESAS_INTC_IRQPIN
select SYS_SUPPORTS_SH_TMU

config ARCH_RCAR_GEN2
bool
select PM_RCAR
select PM
select PM_GENERIC_DOMAINS
select RENESAS_IRQC
select SYS_SUPPORTS_SH_CMT
select PCI_DOMAINS if PCI
Expand Down
1 change: 0 additions & 1 deletion arch/arm/mach-shmobile/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ smp-$(CONFIG_ARCH_EMEV2) += smp-emev2.o headsmp-scu.o platsmp-scu.o
# PM objects
obj-$(CONFIG_SUSPEND) += suspend.o
obj-$(CONFIG_CPU_FREQ) += cpufreq.o
obj-$(CONFIG_PM_RCAR) += pm-rcar.o
obj-$(CONFIG_PM_RMOBILE) += pm-rmobile.o
obj-$(CONFIG_ARCH_RCAR_GEN2) += pm-rcar-gen2.o

Expand Down
3 changes: 2 additions & 1 deletion arch/arm/mach-shmobile/pm-r8a7779.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@
* for more details.
*/

#include <linux/soc/renesas/rcar-sysc.h>

#include <asm/io.h>

#include "pm-rcar.h"
#include "r8a7779.h"

/* SYSC */
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-shmobile/pm-rcar-gen2.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
#include <linux/kernel.h>
#include <linux/of.h>
#include <linux/smp.h>
#include <linux/soc/renesas/rcar-sysc.h>
#include <asm/io.h>
#include "common.h"
#include "pm-rcar.h"
#include "rcar-gen2.h"

/* RST */
Expand Down
164 changes: 0 additions & 164 deletions arch/arm/mach-shmobile/pm-rcar.c

This file was deleted.

2 changes: 1 addition & 1 deletion arch/arm/mach-shmobile/smp-r8a7779.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@
#include <linux/spinlock.h>
#include <linux/io.h>
#include <linux/delay.h>
#include <linux/soc/renesas/rcar-sysc.h>

#include <asm/cacheflush.h>
#include <asm/smp_plat.h>
#include <asm/smp_scu.h>

#include "common.h"
#include "pm-rcar.h"
#include "r8a7779.h"

#define AVECR IOMEM(0xfe700040)
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-shmobile/smp-r8a7790.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@
#include <linux/init.h>
#include <linux/smp.h>
#include <linux/io.h>
#include <linux/soc/renesas/rcar-sysc.h>

#include <asm/smp_plat.h>

#include "common.h"
#include "platsmp-apmu.h"
#include "pm-rcar.h"
#include "rcar-gen2.h"
#include "r8a7790.h"

Expand Down
1 change: 1 addition & 0 deletions drivers/clk/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@ source "drivers/clk/bcm/Kconfig"
source "drivers/clk/hisilicon/Kconfig"
source "drivers/clk/mvebu/Kconfig"
source "drivers/clk/qcom/Kconfig"
source "drivers/clk/renesas/Kconfig"
source "drivers/clk/samsung/Kconfig"
source "drivers/clk/tegra/Kconfig"
source "drivers/clk/ti/Kconfig"
Expand Down
16 changes: 16 additions & 0 deletions drivers/clk/renesas/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
config CLK_RENESAS_CPG_MSSR
bool
default y if ARCH_R8A7795

config CLK_RENESAS_CPG_MSTP
bool
default y if ARCH_R7S72100
default y if ARCH_R8A73A4
default y if ARCH_R8A7740
default y if ARCH_R8A7778
default y if ARCH_R8A7779
default y if ARCH_R8A7790
default y if ARCH_R8A7791
default y if ARCH_R8A7793
default y if ARCH_R8A7794
default y if ARCH_SH73A0
26 changes: 14 additions & 12 deletions drivers/clk/renesas/Makefile
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
obj-$(CONFIG_ARCH_EMEV2) += clk-emev2.o
obj-$(CONFIG_ARCH_R7S72100) += clk-rz.o clk-mstp.o
obj-$(CONFIG_ARCH_R8A73A4) += clk-r8a73a4.o clk-mstp.o clk-div6.o
obj-$(CONFIG_ARCH_R8A7740) += clk-r8a7740.o clk-mstp.o clk-div6.o
obj-$(CONFIG_ARCH_R8A7778) += clk-r8a7778.o clk-mstp.o
obj-$(CONFIG_ARCH_R8A7779) += clk-r8a7779.o clk-mstp.o
obj-$(CONFIG_ARCH_R8A7790) += clk-rcar-gen2.o clk-mstp.o clk-div6.o
obj-$(CONFIG_ARCH_R8A7791) += clk-rcar-gen2.o clk-mstp.o clk-div6.o
obj-$(CONFIG_ARCH_R8A7793) += clk-rcar-gen2.o clk-mstp.o clk-div6.o
obj-$(CONFIG_ARCH_R8A7794) += clk-rcar-gen2.o clk-mstp.o clk-div6.o
obj-$(CONFIG_ARCH_R8A7795) += renesas-cpg-mssr.o \
r8a7795-cpg-mssr.o clk-div6.o
obj-$(CONFIG_ARCH_SH73A0) += clk-sh73a0.o clk-mstp.o clk-div6.o
obj-$(CONFIG_ARCH_R7S72100) += clk-rz.o
obj-$(CONFIG_ARCH_R8A73A4) += clk-r8a73a4.o clk-div6.o
obj-$(CONFIG_ARCH_R8A7740) += clk-r8a7740.o clk-div6.o
obj-$(CONFIG_ARCH_R8A7778) += clk-r8a7778.o
obj-$(CONFIG_ARCH_R8A7779) += clk-r8a7779.o
obj-$(CONFIG_ARCH_R8A7790) += clk-rcar-gen2.o clk-div6.o
obj-$(CONFIG_ARCH_R8A7791) += clk-rcar-gen2.o clk-div6.o
obj-$(CONFIG_ARCH_R8A7793) += clk-rcar-gen2.o clk-div6.o
obj-$(CONFIG_ARCH_R8A7794) += clk-rcar-gen2.o clk-div6.o
obj-$(CONFIG_ARCH_R8A7795) += r8a7795-cpg-mssr.o
obj-$(CONFIG_ARCH_SH73A0) += clk-sh73a0.o clk-div6.o

obj-$(CONFIG_CLK_RENESAS_CPG_MSSR) += renesas-cpg-mssr.o clk-div6.o
obj-$(CONFIG_CLK_RENESAS_CPG_MSTP) += clk-mstp.o
7 changes: 2 additions & 5 deletions drivers/clk/renesas/clk-mstp.c
Original file line number Diff line number Diff line change
Expand Up @@ -243,9 +243,7 @@ static void __init cpg_mstp_clocks_init(struct device_node *np)
}
CLK_OF_DECLARE(cpg_mstp_clks, "renesas,cpg-mstp-clocks", cpg_mstp_clocks_init);


#ifdef CONFIG_PM_GENERIC_DOMAINS_OF
int cpg_mstp_attach_dev(struct generic_pm_domain *domain, struct device *dev)
int cpg_mstp_attach_dev(struct generic_pm_domain *unused, struct device *dev)
{
struct device_node *np = dev->of_node;
struct of_phandle_args clkspec;
Expand Down Expand Up @@ -297,7 +295,7 @@ int cpg_mstp_attach_dev(struct generic_pm_domain *domain, struct device *dev)
return error;
}

void cpg_mstp_detach_dev(struct generic_pm_domain *domain, struct device *dev)
void cpg_mstp_detach_dev(struct generic_pm_domain *unused, struct device *dev)
{
if (!list_empty(&dev->power.subsys_data->clock_list))
pm_clk_destroy(dev);
Expand Down Expand Up @@ -326,4 +324,3 @@ void __init cpg_mstp_add_clk_domain(struct device_node *np)

of_genpd_add_provider_simple(np, pd);
}
#endif /* !CONFIG_PM_GENERIC_DOMAINS_OF */
Loading

0 comments on commit 3238ec7

Please sign in to comment.