From: kernel test robot <lkp@intel.com>
To: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
Cc: kbuild-all@lists.01.org, linux-arm-kernel@lists.infradead.org,
Michal Simek <monstr@monstr.eu>,
Radhey Shyam Pandey <radhey.shyam.pandey@xilinx.com>
Subject: [xilinx-xlnx:xlnx_rebase_v5.15_LTS 132/1091] drivers/clk/clk-xlnx-clock-wizard.c:309:15: error: implicit declaration of function 'FIELD_PREP'
Date: Thu, 7 Apr 2022 19:47:43 +0800 [thread overview]
Message-ID: <202204071950.VImkD1af-lkp@intel.com> (raw)
Hi Shubhrajyoti,
FYI, the error/warning still remains.
tree: https://github.com/Xilinx/linux-xlnx xlnx_rebase_v5.15_LTS
head: 031eb9ce665429a9574c95f89bcc488fd0ba0ec1
commit: e7cc160039f02d71ef5a3b16038d325ad76ab59e [132/1091] clocking-wizard: Support higher frequency accuracy
config: i386-randconfig-a005 (https://download.01.org/0day-ci/archive/20220407/202204071950.VImkD1af-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.2.0-19) 11.2.0
reproduce (this is a W=1 build):
# https://github.com/Xilinx/linux-xlnx/commit/e7cc160039f02d71ef5a3b16038d325ad76ab59e
git remote add xilinx-xlnx https://github.com/Xilinx/linux-xlnx
git fetch --no-tags xilinx-xlnx xlnx_rebase_v5.15_LTS
git checkout e7cc160039f02d71ef5a3b16038d325ad76ab59e
# save the config file to linux build tree
mkdir build_dir
make W=1 O=build_dir ARCH=i386 SHELL=/bin/bash drivers/clk/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
drivers/clk/clk-xlnx-clock-wizard.c: In function 'clk_wzrd_dynamic_all_nolock':
>> drivers/clk/clk-xlnx-clock-wizard.c:309:15: error: implicit declaration of function 'FIELD_PREP' [-Werror=implicit-function-declaration]
309 | reg = FIELD_PREP(WZRD_CLKOUT_DIVIDE_MASK, clockout0_div) |
| ^~~~~~~~~~
drivers/clk/clk-xlnx-clock-wizard.c: In function 'clk_wzrd_recalc_rate_all':
>> drivers/clk/clk-xlnx-clock-wizard.c:369:13: error: implicit declaration of function 'FIELD_GET' [-Werror=implicit-function-declaration]
369 | d = FIELD_GET(WZRD_DIVCLK_DIVIDE_MASK, reg);
| ^~~~~~~~~
cc1: some warnings being treated as errors
vim +/FIELD_PREP +309 drivers/clk/clk-xlnx-clock-wizard.c
286
287 static int clk_wzrd_dynamic_all_nolock(struct clk_hw *hw, unsigned long rate,
288 unsigned long parent_rate)
289 {
290 struct clk_wzrd_divider *divider = to_clk_wzrd_divider(hw);
291 u32 reg, pre;
292 u32 value;
293 int err;
294 u64 vco_freq, rate_div, f, clockout0_div;
295
296 err = clk_wzrd_get_divisors(hw, rate, parent_rate);
297 if (err)
298 pr_err("failed to get divisors\n");
299
300 vco_freq = DIV_ROUND_CLOSEST((parent_rate * divider->valuem), divider->valued);
301 rate_div = DIV_ROUND_CLOSEST((vco_freq * WZRD_FRAC_POINTS), rate);
302
303 clockout0_div = rate_div / WZRD_FRAC_POINTS;
304
305 pre = DIV_ROUND_CLOSEST((vco_freq * WZRD_FRAC_POINTS), rate);
306 f = (u32)(pre - (clockout0_div * WZRD_FRAC_POINTS));
307 f = f & WZRD_CLKOUT_FRAC_MASK;
308
> 309 reg = FIELD_PREP(WZRD_CLKOUT_DIVIDE_MASK, clockout0_div) |
310 FIELD_PREP(WZRD_CLKOUT0_FRAC_MASK, f);
311
312 writel(reg, divider->base + WZRD_CLK_CFG_REG(2));
313 /* Set divisor and clear phase offset */
314 reg = FIELD_PREP(WZRD_CLKFBOUT_MULT_MASK, divider->valuem) |
315 FIELD_PREP(WZRD_DIVCLK_DIVIDE_MASK, divider->valued);
316 writel(reg, divider->base + WZRD_CLK_CFG_REG(0));
317 writel(divider->valueo, divider->base + WZRD_CLK_CFG_REG(2));
318 writel(0, divider->base + WZRD_CLK_CFG_REG(3));
319 /* Check status register */
320 err = readl_poll_timeout(divider->base + WZRD_DR_STATUS_REG_OFFSET, value,
321 value & WZRD_DR_LOCK_BIT_MASK,
322 WZRD_USEC_POLL, WZRD_TIMEOUT_POLL);
323 if (err)
324 return -ETIMEDOUT;
325
326 /* Initiate reconfiguration */
327 writel(WZRD_DR_BEGIN_DYNA_RECONF,
328 divider->base + WZRD_DR_INIT_REG_OFFSET);
329
330 /* Check status register */
331 err = readl_poll_timeout(divider->base + WZRD_DR_STATUS_REG_OFFSET, value,
332 value & WZRD_DR_LOCK_BIT_MASK,
333 WZRD_USEC_POLL, WZRD_TIMEOUT_POLL);
334 if (err)
335 return -ETIMEDOUT;
336
337 return 0;
338 }
339
340 static int clk_wzrd_dynamic_all(struct clk_hw *hw, unsigned long rate,
341 unsigned long parent_rate)
342 {
343 struct clk_wzrd_divider *divider = to_clk_wzrd_divider(hw);
344 unsigned long flags = 0;
345 int ret;
346
347 if (divider->lock)
348 spin_lock_irqsave(divider->lock, flags);
349 else
350 __acquire(divider->lock);
351
352 ret = clk_wzrd_dynamic_all_nolock(hw, rate, parent_rate);
353
354 if (divider->lock)
355 spin_unlock_irqrestore(divider->lock, flags);
356 else
357 __release(divider->lock);
358
359 return ret;
360 }
361
362 static unsigned long clk_wzrd_recalc_rate_all(struct clk_hw *hw,
363 unsigned long parent_rate)
364 {
365 struct clk_wzrd_divider *divider = to_clk_wzrd_divider(hw);
366 u32 m, d, o, div, reg, f;
367
368 reg = readl(divider->base + WZRD_CLK_CFG_REG(0));
> 369 d = FIELD_GET(WZRD_DIVCLK_DIVIDE_MASK, reg);
370 m = FIELD_GET(WZRD_CLKFBOUT_MULT_MASK, reg);
371 reg = readl(divider->base + WZRD_CLK_CFG_REG(2));
372 o = FIELD_GET(WZRD_DIVCLK_DIVIDE_MASK, reg);
373 f = FIELD_GET(WZRD_CLKOUT0_FRAC_MASK, reg);
374
375 div = DIV_ROUND_CLOSEST(d * (WZRD_FRAC_POINTS * o + f), WZRD_FRAC_POINTS);
376 return divider_recalc_rate(hw, parent_rate * m, div, divider->table,
377 divider->flags, divider->width);
378 }
379
--
0-DAY CI Kernel Test Service
https://01.org/lkp
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
reply other threads:[~2022-04-07 11:50 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202204071950.VImkD1af-lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild-all@lists.01.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=monstr@monstr.eu \
--cc=radhey.shyam.pandey@xilinx.com \
--cc=shubhrajyoti.datta@xilinx.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.