Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

soc: renesas: Move pm-rcar to drivers/soc/renesas/rcar-sysc

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 the intermediate PM_RCAR config symbol, as it's not user
configurable anymore, and to prepare for SoC-specific make rules.

Add the missing #include <linux/types.h> to rcar-sysc.h, which was
exposed by different include order.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>

authored by

Geert Uytterhoeven and committed by
Simon Horman
be32bcbb a93fed09

+26 -17
+4
MAINTAINERS
··· 1491 1491 T: git git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas.git next 1492 1492 S: Supported 1493 1493 F: arch/arm64/boot/dts/renesas/ 1494 + F: drivers/soc/renesas/ 1495 + F: include/linux/soc/renesas/ 1494 1496 1495 1497 ARM/RISCPC ARCHITECTURE 1496 1498 M: Russell King <linux@arm.linux.org.uk> ··· 1606 1604 F: arch/arm/include/debug/renesas-scif.S 1607 1605 F: arch/arm/mach-shmobile/ 1608 1606 F: drivers/sh/ 1607 + F: drivers/soc/renesas/ 1608 + F: include/linux/soc/renesas/ 1609 1609 1610 1610 ARM/SOCFPGA ARCHITECTURE 1611 1611 M: Dinh Nguyen <dinguyen@opensource.altera.com>
+4 -7
arch/arm/mach-shmobile/Kconfig
··· 4 4 config ARCH_SHMOBILE_MULTI 5 5 bool 6 6 7 - config PM_RCAR 8 - bool 9 - select PM 10 - select PM_GENERIC_DOMAINS 11 - 12 7 config PM_RMOBILE 13 8 bool 14 9 select PM ··· 11 16 12 17 config ARCH_RCAR_GEN1 13 18 bool 14 - select PM_RCAR 19 + select PM 20 + select PM_GENERIC_DOMAINS 15 21 select RENESAS_INTC_IRQPIN 16 22 select SYS_SUPPORTS_SH_TMU 17 23 18 24 config ARCH_RCAR_GEN2 19 25 bool 20 - select PM_RCAR 26 + select PM 27 + select PM_GENERIC_DOMAINS 21 28 select RENESAS_IRQC 22 29 select SYS_SUPPORTS_SH_CMT 23 30 select PCI_DOMAINS if PCI
-1
arch/arm/mach-shmobile/Makefile
··· 39 39 # PM objects 40 40 obj-$(CONFIG_SUSPEND) += suspend.o 41 41 obj-$(CONFIG_CPU_FREQ) += cpufreq.o 42 - obj-$(CONFIG_PM_RCAR) += pm-rcar.o 43 42 obj-$(CONFIG_PM_RMOBILE) += pm-rmobile.o 44 43 obj-$(CONFIG_ARCH_RCAR_GEN2) += pm-rcar-gen2.o 45 44
+2 -1
arch/arm/mach-shmobile/pm-r8a7779.c
··· 9 9 * for more details. 10 10 */ 11 11 12 + #include <linux/soc/renesas/rcar-sysc.h> 13 + 12 14 #include <asm/io.h> 13 15 14 - #include "pm-rcar.h" 15 16 #include "r8a7779.h" 16 17 17 18 /* SYSC */
+1 -1
arch/arm/mach-shmobile/pm-rcar-gen2.c
··· 13 13 #include <linux/kernel.h> 14 14 #include <linux/of.h> 15 15 #include <linux/smp.h> 16 + #include <linux/soc/renesas/rcar-sysc.h> 16 17 #include <asm/io.h> 17 18 #include "common.h" 18 - #include "pm-rcar.h" 19 19 #include "rcar-gen2.h" 20 20 21 21 /* RST */
+1 -1
arch/arm/mach-shmobile/pm-rcar.c drivers/soc/renesas/rcar-sysc.c
··· 13 13 #include <linux/mm.h> 14 14 #include <linux/spinlock.h> 15 15 #include <linux/io.h> 16 - #include "pm-rcar.h" 16 + #include <linux/soc/renesas/rcar-sysc.h> 17 17 18 18 /* SYSC Common */ 19 19 #define SYSCSR 0x00 /* SYSC Status Register */
+5 -3
arch/arm/mach-shmobile/pm-rcar.h include/linux/soc/renesas/rcar-sysc.h
··· 1 - #ifndef PM_RCAR_H 2 - #define PM_RCAR_H 1 + #ifndef __LINUX_SOC_RENESAS_RCAR_SYSC_H__ 2 + #define __LINUX_SOC_RENESAS_RCAR_SYSC_H__ 3 + 4 + #include <linux/types.h> 3 5 4 6 struct rcar_sysc_ch { 5 7 u16 chan_offs; ··· 14 12 bool rcar_sysc_power_is_off(const struct rcar_sysc_ch *sysc_ch); 15 13 void __iomem *rcar_sysc_init(phys_addr_t base); 16 14 17 - #endif /* PM_RCAR_H */ 15 + #endif /* __LINUX_SOC_RENESAS_RCAR_SYSC_H__ */
+1 -1
arch/arm/mach-shmobile/smp-r8a7779.c
··· 19 19 #include <linux/spinlock.h> 20 20 #include <linux/io.h> 21 21 #include <linux/delay.h> 22 + #include <linux/soc/renesas/rcar-sysc.h> 22 23 23 24 #include <asm/cacheflush.h> 24 25 #include <asm/smp_plat.h> 25 26 #include <asm/smp_scu.h> 26 27 27 28 #include "common.h" 28 - #include "pm-rcar.h" 29 29 #include "r8a7779.h" 30 30 31 31 #define AVECR IOMEM(0xfe700040)
+1 -1
arch/arm/mach-shmobile/smp-r8a7790.c
··· 17 17 #include <linux/init.h> 18 18 #include <linux/smp.h> 19 19 #include <linux/io.h> 20 + #include <linux/soc/renesas/rcar-sysc.h> 20 21 21 22 #include <asm/smp_plat.h> 22 23 23 24 #include "common.h" 24 25 #include "platsmp-apmu.h" 25 - #include "pm-rcar.h" 26 26 #include "rcar-gen2.h" 27 27 #include "r8a7790.h" 28 28
+2 -1
drivers/soc/Makefile
··· 9 9 obj-y += fsl/ 10 10 obj-$(CONFIG_ARCH_MEDIATEK) += mediatek/ 11 11 obj-$(CONFIG_ARCH_QCOM) += qcom/ 12 - obj-$(CONFIG_ARCH_ROCKCHIP) += rockchip/ 12 + obj-$(CONFIG_ARCH_RENESAS) += renesas/ 13 + obj-$(CONFIG_ARCH_ROCKCHIP) += rockchip/ 13 14 obj-$(CONFIG_SOC_SAMSUNG) += samsung/ 14 15 obj-$(CONFIG_ARCH_SUNXI) += sunxi/ 15 16 obj-$(CONFIG_ARCH_TEGRA) += tegra/
+5
drivers/soc/renesas/Makefile
··· 1 + obj-$(CONFIG_ARCH_R8A7779) += rcar-sysc.o 2 + obj-$(CONFIG_ARCH_R8A7790) += rcar-sysc.o 3 + obj-$(CONFIG_ARCH_R8A7791) += rcar-sysc.o 4 + obj-$(CONFIG_ARCH_R8A7793) += rcar-sysc.o 5 + obj-$(CONFIG_ARCH_R8A7794) += rcar-sysc.o