* [freescale-fslc:5.15-2.2.x-imx 14036/29983] drivers/soc/imx/imx93-pd.c:208:22: error: implicit declaration of function 'of_clk_bulk_get_all'
@ 2024-04-29 8:37 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2024-04-29 8:37 UTC (permalink / raw)
To: Otavio Salvador; +Cc: oe-kbuild-all
Hi Peng,
FYI, the error/warning still remains.
tree: https://github.com/Freescale/linux-fslc 5.15-2.2.x-imx
head: 5134e031114e613cb04858e248af5e65fe1e112f
commit: c7aa30ff9f1ace2dbacdb6cd2720606e7f74c4c5 [14036/29983] MLK-25894-4 soc: imx: add i.MX93 SRC power domain driver
config: hexagon-randconfig-002-20240429 (https://download.01.org/0day-ci/archive/20240429/202404291619.DBBdriJK-lkp@intel.com/config)
compiler: clang version 17.0.6 (https://github.com/llvm/llvm-project 6009708b4367171ccdbf4b5905cb6a803753fe18)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240429/202404291619.DBBdriJK-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202404291619.DBBdriJK-lkp@intel.com/
All errors (new ones prefixed by >>):
>> drivers/soc/imx/imx93-pd.c:208:22: error: implicit declaration of function 'of_clk_bulk_get_all' [-Werror,-Wimplicit-function-declaration]
208 | domain->num_clks = of_clk_bulk_get_all(np, &domain->clks);
| ^
drivers/soc/imx/imx93-pd.c:208:22: note: did you mean 'clk_bulk_get_all'?
include/linux/clk.h:807:32: note: 'clk_bulk_get_all' declared here
807 | static inline int __must_check clk_bulk_get_all(struct device *dev,
| ^
1 error generated.
vim +/of_clk_bulk_get_all +208 drivers/soc/imx/imx93-pd.c
158
159 static int imx93_pd_probe(struct platform_device *pdev)
160 {
161 struct device *dev = &pdev->dev;
162 const struct imx93_plat_data *data = of_device_get_match_data(dev);
163 const struct imx93_slice_info *slice_info = data->slices;
164 struct imx93_power_domain *pd;
165 u32 num_domains = data->num_slice;
166 struct device_node *slice_np, *np;
167 void __iomem *base;
168 bool is_off;
169 int ret;
170
171 slice_np = of_get_child_by_name(dev->of_node, "slice");
172 if (!slice_np) {
173 dev_err(dev, "No slices specified in DT\n");
174 return -EINVAL;
175 }
176
177 base = devm_platform_ioremap_resource(pdev, 0);
178 if (IS_ERR(base))
179 return PTR_ERR(base);
180
181 pd = devm_kcalloc(dev, num_domains, sizeof(*pd), GFP_KERNEL);
182 if (!pd)
183 return -ENOMEM;
184
185 platform_set_drvdata(pdev, pd);
186
187 for_each_child_of_node(slice_np, np) {
188 struct imx93_power_domain *domain;
189 u32 index;
190
191 if (!of_device_is_available(np))
192 continue;
193
194 ret = of_property_read_u32(np, "reg", &index);
195 if (ret) {
196 dev_err(dev, "Failed to read 'reg' property\n");
197 of_node_put(np);
198 return ret;
199 }
200
201 if (index >= num_domains) {
202 dev_warn(dev, "Domain index %d is out of bounds\n", index);
203 continue;
204 }
205
206 domain = &pd[index];
207
> 208 domain->num_clks = of_clk_bulk_get_all(np, &domain->clks);
209 if (domain->num_clks < 0) {
210 return dev_err_probe(domain->dev, domain->num_clks,
211 "Failed to get %s's clocks\n",
212 slice_info[index].name);
213 }
214
215 domain->genpd.name = slice_info[index].name;
216 domain->genpd.power_off = imx93_pd_off;
217 domain->genpd.power_on = imx93_pd_on;
218 domain->slice_info = &slice_info[index];
219 domain->base = base;
220
221 is_off = readl(domain->base + slice_info->mix_off + MIX_FUNC_STAT_OFF) &
222 FUNC_STAT_ISO_STAT_MASK;
223 /* Just to sync the status of hardware */
224 if (!is_off) {
225 ret = clk_bulk_prepare_enable(domain->num_clks, domain->clks);
226 if (ret) {
227 dev_err(domain->dev, "failed to enable clocks for domain: %s\n",
228 domain->genpd.name);
229 clk_bulk_put_all(domain->num_clks, domain->clks);
230 return 0;
231 }
232 }
233
234 dev_info(dev, "%s: state: %x\n", domain->genpd.name,
235 readl(domain->base + MIX_FUNC_STAT_OFF));
236 ret = pm_genpd_init(&domain->genpd, NULL, is_off);
237 if (ret) {
238 dev_err(dev, "failed to init genpd\n");
239 clk_bulk_put_all(domain->num_clks, domain->clks);
240 return ret;
241 }
242
243 ret = of_genpd_add_provider_simple(np, &domain->genpd);
244 if (ret) {
245 clk_bulk_put_all(domain->num_clks, domain->clks);
246 return ret;
247 }
248 }
249
250 return 0;
251 }
252
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-04-29 8:37 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-29 8:37 [freescale-fslc:5.15-2.2.x-imx 14036/29983] drivers/soc/imx/imx93-pd.c:208:22: error: implicit declaration of function 'of_clk_bulk_get_all' kernel test robot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.