Lines Matching refs:imc
89 struct impd1_clk *imc; in integrator_impd1_clk_init() local
98 imc = &impd1_clks[id]; in integrator_impd1_clk_init()
101 imc->pclkname = kasprintf(GFP_KERNEL, "lm%x-pclk", id); in integrator_impd1_clk_init()
102 pclk = clk_register_fixed_rate(NULL, imc->pclkname, NULL, 0, 0); in integrator_impd1_clk_init()
103 imc->pclk = pclk; in integrator_impd1_clk_init()
105 imc->vco1name = kasprintf(GFP_KERNEL, "lm%x-vco1", id); in integrator_impd1_clk_init()
106 clk = icst_clk_register(NULL, &impd1_icst1_desc, imc->vco1name, NULL, in integrator_impd1_clk_init()
108 imc->vco1clk = clk; in integrator_impd1_clk_init()
109 imc->clks[0] = clkdev_alloc(pclk, "apb_pclk", "lm%x:01000", id); in integrator_impd1_clk_init()
110 imc->clks[1] = clkdev_alloc(clk, NULL, "lm%x:01000", id); in integrator_impd1_clk_init()
113 imc->vco2name = kasprintf(GFP_KERNEL, "lm%x-vco2", id); in integrator_impd1_clk_init()
114 clk = icst_clk_register(NULL, &impd1_icst2_desc, imc->vco2name, NULL, in integrator_impd1_clk_init()
116 imc->vco2clk = clk; in integrator_impd1_clk_init()
119 imc->clks[2] = clkdev_alloc(pclk, "apb_pclk", "lm%x:00700", id); in integrator_impd1_clk_init()
120 imc->clks[3] = clkdev_alloc(clk, NULL, "lm%x:00700", id); in integrator_impd1_clk_init()
123 imc->uartname = kasprintf(GFP_KERNEL, "lm%x-uartclk", id); in integrator_impd1_clk_init()
124 clk = clk_register_fixed_factor(NULL, imc->uartname, imc->vco2name, in integrator_impd1_clk_init()
126 imc->uartclk = clk; in integrator_impd1_clk_init()
127 imc->clks[4] = clkdev_alloc(pclk, "apb_pclk", "lm%x:00100", id); in integrator_impd1_clk_init()
128 imc->clks[5] = clkdev_alloc(clk, NULL, "lm%x:00100", id); in integrator_impd1_clk_init()
129 imc->clks[6] = clkdev_alloc(pclk, "apb_pclk", "lm%x:00200", id); in integrator_impd1_clk_init()
130 imc->clks[7] = clkdev_alloc(clk, NULL, "lm%x:00200", id); in integrator_impd1_clk_init()
133 imc->spiname = kasprintf(GFP_KERNEL, "lm%x-spiclk", id); in integrator_impd1_clk_init()
134 clk = clk_register_fixed_factor(NULL, imc->spiname, imc->vco2name, in integrator_impd1_clk_init()
136 imc->clks[8] = clkdev_alloc(pclk, "apb_pclk", "lm%x:00300", id); in integrator_impd1_clk_init()
137 imc->clks[9] = clkdev_alloc(clk, NULL, "lm%x:00300", id); in integrator_impd1_clk_init()
140 imc->clks[10] = clkdev_alloc(pclk, "apb_pclk", "lm%x:00400", id); in integrator_impd1_clk_init()
141 imc->clks[11] = clkdev_alloc(pclk, "apb_pclk", "lm%x:00500", id); in integrator_impd1_clk_init()
142 imc->clks[12] = clkdev_alloc(pclk, "apb_pclk", "lm%x:00800", id); in integrator_impd1_clk_init()
145 imc->scname = kasprintf(GFP_KERNEL, "lm%x-scclk", id); in integrator_impd1_clk_init()
146 clk = clk_register_fixed_factor(NULL, imc->scname, imc->vco2name, in integrator_impd1_clk_init()
148 imc->scclk = clk; in integrator_impd1_clk_init()
149 imc->clks[13] = clkdev_alloc(pclk, "apb_pclk", "lm%x:00600", id); in integrator_impd1_clk_init()
150 imc->clks[14] = clkdev_alloc(clk, NULL, "lm%x:00600", id); in integrator_impd1_clk_init()
152 for (i = 0; i < ARRAY_SIZE(imc->clks); i++) in integrator_impd1_clk_init()
153 clkdev_add(imc->clks[i]); in integrator_impd1_clk_init()
160 struct impd1_clk *imc; in integrator_impd1_clk_exit() local
164 imc = &impd1_clks[id]; in integrator_impd1_clk_exit()
166 for (i = 0; i < ARRAY_SIZE(imc->clks); i++) in integrator_impd1_clk_exit()
167 clkdev_drop(imc->clks[i]); in integrator_impd1_clk_exit()
168 clk_unregister(imc->spiclk); in integrator_impd1_clk_exit()
169 clk_unregister(imc->uartclk); in integrator_impd1_clk_exit()
170 clk_unregister(imc->vco2clk); in integrator_impd1_clk_exit()
171 clk_unregister(imc->vco1clk); in integrator_impd1_clk_exit()
172 clk_unregister(imc->pclk); in integrator_impd1_clk_exit()
173 kfree(imc->scname); in integrator_impd1_clk_exit()
174 kfree(imc->spiname); in integrator_impd1_clk_exit()
175 kfree(imc->uartname); in integrator_impd1_clk_exit()
176 kfree(imc->vco2name); in integrator_impd1_clk_exit()
177 kfree(imc->vco1name); in integrator_impd1_clk_exit()
178 kfree(imc->pclkname); in integrator_impd1_clk_exit()