| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0 |
|---|
| 1 | 2 | /* |
|---|
| 2 | | - * Renesas R-Car M3-W System Controller |
|---|
| 3 | + * Renesas R-Car M3-W/W+ System Controller |
|---|
| 3 | 4 | * |
|---|
| 4 | 5 | * 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 |
|---|
| 9 | 7 | */ |
|---|
| 10 | 8 | |
|---|
| 11 | | -#include <linux/bug.h> |
|---|
| 9 | +#include <linux/bits.h> |
|---|
| 12 | 10 | #include <linux/kernel.h> |
|---|
| 13 | 11 | |
|---|
| 14 | 12 | #include <dt-bindings/power/r8a7796-sysc.h> |
|---|
| 15 | 13 | |
|---|
| 16 | 14 | #include "rcar-sysc.h" |
|---|
| 17 | 15 | |
|---|
| 18 | | -static const struct rcar_sysc_area r8a7796_areas[] __initconst = { |
|---|
| 16 | +static struct rcar_sysc_area r8a7796_areas[] __initdata = { |
|---|
| 19 | 17 | { "always-on", 0, 0, R8A7796_PD_ALWAYS_ON, -1, PD_ALWAYS_ON }, |
|---|
| 20 | 18 | { "ca57-scu", 0x1c0, 0, R8A7796_PD_CA57_SCU, R8A7796_PD_ALWAYS_ON, |
|---|
| 21 | 19 | PD_SCU }, |
|---|
| .. | .. |
|---|
| 42 | 40 | { "a3ir", 0x180, 0, R8A7796_PD_A3IR, R8A7796_PD_ALWAYS_ON }, |
|---|
| 43 | 41 | }; |
|---|
| 44 | 42 | |
|---|
| 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 = { |
|---|
| 46 | 46 | .areas = r8a7796_areas, |
|---|
| 47 | 47 | .num_areas = ARRAY_SIZE(r8a7796_areas), |
|---|
| 48 | 48 | }; |
|---|
| 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 */ |
|---|