Source
5
5
* Author: Boris BREZILLON <boris.brezillon@free-electrons.com>
6
6
*
7
7
* Allwinner PRCM (Power/Reset/Clock Management) driver
8
8
*
9
9
*/
10
10
11
11
#include <linux/mfd/core.h>
12
12
#include <linux/init.h>
13
13
#include <linux/of.h>
14
14
15
+
#define SUN8I_CODEC_ANALOG_BASE 0x1c0
16
+
#define SUN8I_CODEC_ANALOG_SIZE 0x4
17
+
15
18
struct prcm_data {
16
19
int nsubdevs;
17
20
const struct mfd_cell *subdevs;
18
21
};
19
22
20
23
static const struct resource sun6i_a31_ar100_clk_res[] = {
21
24
{
22
25
.start = 0x0,
23
26
.end = 0x3,
24
27
.flags = IORESOURCE_MEM,
50
53
};
51
54
52
55
static const struct resource sun6i_a31_apb0_rstc_res[] = {
53
56
{
54
57
.start = 0xb0,
55
58
.end = 0xb3,
56
59
.flags = IORESOURCE_MEM,
57
60
},
58
61
};
59
62
63
+
static const struct resource sun8i_codec_analog_res[] = {
64
+
DEFINE_RES_MEM(SUN8I_CODEC_ANALOG_BASE, SUN8I_CODEC_ANALOG_SIZE),
65
+
};
66
+
60
67
static const struct mfd_cell sun6i_a31_prcm_subdevs[] = {
61
68
{
62
69
.name = "sun6i-a31-ar100-clk",
63
70
.of_compatible = "allwinner,sun6i-a31-ar100-clk",
64
71
.num_resources = ARRAY_SIZE(sun6i_a31_ar100_clk_res),
65
72
.resources = sun6i_a31_ar100_clk_res,
66
73
},
67
74
{
68
75
.name = "sun6i-a31-apb0-clk",
69
76
.of_compatible = "allwinner,sun6i-a31-apb0-clk",
102
109
.of_compatible = "allwinner,sun8i-a23-apb0-gates-clk",
103
110
.num_resources = ARRAY_SIZE(sun6i_a31_apb0_gates_clk_res),
104
111
.resources = sun6i_a31_apb0_gates_clk_res,
105
112
},
106
113
{
107
114
.name = "sun6i-a31-apb0-clock-reset",
108
115
.of_compatible = "allwinner,sun6i-a31-clock-reset",
109
116
.num_resources = ARRAY_SIZE(sun6i_a31_apb0_rstc_res),
110
117
.resources = sun6i_a31_apb0_rstc_res,
111
118
},
119
+
{
120
+
.name = "sun8i-codec-analog",
121
+
.of_compatible = "allwinner,sun8i-a23-codec-analog",
122
+
.num_resources = ARRAY_SIZE(sun8i_codec_analog_res),
123
+
.resources = sun8i_codec_analog_res,
124
+
},
112
125
};
113
126
114
127
static const struct prcm_data sun6i_a31_prcm_data = {
115
128
.nsubdevs = ARRAY_SIZE(sun6i_a31_prcm_subdevs),
116
129
.subdevs = sun6i_a31_prcm_subdevs,
117
130
};
118
131
119
132
static const struct prcm_data sun8i_a23_prcm_data = {
120
133
.nsubdevs = ARRAY_SIZE(sun8i_a23_prcm_subdevs),
121
134
.subdevs = sun8i_a23_prcm_subdevs,