Lines Matching refs:id

27 #define PERIPHERAL_MASK(id)	(1 << ((id) & PERIPHERAL_ID_MAX))  argument
37 u32 id; member
46 u32 id; member
59 u32 id = periph->id; in clk_peripheral_enable() local
61 if (id < PERIPHERAL_ID_MIN) in clk_peripheral_enable()
63 if (id > PERIPHERAL_ID_MAX) in clk_peripheral_enable()
65 pmc_write(pmc, offset, PERIPHERAL_MASK(id)); in clk_peripheral_enable()
74 u32 id = periph->id; in clk_peripheral_disable() local
76 if (id < PERIPHERAL_ID_MIN) in clk_peripheral_disable()
78 if (id > PERIPHERAL_ID_MAX) in clk_peripheral_disable()
80 pmc_write(pmc, offset, PERIPHERAL_MASK(id)); in clk_peripheral_disable()
88 u32 id = periph->id; in clk_peripheral_is_enabled() local
90 if (id < PERIPHERAL_ID_MIN) in clk_peripheral_is_enabled()
92 if (id > PERIPHERAL_ID_MAX) in clk_peripheral_is_enabled()
94 return !!(pmc_read(pmc, offset) & PERIPHERAL_MASK(id)); in clk_peripheral_is_enabled()
105 const char *parent_name, u32 id) in at91_clk_register_peripheral() argument
111 if (!pmc || !name || !parent_name || id > PERIPHERAL_ID_MAX) in at91_clk_register_peripheral()
124 periph->id = id; in at91_clk_register_peripheral()
165 if (periph->id < PERIPHERAL_ID_MIN) in clk_sam9x5_peripheral_enable()
168 pmc_write(pmc, AT91_PMC_PCR, (periph->id & AT91_PMC_PCR_PID) | in clk_sam9x5_peripheral_enable()
180 if (periph->id < PERIPHERAL_ID_MIN) in clk_sam9x5_peripheral_disable()
183 pmc_write(pmc, AT91_PMC_PCR, (periph->id & AT91_PMC_PCR_PID) | in clk_sam9x5_peripheral_disable()
193 if (periph->id < PERIPHERAL_ID_MIN) 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()
212 if (periph->id < PERIPHERAL_ID_MIN) 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()
241 if (periph->id < PERIPHERAL_ID_MIN || !periph->range.max) in clk_sam9x5_peripheral_round_rate()
282 if (periph->id < PERIPHERAL_ID_MIN || !periph->range.max) { in clk_sam9x5_peripheral_set_rate()
314 const char *parent_name, u32 id, in at91_clk_register_sam9x5_peripheral() argument
334 periph->id = id; in at91_clk_register_sam9x5_peripheral()
354 u32 id; in of_at91_clk_periph_setup() local
369 if (of_property_read_u32(periphclknp, "reg", &id)) in of_at91_clk_periph_setup()
372 if (id >= PERIPHERAL_MAX) in of_at91_clk_periph_setup()
380 parent_name, id); in of_at91_clk_periph_setup()
390 id, &range); in of_at91_clk_periph_setup()