Renesas ARM Based SoC Updates for v4.21
* pm-rmobile driver - Move to drivers/soc/renesas/ - Clean up struct rmobile_pm_domain * Renesas SoC Kconfig Symbols - Move symbols for ARM and SoCs to drivers/soc/renesas/ - Hide ARCH_RZN1 to improve consistency * SH-Mobile AG5 (sh73a0) SoC: Remove obsolete inclusion of <asm/smp_twd.h> * Restrict TWD and SCU to Renesas ARM based SoCs where they are present * Enable GPIOLIB on Renesas arm64 based SoCs to allow GPIO driver selection -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEE4nzZofWswv9L/nKF189kaWo3T74FAlwJl3UACgkQ189kaWo3 T77nHg/9HvFT/gkyNnqUmzPQB8l1WUu5J1b5uK6tuxQH4/6QADXvksw38o++Qamn vqLiIO5bRoJN9tyLcARnt6/dukjHCyXN1DiPTpl3nW40psding6CPxGDRT/XGcsO Q/Yn9u523Se7IddSX75O+Tfxq0XUOCHOqlMBPYBECBC5Kuo5iTUPx5Mh/Aiii7fL u6kt8/H7hsVw+XK6ceBElwmqqXq7Jh0SuSG5e20DNFyFUGECYod9YZOc9yz3sT8L bs6U9yM4Xfpe4e0lMwVNJAt2AOUPj/U0fKwqMJ2Fs9fjZVhN9jU5/+qDs8105Znh P0fSCqmzc4qj+Jpvz3JunzIiobQHdZUUzav9VupuTjN3CyayisoM7lLfpdw9LSc3 AwBhMwhiqO4tbbKVxNiK9696pSOqRMXXmpU6pei8paEP0ORxrekZCr3KgprvMpv1 MGfXewhScjuIqfrOcpfAISTZRrm0N8ZpkuBfVhrC2pNAdjZyHRz4qQgciBk2Y1Cm 4FQdMA7k+sVj7b6fur97vTCvizDJpTsOrN+OL8/fFXzG2y6iZT9T2wPfytQ55FwA b12HAEGKHEBiQWRmxy/gNm+VQRm1EBzEjv7nRMXCdf253ojcYjqCI4m9kpPRHUhG mybv5TmmUiNdBSGtRtZwfZCtvdNXdCp39NwYeIwzYdTzzY4OrBs= =i17r -----END PGP SIGNATURE----- Merge tag 'renesas-soc-for-v4.21' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into next/soc Renesas ARM Based SoC Updates for v4.21 * pm-rmobile driver - Move to drivers/soc/renesas/ - Clean up struct rmobile_pm_domain * Renesas SoC Kconfig Symbols - Move symbols for ARM and SoCs to drivers/soc/renesas/ - Hide ARCH_RZN1 to improve consistency * SH-Mobile AG5 (sh73a0) SoC: Remove obsolete inclusion of <asm/smp_twd.h> * Restrict TWD and SCU to Renesas ARM based SoCs where they are present * Enable GPIOLIB on Renesas arm64 based SoCs to allow GPIO driver selection * tag 'renesas-soc-for-v4.21' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas: ARM: shmobile: R-Mobile: Move pm-rmobile to drivers/soc/renesas/ ARM: shmobile: R-Mobile: Clean up struct rmobile_pm_domain ARM: shmobile: Move SoC Kconfig symbols to drivers/soc/renesas/ arm64: renesas: Move SoC Kconfig symbols to drivers/soc/renesas/ ARM: shmobile: Hide ARCH_RZN1 to improve consistency ARM: shmobile: sh73a0: Remove obsolete inclusion of <asm/smp_twd.h> ARM: shmobile: Restrict TWD support to SoCs that have it ARM: shmobile: Restrict SCU support to SoCs that have it arm64: renesas: Enable GPIOLIB to allow GPIO driver selection Signed-off-by: Olof Johansson <olof@lixom.net>
This commit is contained in:
commit
50ba37008f
|
@ -1,139 +1,10 @@
|
|||
# SPDX-License-Identifier: GPL-2.0
|
||||
config PM_RMOBILE
|
||||
bool
|
||||
select PM
|
||||
select PM_GENERIC_DOMAINS
|
||||
|
||||
config ARCH_RCAR_GEN1
|
||||
bool
|
||||
select PM
|
||||
select PM_GENERIC_DOMAINS
|
||||
select RENESAS_INTC_IRQPIN
|
||||
select SYS_SUPPORTS_SH_TMU
|
||||
|
||||
config ARCH_RCAR_GEN2
|
||||
bool
|
||||
select HAVE_ARM_ARCH_TIMER
|
||||
select PM
|
||||
select PM_GENERIC_DOMAINS
|
||||
select RENESAS_IRQC
|
||||
select SYS_SUPPORTS_SH_CMT
|
||||
|
||||
config ARCH_RMOBILE
|
||||
bool
|
||||
select PM_RMOBILE
|
||||
select SYS_SUPPORTS_SH_CMT
|
||||
select SYS_SUPPORTS_SH_TMU
|
||||
|
||||
menuconfig ARCH_RENESAS
|
||||
bool "Renesas ARM SoCs"
|
||||
depends on ARCH_MULTI_V7 && MMU
|
||||
select ARM_GIC
|
||||
select GPIOLIB
|
||||
select HAVE_ARM_SCU if SMP
|
||||
select HAVE_ARM_TWD if SMP
|
||||
select NO_IOPORT_MAP
|
||||
select PINCTRL
|
||||
select SOC_BUS
|
||||
select ZONE_DMA if ARM_LPAE
|
||||
|
||||
if ARCH_RENESAS
|
||||
|
||||
#comment "Renesas ARM SoCs System Type"
|
||||
|
||||
config ARCH_EMEV2
|
||||
bool "Emma Mobile EV2"
|
||||
select SYS_SUPPORTS_EM_STI
|
||||
|
||||
config ARCH_R7S72100
|
||||
bool "RZ/A1H (R7S72100)"
|
||||
select PM
|
||||
select PM_GENERIC_DOMAINS
|
||||
select SYS_SUPPORTS_SH_MTU2
|
||||
select RENESAS_OSTM
|
||||
|
||||
config ARCH_R7S9210
|
||||
bool "RZ/A2 (R7S9210)"
|
||||
select PM
|
||||
select PM_GENERIC_DOMAINS
|
||||
select RENESAS_OSTM
|
||||
|
||||
config ARCH_R8A73A4
|
||||
bool "R-Mobile APE6 (R8A73A40)"
|
||||
select ARCH_RMOBILE
|
||||
select ARM_ERRATA_798181 if SMP
|
||||
select HAVE_ARM_ARCH_TIMER
|
||||
select RENESAS_IRQC
|
||||
|
||||
config ARCH_R8A7740
|
||||
bool "R-Mobile A1 (R8A77400)"
|
||||
select ARCH_RMOBILE
|
||||
select RENESAS_INTC_IRQPIN
|
||||
|
||||
config ARCH_R8A7743
|
||||
bool "RZ/G1M (R8A77430)"
|
||||
select ARCH_RCAR_GEN2
|
||||
select ARM_ERRATA_798181 if SMP
|
||||
|
||||
config ARCH_R8A7744
|
||||
bool "RZ/G1N (R8A77440)"
|
||||
select ARCH_RCAR_GEN2
|
||||
select ARM_ERRATA_798181 if SMP
|
||||
|
||||
config ARCH_R8A7745
|
||||
bool "RZ/G1E (R8A77450)"
|
||||
select ARCH_RCAR_GEN2
|
||||
|
||||
config ARCH_R8A77470
|
||||
bool "RZ/G1C (R8A77470)"
|
||||
select ARCH_RCAR_GEN2
|
||||
|
||||
config ARCH_R8A7778
|
||||
bool "R-Car M1A (R8A77781)"
|
||||
select ARCH_RCAR_GEN1
|
||||
|
||||
config ARCH_R8A7779
|
||||
bool "R-Car H1 (R8A77790)"
|
||||
select ARCH_RCAR_GEN1
|
||||
|
||||
config ARCH_R8A7790
|
||||
bool "R-Car H2 (R8A77900)"
|
||||
select ARCH_RCAR_GEN2
|
||||
select ARM_ERRATA_798181 if SMP
|
||||
select I2C
|
||||
|
||||
config ARCH_R8A7791
|
||||
bool "R-Car M2-W (R8A77910)"
|
||||
select ARCH_RCAR_GEN2
|
||||
select ARM_ERRATA_798181 if SMP
|
||||
select I2C
|
||||
|
||||
config ARCH_R8A7792
|
||||
bool "R-Car V2H (R8A77920)"
|
||||
select ARCH_RCAR_GEN2
|
||||
select ARM_ERRATA_798181 if SMP
|
||||
|
||||
config ARCH_R8A7793
|
||||
bool "R-Car M2-N (R8A7793)"
|
||||
select ARCH_RCAR_GEN2
|
||||
select ARM_ERRATA_798181 if SMP
|
||||
select I2C
|
||||
|
||||
config ARCH_R8A7794
|
||||
bool "R-Car E2 (R8A77940)"
|
||||
select ARCH_RCAR_GEN2
|
||||
|
||||
config ARCH_R9A06G032
|
||||
bool "RZ/N1D (R9A06G032)"
|
||||
select ARCH_RZN1
|
||||
|
||||
config ARCH_RZN1
|
||||
bool "RZ/N1 (R9A06G0xx) Family"
|
||||
select ARM_AMBA
|
||||
select CPU_V7
|
||||
|
||||
config ARCH_SH73A0
|
||||
bool "SH-Mobile AG5 (R8A73A00)"
|
||||
select ARCH_RMOBILE
|
||||
select RENESAS_INTC_IRQPIN
|
||||
endif
|
||||
|
|
|
@ -35,7 +35,6 @@ smp-$(CONFIG_ARCH_EMEV2) += smp-emev2.o headsmp-scu.o platsmp-scu.o
|
|||
|
||||
# PM objects
|
||||
obj-$(CONFIG_SUSPEND) += suspend.o
|
||||
obj-$(CONFIG_PM_RMOBILE) += pm-rmobile.o
|
||||
obj-$(CONFIG_ARCH_RCAR_GEN2) += pm-rcar-gen2.o
|
||||
|
||||
# Framework support
|
||||
|
|
|
@ -1,22 +0,0 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0
|
||||
*
|
||||
* Copyright (C) 2012 Renesas Solutions Corp.
|
||||
*
|
||||
* Kuninori Morimoto <morimoto.kuninori@renesas.com>
|
||||
*/
|
||||
#ifndef PM_RMOBILE_H
|
||||
#define PM_RMOBILE_H
|
||||
|
||||
#include <linux/pm_domain.h>
|
||||
|
||||
struct rmobile_pm_domain {
|
||||
struct generic_pm_domain genpd;
|
||||
struct dev_power_governor *gov;
|
||||
int (*suspend)(void);
|
||||
void (*resume)(void);
|
||||
void __iomem *base;
|
||||
unsigned int bit_shift;
|
||||
bool no_debug;
|
||||
};
|
||||
|
||||
#endif /* PM_RMOBILE_H */
|
|
@ -12,7 +12,6 @@
|
|||
#include <linux/delay.h>
|
||||
|
||||
#include <asm/smp_plat.h>
|
||||
#include <asm/smp_twd.h>
|
||||
|
||||
#include "common.h"
|
||||
#include "sh73a0.h"
|
||||
|
|
|
@ -157,70 +157,12 @@ config ARCH_REALTEK
|
|||
|
||||
config ARCH_RENESAS
|
||||
bool "Renesas SoC Platforms"
|
||||
select GPIOLIB
|
||||
select PINCTRL
|
||||
select PM
|
||||
select PM_GENERIC_DOMAINS
|
||||
select RENESAS_IRQC
|
||||
select SOC_BUS
|
||||
select SYS_SUPPORTS_SH_CMT
|
||||
select SYS_SUPPORTS_SH_TMU
|
||||
help
|
||||
This enables support for the ARMv8 based Renesas SoCs.
|
||||
|
||||
config ARCH_R8A774A1
|
||||
bool "Renesas RZ/G2M SoC Platform"
|
||||
depends on ARCH_RENESAS
|
||||
help
|
||||
This enables support for the Renesas RZ/G2M SoC.
|
||||
|
||||
config ARCH_R8A774C0
|
||||
bool "Renesas RZ/G2E SoC Platform"
|
||||
depends on ARCH_RENESAS
|
||||
help
|
||||
This enables support for the Renesas RZ/G2E SoC.
|
||||
|
||||
config ARCH_R8A7795
|
||||
bool "Renesas R-Car H3 SoC Platform"
|
||||
depends on ARCH_RENESAS
|
||||
help
|
||||
This enables support for the Renesas R-Car H3 SoC.
|
||||
|
||||
config ARCH_R8A7796
|
||||
bool "Renesas R-Car M3-W SoC Platform"
|
||||
depends on ARCH_RENESAS
|
||||
help
|
||||
This enables support for the Renesas R-Car M3-W SoC.
|
||||
|
||||
config ARCH_R8A77965
|
||||
bool "Renesas R-Car M3-N SoC Platform"
|
||||
depends on ARCH_RENESAS
|
||||
help
|
||||
This enables support for the Renesas R-Car M3-N SoC.
|
||||
|
||||
config ARCH_R8A77970
|
||||
bool "Renesas R-Car V3M SoC Platform"
|
||||
depends on ARCH_RENESAS
|
||||
help
|
||||
This enables support for the Renesas R-Car V3M SoC.
|
||||
|
||||
config ARCH_R8A77980
|
||||
bool "Renesas R-Car V3H SoC Platform"
|
||||
depends on ARCH_RENESAS
|
||||
help
|
||||
This enables support for the Renesas R-Car V3H SoC.
|
||||
|
||||
config ARCH_R8A77990
|
||||
bool "Renesas R-Car E3 SoC Platform"
|
||||
depends on ARCH_RENESAS
|
||||
help
|
||||
This enables support for the Renesas R-Car E3 SoC.
|
||||
|
||||
config ARCH_R8A77995
|
||||
bool "Renesas R-Car D3 SoC Platform"
|
||||
depends on ARCH_RENESAS
|
||||
help
|
||||
This enables support for the Renesas R-Car D3 SoC.
|
||||
|
||||
config ARCH_ROCKCHIP
|
||||
bool "Rockchip Platforms"
|
||||
select ARCH_HAS_RESET_CONTROLLER
|
||||
|
|
|
@ -3,30 +3,226 @@ config SOC_RENESAS
|
|||
bool "Renesas SoC driver support" if COMPILE_TEST && !ARCH_RENESAS
|
||||
default y if ARCH_RENESAS
|
||||
select SOC_BUS
|
||||
select RST_RCAR if ARCH_RCAR_GEN1 || ARCH_RCAR_GEN2 || \
|
||||
ARCH_R8A774A1 || ARCH_R8A774C0 || ARCH_R8A7795 || \
|
||||
ARCH_R8A7796 || ARCH_R8A77965 || ARCH_R8A77970 || \
|
||||
ARCH_R8A77980 || ARCH_R8A77990 || ARCH_R8A77995
|
||||
select SYSC_R8A7743 if ARCH_R8A7743 || ARCH_R8A7744
|
||||
select SYSC_R8A7745 if ARCH_R8A7745
|
||||
select SYSC_R8A77470 if ARCH_R8A77470
|
||||
select SYSC_R8A774A1 if ARCH_R8A774A1
|
||||
select SYSC_R8A774C0 if ARCH_R8A774C0
|
||||
select SYSC_R8A7779 if ARCH_R8A7779
|
||||
select SYSC_R8A7790 if ARCH_R8A7790
|
||||
select SYSC_R8A7791 if ARCH_R8A7791 || ARCH_R8A7793
|
||||
select SYSC_R8A7792 if ARCH_R8A7792
|
||||
select SYSC_R8A7794 if ARCH_R8A7794
|
||||
select SYSC_R8A7795 if ARCH_R8A7795
|
||||
select SYSC_R8A7796 if ARCH_R8A7796
|
||||
select SYSC_R8A77965 if ARCH_R8A77965
|
||||
select SYSC_R8A77970 if ARCH_R8A77970
|
||||
select SYSC_R8A77980 if ARCH_R8A77980
|
||||
select SYSC_R8A77990 if ARCH_R8A77990
|
||||
select SYSC_R8A77995 if ARCH_R8A77995
|
||||
|
||||
if SOC_RENESAS
|
||||
|
||||
config ARCH_RCAR_GEN1
|
||||
bool
|
||||
select PM
|
||||
select PM_GENERIC_DOMAINS
|
||||
select RENESAS_INTC_IRQPIN
|
||||
select RST_RCAR
|
||||
select SYS_SUPPORTS_SH_TMU
|
||||
|
||||
config ARCH_RCAR_GEN2
|
||||
bool
|
||||
select HAVE_ARM_ARCH_TIMER
|
||||
select PM
|
||||
select PM_GENERIC_DOMAINS
|
||||
select RENESAS_IRQC
|
||||
select RST_RCAR
|
||||
select SYS_SUPPORTS_SH_CMT
|
||||
|
||||
config ARCH_RCAR_GEN3
|
||||
bool
|
||||
select PM
|
||||
select PM_GENERIC_DOMAINS
|
||||
select RENESAS_IRQC
|
||||
select RST_RCAR
|
||||
select SYS_SUPPORTS_SH_CMT
|
||||
select SYS_SUPPORTS_SH_TMU
|
||||
|
||||
config ARCH_RMOBILE
|
||||
bool
|
||||
select PM
|
||||
select PM_GENERIC_DOMAINS
|
||||
select SYS_SUPPORTS_SH_CMT
|
||||
select SYS_SUPPORTS_SH_TMU
|
||||
select SYSC_RMOBILE
|
||||
|
||||
config ARCH_RZN1
|
||||
bool
|
||||
select ARM_AMBA
|
||||
|
||||
if ARM
|
||||
|
||||
#comment "Renesas ARM SoCs System Type"
|
||||
|
||||
config ARCH_EMEV2
|
||||
bool "Emma Mobile EV2"
|
||||
select HAVE_ARM_SCU if SMP
|
||||
select SYS_SUPPORTS_EM_STI
|
||||
|
||||
config ARCH_R7S72100
|
||||
bool "RZ/A1H (R7S72100)"
|
||||
select PM
|
||||
select PM_GENERIC_DOMAINS
|
||||
select SYS_SUPPORTS_SH_MTU2
|
||||
select RENESAS_OSTM
|
||||
|
||||
config ARCH_R7S9210
|
||||
bool "RZ/A2 (R7S9210)"
|
||||
select PM
|
||||
select PM_GENERIC_DOMAINS
|
||||
select RENESAS_OSTM
|
||||
|
||||
config ARCH_R8A73A4
|
||||
bool "R-Mobile APE6 (R8A73A40)"
|
||||
select ARCH_RMOBILE
|
||||
select ARM_ERRATA_798181 if SMP
|
||||
select HAVE_ARM_ARCH_TIMER
|
||||
select RENESAS_IRQC
|
||||
|
||||
config ARCH_R8A7740
|
||||
bool "R-Mobile A1 (R8A77400)"
|
||||
select ARCH_RMOBILE
|
||||
select RENESAS_INTC_IRQPIN
|
||||
|
||||
config ARCH_R8A7743
|
||||
bool "RZ/G1M (R8A77430)"
|
||||
select ARCH_RCAR_GEN2
|
||||
select ARM_ERRATA_798181 if SMP
|
||||
select SYSC_R8A7743
|
||||
|
||||
config ARCH_R8A7744
|
||||
bool "RZ/G1N (R8A77440)"
|
||||
select ARCH_RCAR_GEN2
|
||||
select ARM_ERRATA_798181 if SMP
|
||||
select SYSC_R8A7743
|
||||
|
||||
config ARCH_R8A7745
|
||||
bool "RZ/G1E (R8A77450)"
|
||||
select ARCH_RCAR_GEN2
|
||||
select SYSC_R8A7745
|
||||
|
||||
config ARCH_R8A77470
|
||||
bool "RZ/G1C (R8A77470)"
|
||||
select ARCH_RCAR_GEN2
|
||||
select SYSC_R8A77470
|
||||
|
||||
config ARCH_R8A7778
|
||||
bool "R-Car M1A (R8A77781)"
|
||||
select ARCH_RCAR_GEN1
|
||||
|
||||
config ARCH_R8A7779
|
||||
bool "R-Car H1 (R8A77790)"
|
||||
select ARCH_RCAR_GEN1
|
||||
select HAVE_ARM_SCU if SMP
|
||||
select HAVE_ARM_TWD if SMP
|
||||
select SYSC_R8A7779
|
||||
|
||||
config ARCH_R8A7790
|
||||
bool "R-Car H2 (R8A77900)"
|
||||
select ARCH_RCAR_GEN2
|
||||
select ARM_ERRATA_798181 if SMP
|
||||
select I2C
|
||||
select SYSC_R8A7790
|
||||
|
||||
config ARCH_R8A7791
|
||||
bool "R-Car M2-W (R8A77910)"
|
||||
select ARCH_RCAR_GEN2
|
||||
select ARM_ERRATA_798181 if SMP
|
||||
select I2C
|
||||
select SYSC_R8A7791
|
||||
|
||||
config ARCH_R8A7792
|
||||
bool "R-Car V2H (R8A77920)"
|
||||
select ARCH_RCAR_GEN2
|
||||
select ARM_ERRATA_798181 if SMP
|
||||
select SYSC_R8A7792
|
||||
|
||||
config ARCH_R8A7793
|
||||
bool "R-Car M2-N (R8A7793)"
|
||||
select ARCH_RCAR_GEN2
|
||||
select ARM_ERRATA_798181 if SMP
|
||||
select I2C
|
||||
select SYSC_R8A7791
|
||||
|
||||
config ARCH_R8A7794
|
||||
bool "R-Car E2 (R8A77940)"
|
||||
select ARCH_RCAR_GEN2
|
||||
select SYSC_R8A7794
|
||||
|
||||
config ARCH_R9A06G032
|
||||
bool "RZ/N1D (R9A06G032)"
|
||||
select ARCH_RZN1
|
||||
|
||||
config ARCH_SH73A0
|
||||
bool "SH-Mobile AG5 (R8A73A00)"
|
||||
select ARCH_RMOBILE
|
||||
select HAVE_ARM_SCU if SMP
|
||||
select HAVE_ARM_TWD if SMP
|
||||
select RENESAS_INTC_IRQPIN
|
||||
|
||||
endif # ARM
|
||||
|
||||
if ARM64
|
||||
|
||||
config ARCH_R8A774A1
|
||||
bool "Renesas RZ/G2M SoC Platform"
|
||||
select ARCH_RCAR_GEN3
|
||||
select SYSC_R8A774A1
|
||||
help
|
||||
This enables support for the Renesas RZ/G2M SoC.
|
||||
|
||||
config ARCH_R8A774C0
|
||||
bool "Renesas RZ/G2E SoC Platform"
|
||||
select ARCH_RCAR_GEN3
|
||||
select SYSC_R8A774C0
|
||||
help
|
||||
This enables support for the Renesas RZ/G2E SoC.
|
||||
|
||||
config ARCH_R8A7795
|
||||
bool "Renesas R-Car H3 SoC Platform"
|
||||
select ARCH_RCAR_GEN3
|
||||
select SYSC_R8A7795
|
||||
help
|
||||
This enables support for the Renesas R-Car H3 SoC.
|
||||
|
||||
config ARCH_R8A7796
|
||||
bool "Renesas R-Car M3-W SoC Platform"
|
||||
select ARCH_RCAR_GEN3
|
||||
select SYSC_R8A7796
|
||||
help
|
||||
This enables support for the Renesas R-Car M3-W SoC.
|
||||
|
||||
config ARCH_R8A77965
|
||||
bool "Renesas R-Car M3-N SoC Platform"
|
||||
select ARCH_RCAR_GEN3
|
||||
select SYSC_R8A77965
|
||||
help
|
||||
This enables support for the Renesas R-Car M3-N SoC.
|
||||
|
||||
config ARCH_R8A77970
|
||||
bool "Renesas R-Car V3M SoC Platform"
|
||||
select ARCH_RCAR_GEN3
|
||||
select SYSC_R8A77970
|
||||
help
|
||||
This enables support for the Renesas R-Car V3M SoC.
|
||||
|
||||
config ARCH_R8A77980
|
||||
bool "Renesas R-Car V3H SoC Platform"
|
||||
select ARCH_RCAR_GEN3
|
||||
select SYSC_R8A77980
|
||||
help
|
||||
This enables support for the Renesas R-Car V3H SoC.
|
||||
|
||||
config ARCH_R8A77990
|
||||
bool "Renesas R-Car E3 SoC Platform"
|
||||
select ARCH_RCAR_GEN3
|
||||
select SYSC_R8A77990
|
||||
help
|
||||
This enables support for the Renesas R-Car E3 SoC.
|
||||
|
||||
config ARCH_R8A77995
|
||||
bool "Renesas R-Car D3 SoC Platform"
|
||||
select ARCH_RCAR_GEN3
|
||||
select SYSC_R8A77995
|
||||
help
|
||||
This enables support for the Renesas R-Car D3 SoC.
|
||||
|
||||
endif # ARM64
|
||||
|
||||
# SoC
|
||||
config SYSC_R8A7743
|
||||
bool "RZ/G1M System Controller support" if COMPILE_TEST
|
||||
|
@ -103,4 +299,7 @@ config RST_RCAR
|
|||
config SYSC_RCAR
|
||||
bool "R-Car System Controller support" if COMPILE_TEST
|
||||
|
||||
config SYSC_RMOBILE
|
||||
bool "R-Mobile System Controller support" if COMPILE_TEST
|
||||
|
||||
endif # SOC_RENESAS
|
||||
|
|
|
@ -27,3 +27,4 @@ endif
|
|||
# Family
|
||||
obj-$(CONFIG_RST_RCAR) += rcar-rst.o
|
||||
obj-$(CONFIG_SYSC_RCAR) += rcar-sysc.o
|
||||
obj-$(CONFIG_SYSC_RMOBILE) += rmobile-sysc.o
|
||||
|
|
|
@ -18,12 +18,11 @@
|
|||
#include <linux/platform_device.h>
|
||||
#include <linux/pm.h>
|
||||
#include <linux/pm_clock.h>
|
||||
#include <linux/pm_domain.h>
|
||||
#include <linux/slab.h>
|
||||
|
||||
#include <asm/io.h>
|
||||
|
||||
#include "pm-rmobile.h"
|
||||
|
||||
/* SYSC */
|
||||
#define SPDCR 0x08 /* SYS Power Down Control Register */
|
||||
#define SWUCR 0x14 /* SYS Wakeup Control Register */
|
||||
|
@ -32,6 +31,14 @@
|
|||
#define PSTR_RETRIES 100
|
||||
#define PSTR_DELAY_US 10
|
||||
|
||||
struct rmobile_pm_domain {
|
||||
struct generic_pm_domain genpd;
|
||||
struct dev_power_governor *gov;
|
||||
int (*suspend)(void);
|
||||
void __iomem *base;
|
||||
unsigned int bit_shift;
|
||||
};
|
||||
|
||||
static inline
|
||||
struct rmobile_pm_domain *to_rmobile_pd(struct generic_pm_domain *d)
|
||||
{
|
||||
|
@ -65,16 +72,13 @@ static int rmobile_pd_power_down(struct generic_pm_domain *genpd)
|
|||
}
|
||||
}
|
||||
|
||||
if (!rmobile_pd->no_debug)
|
||||
pr_debug("%s: Power off, 0x%08x -> PSTR = 0x%08x\n",
|
||||
genpd->name, mask,
|
||||
__raw_readl(rmobile_pd->base + PSTR));
|
||||
pr_debug("%s: Power off, 0x%08x -> PSTR = 0x%08x\n", genpd->name, mask,
|
||||
__raw_readl(rmobile_pd->base + PSTR));
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int __rmobile_pd_power_up(struct rmobile_pm_domain *rmobile_pd,
|
||||
bool do_resume)
|
||||
static int __rmobile_pd_power_up(struct rmobile_pm_domain *rmobile_pd)
|
||||
{
|
||||
unsigned int mask;
|
||||
unsigned int retry_count;
|
||||
|
@ -85,7 +89,7 @@ static int __rmobile_pd_power_up(struct rmobile_pm_domain *rmobile_pd,
|
|||
|
||||
mask = BIT(rmobile_pd->bit_shift);
|
||||
if (__raw_readl(rmobile_pd->base + PSTR) & mask)
|
||||
goto out;
|
||||
return ret;
|
||||
|
||||
__raw_writel(mask, rmobile_pd->base + SWUCR);
|
||||
|
||||
|
@ -100,21 +104,16 @@ static int __rmobile_pd_power_up(struct rmobile_pm_domain *rmobile_pd,
|
|||
if (!retry_count)
|
||||
ret = -EIO;
|
||||
|
||||
if (!rmobile_pd->no_debug)
|
||||
pr_debug("%s: Power on, 0x%08x -> PSTR = 0x%08x\n",
|
||||
rmobile_pd->genpd.name, mask,
|
||||
__raw_readl(rmobile_pd->base + PSTR));
|
||||
|
||||
out:
|
||||
if (ret == 0 && rmobile_pd->resume && do_resume)
|
||||
rmobile_pd->resume();
|
||||
pr_debug("%s: Power on, 0x%08x -> PSTR = 0x%08x\n",
|
||||
rmobile_pd->genpd.name, mask,
|
||||
__raw_readl(rmobile_pd->base + PSTR));
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int rmobile_pd_power_up(struct generic_pm_domain *genpd)
|
||||
{
|
||||
return __rmobile_pd_power_up(to_rmobile_pd(genpd), true);
|
||||
return __rmobile_pd_power_up(to_rmobile_pd(genpd));
|
||||
}
|
||||
|
||||
static void rmobile_init_pm_domain(struct rmobile_pm_domain *rmobile_pd)
|
||||
|
@ -127,7 +126,7 @@ static void rmobile_init_pm_domain(struct rmobile_pm_domain *rmobile_pd)
|
|||
genpd->power_on = rmobile_pd_power_up;
|
||||
genpd->attach_dev = cpg_mstp_attach_dev;
|
||||
genpd->detach_dev = cpg_mstp_detach_dev;
|
||||
__rmobile_pd_power_up(rmobile_pd, false);
|
||||
__rmobile_pd_power_up(rmobile_pd);
|
||||
pm_genpd_init(genpd, gov ? : &simple_qos_governor, false);
|
||||
}
|
||||
|
Loading…
Reference in New Issue