Skip to content

Commit ff1c6c9

Browse files
committed
Merge tag 'clk-microchip-6.5-2' of https://git.kernel.org/pub/scm/linux/kernel/git/at91/linux into clk-microchip
Pull Microchip clk driver updates from Claudiu Beznea: It contains support for parent_data, parent_hw in AT91 clock drivers used by SAMA7G5 SoC (e.g. main, master, generic, peripheral, programmable, system, utmi, slow clocks) and also the update of SAMA7G5 to use this new support. * tag 'clk-microchip-6.5-2' of https://git.kernel.org/pub/scm/linux/kernel/git/at91/linux: clk: at91: sama7g5: s/ep_chg_chg_id/ep_chg_id clk: at91: sama7g5: switch to parent_hw and parent_data clk: at91: sckc: switch to parent_data/parent_hw clk: at91: clk-sam9x60-pll: add support for parent_hw clk: at91: clk-utmi: add support for parent_hw clk: at91: clk-system: add support for parent_hw clk: at91: clk-programmable: add support for parent_hw clk: at91: clk-peripheral: add support for parent_hw clk: at91: clk-master: add support for parent_hw clk: at91: clk-generated: add support for parent_hw clk: at91: clk-main: add support for parent_data/parent_hw
2 parents 3973bcc + 5619c2d commit ff1c6c9

22 files changed

Lines changed: 730 additions & 523 deletions

drivers/clk/at91/at91rm9200.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -108,12 +108,12 @@ static void __init at91rm9200_pmc_setup(struct device_node *np)
108108

109109
bypass = of_property_read_bool(np, "atmel,osc-bypass");
110110

111-
hw = at91_clk_register_main_osc(regmap, "main_osc", mainxtal_name,
111+
hw = at91_clk_register_main_osc(regmap, "main_osc", mainxtal_name, NULL,
112112
bypass);
113113
if (IS_ERR(hw))
114114
goto err_free;
115115

116-
hw = at91_clk_register_rm9200_main(regmap, "mainck", "main_osc");
116+
hw = at91_clk_register_rm9200_main(regmap, "mainck", "main_osc", NULL);
117117
if (IS_ERR(hw))
118118
goto err_free;
119119

@@ -140,15 +140,15 @@ static void __init at91rm9200_pmc_setup(struct device_node *np)
140140
parent_names[2] = "pllack";
141141
parent_names[3] = "pllbck";
142142
hw = at91_clk_register_master_pres(regmap, "masterck_pres", 4,
143-
parent_names,
143+
parent_names, NULL,
144144
&at91rm9200_master_layout,
145145
&rm9200_mck_characteristics,
146146
&rm9200_mck_lock);
147147
if (IS_ERR(hw))
148148
goto err_free;
149149

150150
hw = at91_clk_register_master_div(regmap, "masterck_div",
151-
"masterck_pres",
151+
"masterck_pres", NULL,
152152
&at91rm9200_master_layout,
153153
&rm9200_mck_characteristics,
154154
&rm9200_mck_lock, CLK_SET_RATE_GATE, 0);
@@ -171,7 +171,7 @@ static void __init at91rm9200_pmc_setup(struct device_node *np)
171171
snprintf(name, sizeof(name), "prog%d", i);
172172

173173
hw = at91_clk_register_programmable(regmap, name,
174-
parent_names, 4, i,
174+
parent_names, NULL, 4, i,
175175
&at91rm9200_programmable_layout,
176176
NULL);
177177
if (IS_ERR(hw))
@@ -182,7 +182,7 @@ static void __init at91rm9200_pmc_setup(struct device_node *np)
182182

183183
for (i = 0; i < ARRAY_SIZE(at91rm9200_systemck); i++) {
184184
hw = at91_clk_register_system(regmap, at91rm9200_systemck[i].n,
185-
at91rm9200_systemck[i].p,
185+
at91rm9200_systemck[i].p, NULL,
186186
at91rm9200_systemck[i].id, 0);
187187
if (IS_ERR(hw))
188188
goto err_free;
@@ -193,7 +193,7 @@ static void __init at91rm9200_pmc_setup(struct device_node *np)
193193
for (i = 0; i < ARRAY_SIZE(at91rm9200_periphck); i++) {
194194
hw = at91_clk_register_peripheral(regmap,
195195
at91rm9200_periphck[i].n,
196-
"masterck_div",
196+
"masterck_div", NULL,
197197
at91rm9200_periphck[i].id);
198198
if (IS_ERR(hw))
199199
goto err_free;

drivers/clk/at91/at91sam9260.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -363,12 +363,12 @@ static void __init at91sam926x_pmc_setup(struct device_node *np,
363363

364364
bypass = of_property_read_bool(np, "atmel,osc-bypass");
365365

366-
hw = at91_clk_register_main_osc(regmap, "main_osc", mainxtal_name,
366+
hw = at91_clk_register_main_osc(regmap, "main_osc", mainxtal_name, NULL,
367367
bypass);
368368
if (IS_ERR(hw))
369369
goto err_free;
370370

371-
hw = at91_clk_register_rm9200_main(regmap, "mainck", "main_osc");
371+
hw = at91_clk_register_rm9200_main(regmap, "mainck", "main_osc", NULL);
372372
if (IS_ERR(hw))
373373
goto err_free;
374374

@@ -416,15 +416,15 @@ static void __init at91sam926x_pmc_setup(struct device_node *np,
416416
parent_names[2] = "pllack";
417417
parent_names[3] = "pllbck";
418418
hw = at91_clk_register_master_pres(regmap, "masterck_pres", 4,
419-
parent_names,
419+
parent_names, NULL,
420420
&at91rm9200_master_layout,
421421
data->mck_characteristics,
422422
&at91sam9260_mck_lock);
423423
if (IS_ERR(hw))
424424
goto err_free;
425425

426426
hw = at91_clk_register_master_div(regmap, "masterck_div",
427-
"masterck_pres",
427+
"masterck_pres", NULL,
428428
&at91rm9200_master_layout,
429429
data->mck_characteristics,
430430
&at91sam9260_mck_lock,
@@ -448,7 +448,7 @@ static void __init at91sam926x_pmc_setup(struct device_node *np,
448448
snprintf(name, sizeof(name), "prog%d", i);
449449

450450
hw = at91_clk_register_programmable(regmap, name,
451-
parent_names, 4, i,
451+
parent_names, NULL, 4, i,
452452
&at91rm9200_programmable_layout,
453453
NULL);
454454
if (IS_ERR(hw))
@@ -459,7 +459,7 @@ static void __init at91sam926x_pmc_setup(struct device_node *np,
459459

460460
for (i = 0; i < data->num_sck; i++) {
461461
hw = at91_clk_register_system(regmap, data->sck[i].n,
462-
data->sck[i].p,
462+
data->sck[i].p, NULL,
463463
data->sck[i].id, 0);
464464
if (IS_ERR(hw))
465465
goto err_free;
@@ -470,7 +470,7 @@ static void __init at91sam926x_pmc_setup(struct device_node *np,
470470
for (i = 0; i < data->num_pck; i++) {
471471
hw = at91_clk_register_peripheral(regmap,
472472
data->pck[i].n,
473-
"masterck_div",
473+
"masterck_div", NULL,
474474
data->pck[i].id);
475475
if (IS_ERR(hw))
476476
goto err_free;

drivers/clk/at91/at91sam9g45.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -123,12 +123,12 @@ static void __init at91sam9g45_pmc_setup(struct device_node *np)
123123

124124
bypass = of_property_read_bool(np, "atmel,osc-bypass");
125125

126-
hw = at91_clk_register_main_osc(regmap, "main_osc", mainxtal_name,
126+
hw = at91_clk_register_main_osc(regmap, "main_osc", mainxtal_name, NULL,
127127
bypass);
128128
if (IS_ERR(hw))
129129
goto err_free;
130130

131-
hw = at91_clk_register_rm9200_main(regmap, "mainck", "main_osc");
131+
hw = at91_clk_register_rm9200_main(regmap, "mainck", "main_osc", NULL);
132132
if (IS_ERR(hw))
133133
goto err_free;
134134

@@ -145,7 +145,7 @@ static void __init at91sam9g45_pmc_setup(struct device_node *np)
145145

146146
at91sam9g45_pmc->chws[PMC_PLLACK] = hw;
147147

148-
hw = at91_clk_register_utmi(regmap, NULL, "utmick", "mainck");
148+
hw = at91_clk_register_utmi(regmap, NULL, "utmick", "mainck", NULL);
149149
if (IS_ERR(hw))
150150
goto err_free;
151151

@@ -156,15 +156,15 @@ static void __init at91sam9g45_pmc_setup(struct device_node *np)
156156
parent_names[2] = "plladivck";
157157
parent_names[3] = "utmick";
158158
hw = at91_clk_register_master_pres(regmap, "masterck_pres", 4,
159-
parent_names,
159+
parent_names, NULL,
160160
&at91rm9200_master_layout,
161161
&mck_characteristics,
162162
&at91sam9g45_mck_lock);
163163
if (IS_ERR(hw))
164164
goto err_free;
165165

166166
hw = at91_clk_register_master_div(regmap, "masterck_div",
167-
"masterck_pres",
167+
"masterck_pres", NULL,
168168
&at91rm9200_master_layout,
169169
&mck_characteristics,
170170
&at91sam9g45_mck_lock,
@@ -191,7 +191,7 @@ static void __init at91sam9g45_pmc_setup(struct device_node *np)
191191
snprintf(name, sizeof(name), "prog%d", i);
192192

193193
hw = at91_clk_register_programmable(regmap, name,
194-
parent_names, 5, i,
194+
parent_names, NULL, 5, i,
195195
&at91sam9g45_programmable_layout,
196196
NULL);
197197
if (IS_ERR(hw))
@@ -202,7 +202,7 @@ static void __init at91sam9g45_pmc_setup(struct device_node *np)
202202

203203
for (i = 0; i < ARRAY_SIZE(at91sam9g45_systemck); i++) {
204204
hw = at91_clk_register_system(regmap, at91sam9g45_systemck[i].n,
205-
at91sam9g45_systemck[i].p,
205+
at91sam9g45_systemck[i].p, NULL,
206206
at91sam9g45_systemck[i].id,
207207
at91sam9g45_systemck[i].flags);
208208
if (IS_ERR(hw))
@@ -214,7 +214,7 @@ static void __init at91sam9g45_pmc_setup(struct device_node *np)
214214
for (i = 0; i < ARRAY_SIZE(at91sam9g45_periphck); i++) {
215215
hw = at91_clk_register_peripheral(regmap,
216216
at91sam9g45_periphck[i].n,
217-
"masterck_div",
217+
"masterck_div", NULL,
218218
at91sam9g45_periphck[i].id);
219219
if (IS_ERR(hw))
220220
goto err_free;

drivers/clk/at91/at91sam9n12.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -147,14 +147,14 @@ static void __init at91sam9n12_pmc_setup(struct device_node *np)
147147

148148
bypass = of_property_read_bool(np, "atmel,osc-bypass");
149149

150-
hw = at91_clk_register_main_osc(regmap, "main_osc", mainxtal_name,
150+
hw = at91_clk_register_main_osc(regmap, "main_osc", mainxtal_name, NULL,
151151
bypass);
152152
if (IS_ERR(hw))
153153
goto err_free;
154154

155155
parent_names[0] = "main_rc_osc";
156156
parent_names[1] = "main_osc";
157-
hw = at91_clk_register_sam9x5_main(regmap, "mainck", parent_names, 2);
157+
hw = at91_clk_register_sam9x5_main(regmap, "mainck", parent_names, NULL, 2);
158158
if (IS_ERR(hw))
159159
goto err_free;
160160

@@ -183,15 +183,15 @@ static void __init at91sam9n12_pmc_setup(struct device_node *np)
183183
parent_names[2] = "plladivck";
184184
parent_names[3] = "pllbck";
185185
hw = at91_clk_register_master_pres(regmap, "masterck_pres", 4,
186-
parent_names,
186+
parent_names, NULL,
187187
&at91sam9x5_master_layout,
188188
&mck_characteristics,
189189
&at91sam9n12_mck_lock);
190190
if (IS_ERR(hw))
191191
goto err_free;
192192

193193
hw = at91_clk_register_master_div(regmap, "masterck_div",
194-
"masterck_pres",
194+
"masterck_pres", NULL,
195195
&at91sam9x5_master_layout,
196196
&mck_characteristics,
197197
&at91sam9n12_mck_lock,
@@ -216,7 +216,7 @@ static void __init at91sam9n12_pmc_setup(struct device_node *np)
216216
snprintf(name, sizeof(name), "prog%d", i);
217217

218218
hw = at91_clk_register_programmable(regmap, name,
219-
parent_names, 5, i,
219+
parent_names, NULL, 5, i,
220220
&at91sam9x5_programmable_layout,
221221
NULL);
222222
if (IS_ERR(hw))
@@ -227,7 +227,7 @@ static void __init at91sam9n12_pmc_setup(struct device_node *np)
227227

228228
for (i = 0; i < ARRAY_SIZE(at91sam9n12_systemck); i++) {
229229
hw = at91_clk_register_system(regmap, at91sam9n12_systemck[i].n,
230-
at91sam9n12_systemck[i].p,
230+
at91sam9n12_systemck[i].p, NULL,
231231
at91sam9n12_systemck[i].id,
232232
at91sam9n12_systemck[i].flags);
233233
if (IS_ERR(hw))
@@ -240,7 +240,7 @@ static void __init at91sam9n12_pmc_setup(struct device_node *np)
240240
hw = at91_clk_register_sam9x5_peripheral(regmap, &pmc_pcr_lock,
241241
&at91sam9n12_pcr_layout,
242242
at91sam9n12_periphck[i].n,
243-
"masterck_div",
243+
"masterck_div", NULL,
244244
at91sam9n12_periphck[i].id,
245245
&range, INT_MIN, 0);
246246
if (IS_ERR(hw))

drivers/clk/at91/at91sam9rl.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ static void __init at91sam9rl_pmc_setup(struct device_node *np)
9595
if (!at91sam9rl_pmc)
9696
return;
9797

98-
hw = at91_clk_register_rm9200_main(regmap, "mainck", mainxtal_name);
98+
hw = at91_clk_register_rm9200_main(regmap, "mainck", mainxtal_name, NULL);
9999
if (IS_ERR(hw))
100100
goto err_free;
101101

@@ -109,7 +109,7 @@ static void __init at91sam9rl_pmc_setup(struct device_node *np)
109109

110110
at91sam9rl_pmc->chws[PMC_PLLACK] = hw;
111111

112-
hw = at91_clk_register_utmi(regmap, NULL, "utmick", "mainck");
112+
hw = at91_clk_register_utmi(regmap, NULL, "utmick", "mainck", NULL);
113113
if (IS_ERR(hw))
114114
goto err_free;
115115

@@ -120,15 +120,15 @@ static void __init at91sam9rl_pmc_setup(struct device_node *np)
120120
parent_names[2] = "pllack";
121121
parent_names[3] = "utmick";
122122
hw = at91_clk_register_master_pres(regmap, "masterck_pres", 4,
123-
parent_names,
123+
parent_names, NULL,
124124
&at91rm9200_master_layout,
125125
&sam9rl_mck_characteristics,
126126
&sam9rl_mck_lock);
127127
if (IS_ERR(hw))
128128
goto err_free;
129129

130130
hw = at91_clk_register_master_div(regmap, "masterck_div",
131-
"masterck_pres",
131+
"masterck_pres", NULL,
132132
&at91rm9200_master_layout,
133133
&sam9rl_mck_characteristics,
134134
&sam9rl_mck_lock, CLK_SET_RATE_GATE, 0);
@@ -148,7 +148,7 @@ static void __init at91sam9rl_pmc_setup(struct device_node *np)
148148
snprintf(name, sizeof(name), "prog%d", i);
149149

150150
hw = at91_clk_register_programmable(regmap, name,
151-
parent_names, 5, i,
151+
parent_names, NULL, 5, i,
152152
&at91rm9200_programmable_layout,
153153
NULL);
154154
if (IS_ERR(hw))
@@ -159,7 +159,7 @@ static void __init at91sam9rl_pmc_setup(struct device_node *np)
159159

160160
for (i = 0; i < ARRAY_SIZE(at91sam9rl_systemck); i++) {
161161
hw = at91_clk_register_system(regmap, at91sam9rl_systemck[i].n,
162-
at91sam9rl_systemck[i].p,
162+
at91sam9rl_systemck[i].p, NULL,
163163
at91sam9rl_systemck[i].id, 0);
164164
if (IS_ERR(hw))
165165
goto err_free;
@@ -170,7 +170,7 @@ static void __init at91sam9rl_pmc_setup(struct device_node *np)
170170
for (i = 0; i < ARRAY_SIZE(at91sam9rl_periphck); i++) {
171171
hw = at91_clk_register_peripheral(regmap,
172172
at91sam9rl_periphck[i].n,
173-
"masterck_div",
173+
"masterck_div", NULL,
174174
at91sam9rl_periphck[i].id);
175175
if (IS_ERR(hw))
176176
goto err_free;

0 commit comments

Comments
 (0)