at91sam9rl.c (171e502c6a1fee63ab6f3fc685d38960398ce6d5) at91sam9rl.c (c2f2ca0be8a62ce61a6878cd3dddd8fc6d622999)
1// SPDX-License-Identifier: GPL-2.0
2#include <linux/clk-provider.h>
3#include <linux/mfd/syscon.h>
4#include <linux/slab.h>
5
6#include <dt-bindings/clock/at91.h>
7
8#include "pmc.h"

--- 156 unchanged lines hidden (view full) ---

165 goto err_free;
166
167 at91sam9rl_pmc->shws[at91sam9rl_systemck[i].id] = hw;
168 }
169
170 for (i = 0; i < ARRAY_SIZE(at91sam9rl_periphck); i++) {
171 hw = at91_clk_register_peripheral(regmap,
172 at91sam9rl_periphck[i].n,
1// SPDX-License-Identifier: GPL-2.0
2#include <linux/clk-provider.h>
3#include <linux/mfd/syscon.h>
4#include <linux/slab.h>
5
6#include <dt-bindings/clock/at91.h>
7
8#include "pmc.h"

--- 156 unchanged lines hidden (view full) ---

165 goto err_free;
166
167 at91sam9rl_pmc->shws[at91sam9rl_systemck[i].id] = hw;
168 }
169
170 for (i = 0; i < ARRAY_SIZE(at91sam9rl_periphck); i++) {
171 hw = at91_clk_register_peripheral(regmap,
172 at91sam9rl_periphck[i].n,
173 "masterck_div",
173 "masterck_div", NULL,
174 at91sam9rl_periphck[i].id);
175 if (IS_ERR(hw))
176 goto err_free;
177
178 at91sam9rl_pmc->phws[at91sam9rl_periphck[i].id] = hw;
179 }
180
181 of_clk_add_hw_provider(np, of_clk_hw_pmc_get, at91sam9rl_pmc);
182
183 return;
184
185err_free:
186 kfree(at91sam9rl_pmc);
187}
188
189CLK_OF_DECLARE(at91sam9rl_pmc, "atmel,at91sam9rl-pmc", at91sam9rl_pmc_setup);
174 at91sam9rl_periphck[i].id);
175 if (IS_ERR(hw))
176 goto err_free;
177
178 at91sam9rl_pmc->phws[at91sam9rl_periphck[i].id] = hw;
179 }
180
181 of_clk_add_hw_provider(np, of_clk_hw_pmc_get, at91sam9rl_pmc);
182
183 return;
184
185err_free:
186 kfree(at91sam9rl_pmc);
187}
188
189CLK_OF_DECLARE(at91sam9rl_pmc, "atmel,at91sam9rl-pmc", at91sam9rl_pmc_setup);