sama5d4.c (171e502c6a1fee63ab6f3fc685d38960398ce6d5) | sama5d4.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" --- 253 unchanged lines hidden (view full) --- 262 263 sama5d4_pmc->shws[sama5d4_systemck[i].id] = hw; 264 } 265 266 for (i = 0; i < ARRAY_SIZE(sama5d4_periphck); i++) { 267 hw = at91_clk_register_sam9x5_peripheral(regmap, &pmc_pcr_lock, 268 &sama5d4_pcr_layout, 269 sama5d4_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" --- 253 unchanged lines hidden (view full) --- 262 263 sama5d4_pmc->shws[sama5d4_systemck[i].id] = hw; 264 } 265 266 for (i = 0; i < ARRAY_SIZE(sama5d4_periphck); i++) { 267 hw = at91_clk_register_sam9x5_peripheral(regmap, &pmc_pcr_lock, 268 &sama5d4_pcr_layout, 269 sama5d4_periphck[i].n, |
270 "masterck_div", | 270 "masterck_div", NULL, |
271 sama5d4_periphck[i].id, 272 &range, INT_MIN, 273 sama5d4_periphck[i].flags); 274 if (IS_ERR(hw)) 275 goto err_free; 276 277 sama5d4_pmc->phws[sama5d4_periphck[i].id] = hw; 278 } 279 280 for (i = 0; i < ARRAY_SIZE(sama5d4_periph32ck); i++) { 281 hw = at91_clk_register_sam9x5_peripheral(regmap, &pmc_pcr_lock, 282 &sama5d4_pcr_layout, 283 sama5d4_periph32ck[i].n, | 271 sama5d4_periphck[i].id, 272 &range, INT_MIN, 273 sama5d4_periphck[i].flags); 274 if (IS_ERR(hw)) 275 goto err_free; 276 277 sama5d4_pmc->phws[sama5d4_periphck[i].id] = hw; 278 } 279 280 for (i = 0; i < ARRAY_SIZE(sama5d4_periph32ck); i++) { 281 hw = at91_clk_register_sam9x5_peripheral(regmap, &pmc_pcr_lock, 282 &sama5d4_pcr_layout, 283 sama5d4_periph32ck[i].n, |
284 "h32mxck", | 284 "h32mxck", NULL, |
285 sama5d4_periph32ck[i].id, 286 &range, INT_MIN, 0); 287 if (IS_ERR(hw)) 288 goto err_free; 289 290 sama5d4_pmc->phws[sama5d4_periph32ck[i].id] = hw; 291 } 292 293 of_clk_add_hw_provider(np, of_clk_hw_pmc_get, sama5d4_pmc); 294 295 return; 296 297err_free: 298 kfree(sama5d4_pmc); 299} 300 301CLK_OF_DECLARE(sama5d4_pmc, "atmel,sama5d4-pmc", sama5d4_pmc_setup); | 285 sama5d4_periph32ck[i].id, 286 &range, INT_MIN, 0); 287 if (IS_ERR(hw)) 288 goto err_free; 289 290 sama5d4_pmc->phws[sama5d4_periph32ck[i].id] = hw; 291 } 292 293 of_clk_add_hw_provider(np, of_clk_hw_pmc_get, sama5d4_pmc); 294 295 return; 296 297err_free: 298 kfree(sama5d4_pmc); 299} 300 301CLK_OF_DECLARE(sama5d4_pmc, "atmel,sama5d4-pmc", sama5d4_pmc_setup); |