hc
2023-12-11 d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d
kernel/drivers/soc/renesas/r8a7796-sysc.c
....@@ -1,21 +1,19 @@
1
+// SPDX-License-Identifier: GPL-2.0
12 /*
2
- * Renesas R-Car M3-W System Controller
3
+ * Renesas R-Car M3-W/W+ System Controller
34 *
45 * Copyright (C) 2016 Glider bvba
5
- *
6
- * This program is free software; you can redistribute it and/or modify
7
- * it under the terms of the GNU General Public License as published by
8
- * the Free Software Foundation; version 2 of the License.
6
+ * Copyright (C) 2018-2019 Renesas Electronics Corporation
97 */
108
11
-#include <linux/bug.h>
9
+#include <linux/bits.h>
1210 #include <linux/kernel.h>
1311
1412 #include <dt-bindings/power/r8a7796-sysc.h>
1513
1614 #include "rcar-sysc.h"
1715
18
-static const struct rcar_sysc_area r8a7796_areas[] __initconst = {
16
+static struct rcar_sysc_area r8a7796_areas[] __initdata = {
1917 { "always-on", 0, 0, R8A7796_PD_ALWAYS_ON, -1, PD_ALWAYS_ON },
2018 { "ca57-scu", 0x1c0, 0, R8A7796_PD_CA57_SCU, R8A7796_PD_ALWAYS_ON,
2119 PD_SCU },
....@@ -42,7 +40,28 @@
4240 { "a3ir", 0x180, 0, R8A7796_PD_A3IR, R8A7796_PD_ALWAYS_ON },
4341 };
4442
45
-const struct rcar_sysc_info r8a7796_sysc_info __initconst = {
43
+
44
+#ifdef CONFIG_SYSC_R8A77960
45
+const struct rcar_sysc_info r8a77960_sysc_info __initconst = {
4646 .areas = r8a7796_areas,
4747 .num_areas = ARRAY_SIZE(r8a7796_areas),
4848 };
49
+#endif /* CONFIG_SYSC_R8A77960 */
50
+
51
+#ifdef CONFIG_SYSC_R8A77961
52
+static int __init r8a77961_sysc_init(void)
53
+{
54
+ rcar_sysc_nullify(r8a7796_areas, ARRAY_SIZE(r8a7796_areas),
55
+ R8A7796_PD_A2VC0);
56
+
57
+ return 0;
58
+}
59
+
60
+const struct rcar_sysc_info r8a77961_sysc_info __initconst = {
61
+ .init = r8a77961_sysc_init,
62
+ .areas = r8a7796_areas,
63
+ .num_areas = ARRAY_SIZE(r8a7796_areas),
64
+ .extmask_offs = 0x2f8,
65
+ .extmask_val = BIT(0),
66
+};
67
+#endif /* CONFIG_SYSC_R8A77961 */