Lines Matching refs:imc
86 struct impd1_clk *imc; in integrator_impd1_clk_init() local
95 imc = &impd1_clks[id]; in integrator_impd1_clk_init()
98 imc->pclkname = kasprintf(GFP_KERNEL, "lm%x-pclk", id); in integrator_impd1_clk_init()
99 pclk = clk_register_fixed_rate(NULL, imc->pclkname, NULL, 0, 0); in integrator_impd1_clk_init()
100 imc->pclk = pclk; in integrator_impd1_clk_init()
102 imc->vco1name = kasprintf(GFP_KERNEL, "lm%x-vco1", id); in integrator_impd1_clk_init()
103 clk = icst_clk_register(NULL, &impd1_icst1_desc, imc->vco1name, NULL, in integrator_impd1_clk_init()
105 imc->vco1clk = clk; in integrator_impd1_clk_init()
106 imc->clks[0] = clkdev_alloc(pclk, "apb_pclk", "lm%x:01000", id); in integrator_impd1_clk_init()
107 imc->clks[1] = clkdev_alloc(clk, NULL, "lm%x:01000", id); in integrator_impd1_clk_init()
110 imc->vco2name = kasprintf(GFP_KERNEL, "lm%x-vco2", id); in integrator_impd1_clk_init()
111 clk = icst_clk_register(NULL, &impd1_icst2_desc, imc->vco2name, NULL, in integrator_impd1_clk_init()
113 imc->vco2clk = clk; in integrator_impd1_clk_init()
116 imc->clks[2] = clkdev_alloc(pclk, "apb_pclk", "lm%x:00700", id); in integrator_impd1_clk_init()
117 imc->clks[3] = clkdev_alloc(clk, NULL, "lm%x:00700", id); in integrator_impd1_clk_init()
120 imc->uartname = kasprintf(GFP_KERNEL, "lm%x-uartclk", id); in integrator_impd1_clk_init()
121 clk = clk_register_fixed_factor(NULL, imc->uartname, imc->vco2name, in integrator_impd1_clk_init()
123 imc->uartclk = clk; in integrator_impd1_clk_init()
124 imc->clks[4] = clkdev_alloc(pclk, "apb_pclk", "lm%x:00100", id); in integrator_impd1_clk_init()
125 imc->clks[5] = clkdev_alloc(clk, NULL, "lm%x:00100", id); in integrator_impd1_clk_init()
126 imc->clks[6] = clkdev_alloc(pclk, "apb_pclk", "lm%x:00200", id); in integrator_impd1_clk_init()
127 imc->clks[7] = clkdev_alloc(clk, NULL, "lm%x:00200", id); in integrator_impd1_clk_init()
130 imc->spiname = kasprintf(GFP_KERNEL, "lm%x-spiclk", id); in integrator_impd1_clk_init()
131 clk = clk_register_fixed_factor(NULL, imc->spiname, imc->vco2name, in integrator_impd1_clk_init()
133 imc->clks[8] = clkdev_alloc(pclk, "apb_pclk", "lm%x:00300", id); in integrator_impd1_clk_init()
134 imc->clks[9] = clkdev_alloc(clk, NULL, "lm%x:00300", id); in integrator_impd1_clk_init()
137 imc->clks[10] = clkdev_alloc(pclk, "apb_pclk", "lm%x:00400", id); in integrator_impd1_clk_init()
138 imc->clks[11] = clkdev_alloc(pclk, "apb_pclk", "lm%x:00500", id); in integrator_impd1_clk_init()
139 imc->clks[12] = clkdev_alloc(pclk, "apb_pclk", "lm%x:00800", id); in integrator_impd1_clk_init()
142 imc->scname = kasprintf(GFP_KERNEL, "lm%x-scclk", id); in integrator_impd1_clk_init()
143 clk = clk_register_fixed_factor(NULL, imc->scname, imc->vco2name, in integrator_impd1_clk_init()
145 imc->scclk = clk; in integrator_impd1_clk_init()
146 imc->clks[13] = clkdev_alloc(pclk, "apb_pclk", "lm%x:00600", id); in integrator_impd1_clk_init()
147 imc->clks[14] = clkdev_alloc(clk, NULL, "lm%x:00600", id); in integrator_impd1_clk_init()
149 for (i = 0; i < ARRAY_SIZE(imc->clks); i++) in integrator_impd1_clk_init()
150 clkdev_add(imc->clks[i]); in integrator_impd1_clk_init()
157 struct impd1_clk *imc; in integrator_impd1_clk_exit() local
161 imc = &impd1_clks[id]; in integrator_impd1_clk_exit()
163 for (i = 0; i < ARRAY_SIZE(imc->clks); i++) in integrator_impd1_clk_exit()
164 clkdev_drop(imc->clks[i]); in integrator_impd1_clk_exit()
165 clk_unregister(imc->spiclk); in integrator_impd1_clk_exit()
166 clk_unregister(imc->uartclk); in integrator_impd1_clk_exit()
167 clk_unregister(imc->vco2clk); in integrator_impd1_clk_exit()
168 clk_unregister(imc->vco1clk); in integrator_impd1_clk_exit()
169 clk_unregister(imc->pclk); in integrator_impd1_clk_exit()
170 kfree(imc->scname); in integrator_impd1_clk_exit()
171 kfree(imc->spiname); in integrator_impd1_clk_exit()
172 kfree(imc->uartname); in integrator_impd1_clk_exit()
173 kfree(imc->vco2name); in integrator_impd1_clk_exit()
174 kfree(imc->vco1name); in integrator_impd1_clk_exit()
175 kfree(imc->pclkname); in integrator_impd1_clk_exit()