[PATCH 2/4] pwm: sun50i: Add H616 PWM support
kernel test robot
lkp at intel.com
Sat Dec 6 06:24:34 PST 2025
Hi Richard,
kernel test robot noticed the following build errors:
[auto build test ERROR on 6987d58a9cbc5bd57c983baa514474a86c945d56]
url: https://github.com/intel-lab-lkp/linux/commits/Richard-Genoud/dt-bindings-pwm-sunxi-add-PWM-controller-for-Allwinner-H616/20251205-214804
base: 6987d58a9cbc5bd57c983baa514474a86c945d56
patch link: https://lore.kernel.org/r/20251205100239.1563353-3-richard.genoud%40bootlin.com
patch subject: [PATCH 2/4] pwm: sun50i: Add H616 PWM support
config: parisc-allyesconfig (https://download.01.org/0day-ci/archive/20251206/202512062245.KFjCln1y-lkp@intel.com/config)
compiler: hppa-linux-gcc (GCC) 15.1.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251206/202512062245.KFjCln1y-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 at intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202512062245.KFjCln1y-lkp@intel.com/
All errors (new ones prefixed by >>):
drivers/pwm/pwm-sun50i-h616.c: In function 'h616_pwm_get_state':
>> drivers/pwm/pwm-sun50i-h616.c:76:41: error: implicit declaration of function 'FIELD_GET' [-Wimplicit-function-declaration]
76 | #define PWM_REG_DUTY(reg) FIELD_GET(PWM_DUTY_MASK, reg)
| ^~~~~~~~~
drivers/pwm/pwm-sun50i-h616.c:452:30: note: in expansion of macro 'PWM_REG_DUTY'
452 | tmp = NSEC_PER_SEC * PWM_REG_DUTY(val);
| ^~~~~~~~~~~~
drivers/pwm/pwm-sun50i-h616.c: In function 'h616_pwm_calc':
>> drivers/pwm/pwm-sun50i-h616.c:79:41: error: implicit declaration of function 'FIELD_MAX' [-Wimplicit-function-declaration]
79 | #define PWM_PERIOD_MAX FIELD_MAX(PWM_PERIOD_MASK)
| ^~~~~~~~~
drivers/pwm/pwm-sun50i-h616.c:493:54: note: in expansion of macro 'PWM_PERIOD_MAX'
493 | freq = div64_u64(NSEC_PER_SEC * (u64)PWM_PERIOD_MAX, period);
| ^~~~~~~~~~~~~~
drivers/pwm/pwm-sun50i-h616.c: In function 'h616_pwm_apply':
>> drivers/pwm/pwm-sun50i-h616.c:78:41: error: implicit declaration of function 'FIELD_PREP' [-Wimplicit-function-declaration]
78 | #define PWM_DUTY(dty) FIELD_PREP(PWM_DUTY_MASK, dty)
| ^~~~~~~~~~
drivers/pwm/pwm-sun50i-h616.c:577:23: note: in expansion of macro 'PWM_DUTY'
577 | val = PWM_DUTY(chan->active_cycles);
| ^~~~~~~~
drivers/pwm/pwm-sun50i-h616.c: In function 'h616_add_composite_clk':
drivers/pwm/pwm-sun50i-h616.c:666:28: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
666 | mux->reg = (u64)mux->reg + reg;
| ^
drivers/pwm/pwm-sun50i-h616.c:676:29: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
676 | gate->reg = (u64)gate->reg + reg;
| ^
drivers/pwm/pwm-sun50i-h616.c:686:29: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
686 | rate->reg = (u64)rate->reg + reg;
| ^
vim +/FIELD_GET +76 drivers/pwm/pwm-sun50i-h616.c
70
71 /* PWM Period Register */
72 #define PWM_PERIOD_REG(ch) (0x64 + (ch) * 0x20)
73 #define PWM_PERIOD_MASK GENMASK(31, 16)
74 #define PWM_DUTY_MASK GENMASK(15, 0)
75 #define PWM_REG_PERIOD(reg) (FIELD_GET(PWM_PERIOD_MASK, reg) + 1)
> 76 #define PWM_REG_DUTY(reg) FIELD_GET(PWM_DUTY_MASK, reg)
77 #define PWM_PERIOD(prd) FIELD_PREP(PWM_PERIOD_MASK, (prd) - 1)
> 78 #define PWM_DUTY(dty) FIELD_PREP(PWM_DUTY_MASK, dty)
> 79 #define PWM_PERIOD_MAX FIELD_MAX(PWM_PERIOD_MASK)
80
81
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
More information about the linux-arm-kernel
mailing list