Lines Matching refs:pmc
36 struct at91_pmc *pmc; member
44 struct at91_pmc *pmc; member
57 struct at91_pmc *pmc = periph->pmc; in clk_peripheral_enable() local
65 pmc_write(pmc, offset, PERIPHERAL_MASK(id)); in clk_peripheral_enable()
72 struct at91_pmc *pmc = periph->pmc; in clk_peripheral_disable() local
80 pmc_write(pmc, offset, PERIPHERAL_MASK(id)); in clk_peripheral_disable()
86 struct at91_pmc *pmc = periph->pmc; in clk_peripheral_is_enabled() local
94 return !!(pmc_read(pmc, offset) & PERIPHERAL_MASK(id)); in clk_peripheral_is_enabled()
104 at91_clk_register_peripheral(struct at91_pmc *pmc, const char *name, in at91_clk_register_peripheral() argument
111 if (!pmc || !name || !parent_name || id > PERIPHERAL_ID_MAX) in at91_clk_register_peripheral()
126 periph->pmc = pmc; in at91_clk_register_peripheral()
163 struct at91_pmc *pmc = periph->pmc; in clk_sam9x5_peripheral_enable() local
168 pmc_write(pmc, AT91_PMC_PCR, (periph->id & AT91_PMC_PCR_PID) | in clk_sam9x5_peripheral_enable()
178 struct at91_pmc *pmc = periph->pmc; in clk_sam9x5_peripheral_disable() local
183 pmc_write(pmc, AT91_PMC_PCR, (periph->id & AT91_PMC_PCR_PID) | in clk_sam9x5_peripheral_disable()
190 struct at91_pmc *pmc = periph->pmc; in clk_sam9x5_peripheral_is_enabled() local
196 pmc_lock(pmc); in clk_sam9x5_peripheral_is_enabled()
197 pmc_write(pmc, AT91_PMC_PCR, (periph->id & AT91_PMC_PCR_PID)); in clk_sam9x5_peripheral_is_enabled()
198 ret = !!(pmc_read(pmc, AT91_PMC_PCR) & AT91_PMC_PCR_EN); in clk_sam9x5_peripheral_is_enabled()
199 pmc_unlock(pmc); in clk_sam9x5_peripheral_is_enabled()
209 struct at91_pmc *pmc = periph->pmc; in clk_sam9x5_peripheral_recalc_rate() local
215 pmc_lock(pmc); in clk_sam9x5_peripheral_recalc_rate()
216 pmc_write(pmc, AT91_PMC_PCR, (periph->id & AT91_PMC_PCR_PID)); in clk_sam9x5_peripheral_recalc_rate()
217 tmp = pmc_read(pmc, AT91_PMC_PCR); in clk_sam9x5_peripheral_recalc_rate()
218 pmc_unlock(pmc); in clk_sam9x5_peripheral_recalc_rate()
313 at91_clk_register_sam9x5_peripheral(struct at91_pmc *pmc, const char *name, in at91_clk_register_sam9x5_peripheral() argument
321 if (!pmc || !name || !parent_name) in at91_clk_register_sam9x5_peripheral()
337 periph->pmc = pmc; in at91_clk_register_sam9x5_peripheral()
351 of_at91_clk_periph_setup(struct device_node *np, struct at91_pmc *pmc, u8 type) in of_at91_clk_periph_setup() argument
379 clk = at91_clk_register_peripheral(pmc, name, in of_at91_clk_periph_setup()
388 clk = at91_clk_register_sam9x5_peripheral(pmc, name, in of_at91_clk_periph_setup()
401 struct at91_pmc *pmc) in of_at91rm9200_clk_periph_setup() argument
403 of_at91_clk_periph_setup(np, pmc, PERIPHERAL_AT91RM9200); in of_at91rm9200_clk_periph_setup()
407 struct at91_pmc *pmc) in of_at91sam9x5_clk_periph_setup() argument
409 of_at91_clk_periph_setup(np, pmc, PERIPHERAL_AT91SAM9X5); in of_at91sam9x5_clk_periph_setup()