0001
0002
0003
0004
0005
0006
0007
0008 #include <linux/bits.h>
0009 #include <linux/kernel.h>
0010 #include <linux/sys_soc.h>
0011
0012 #include <dt-bindings/power/r8a77990-sysc.h>
0013
0014 #include "rcar-sysc.h"
0015
0016 static struct rcar_sysc_area r8a77990_areas[] __initdata = {
0017 { "always-on", 0, 0, R8A77990_PD_ALWAYS_ON, -1, PD_ALWAYS_ON },
0018 { "ca53-scu", 0x140, 0, R8A77990_PD_CA53_SCU, R8A77990_PD_ALWAYS_ON,
0019 PD_SCU },
0020 { "ca53-cpu0", 0x200, 0, R8A77990_PD_CA53_CPU0, R8A77990_PD_CA53_SCU,
0021 PD_CPU_NOCR },
0022 { "ca53-cpu1", 0x200, 1, R8A77990_PD_CA53_CPU1, R8A77990_PD_CA53_SCU,
0023 PD_CPU_NOCR },
0024 { "cr7", 0x240, 0, R8A77990_PD_CR7, R8A77990_PD_ALWAYS_ON },
0025 { "a3vc", 0x380, 0, R8A77990_PD_A3VC, R8A77990_PD_ALWAYS_ON },
0026 { "a2vc1", 0x3c0, 1, R8A77990_PD_A2VC1, R8A77990_PD_A3VC },
0027 { "3dg-a", 0x100, 0, R8A77990_PD_3DG_A, R8A77990_PD_ALWAYS_ON },
0028 { "3dg-b", 0x100, 1, R8A77990_PD_3DG_B, R8A77990_PD_3DG_A },
0029 };
0030
0031
0032 static const struct soc_device_attribute r8a77990[] __initconst = {
0033 { .soc_id = "r8a77990", .revision = "ES1.0" },
0034 { }
0035 };
0036
0037 static int __init r8a77990_sysc_init(void)
0038 {
0039 if (soc_device_match(r8a77990)) {
0040
0041 swap(r8a77990_areas[7], r8a77990_areas[8]);
0042 r8a77990_areas[7].parent = R8A77990_PD_ALWAYS_ON;
0043 r8a77990_areas[8].parent = R8A77990_PD_3DG_B;
0044 }
0045
0046 return 0;
0047 }
0048
0049 const struct rcar_sysc_info r8a77990_sysc_info __initconst = {
0050 .init = r8a77990_sysc_init,
0051 .areas = r8a77990_areas,
0052 .num_areas = ARRAY_SIZE(r8a77990_areas),
0053 .extmask_offs = 0x2f8,
0054 .extmask_val = BIT(0),
0055 };