Re: [PATCH 2/3] rtc: add rtc controller support for Sophgo CV1800B SoC

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Jingbao,

kernel test robot noticed the following build errors:

[auto build test ERROR on abelloni/rtc-next]
[also build test ERROR on linus/master v6.7-rc2 next-20231121]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Jingbao-Qiu/dt-bindings-rtc-add-binding-for-Sophgo-CV1800B-rtc-controller/20231121-174927
base:   https://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux.git rtc-next
patch link:    https://lore.kernel.org/r/20231121094642.2973795-3-qiujingbao.dlmu%40gmail.com
patch subject: [PATCH 2/3] rtc: add rtc controller support for Sophgo CV1800B SoC
config: sparc-allmodconfig (https://download.01.org/0day-ci/archive/20231122/202311220645.2hOquYn6-lkp@xxxxxxxxx/config)
compiler: sparc64-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231122/202311220645.2hOquYn6-lkp@xxxxxxxxx/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@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202311220645.2hOquYn6-lkp@xxxxxxxxx/

All errors (new ones prefixed by >>):

   drivers/rtc/rtc-cv1800b.c: In function 'cv1800b_rtc_alarm_irq_enable':
>> drivers/rtc/rtc-cv1800b.c:90:17: error: implicit declaration of function 'writel_relaxed' [-Werror=implicit-function-declaration]
      90 |                 writel_relaxed(REG_ENABLE_FUN, data->core_map + RTC_ALARM_ENABLE);
         |                 ^~~~~~~~~~~~~~
   drivers/rtc/rtc-cv1800b.c: In function 'cv1800b_rtc_read_alarm':
>> drivers/rtc/rtc-cv1800b.c:115:21: error: implicit declaration of function 'readl' [-Werror=implicit-function-declaration]
     115 |         alrm_time = readl(data->core_map + RTC_ALARM_TIME);
         |                     ^~~~~
   drivers/rtc/rtc-cv1800b.c: In function 'cv1800b_rtc_softinit':
>> drivers/rtc/rtc-cv1800b.c:128:9: error: implicit declaration of function 'writel' [-Werror=implicit-function-declaration]
     128 |         writel(ACTIVATE_RTC_POR_DB_MAGIC_KEY,
         |         ^~~~~~
   drivers/rtc/rtc-cv1800b.c: In function 'cv1800b_rtc_read_time':
>> drivers/rtc/rtc-cv1800b.c:150:16: error: implicit declaration of function 'readl_relaxed' [-Werror=implicit-function-declaration]
     150 |         time = readl_relaxed(data->core_map + RTC_SEC_CNTR_VALUE);
         |                ^~~~~~~~~~~~~
   drivers/rtc/rtc-cv1800b.c: In function 'cv1800b_rtc_probe':
   drivers/rtc/rtc-cv1800b.c:246:16: error: implicit declaration of function 'rtc_register_device'; did you mean 'devm_rtc_register_device'? [-Werror=implicit-function-declaration]
     246 |         return rtc_register_device(rtc->rtc_dev);
         |                ^~~~~~~~~~~~~~~~~~~
         |                devm_rtc_register_device
   cc1: some warnings being treated as errors


vim +/writel_relaxed +90 drivers/rtc/rtc-cv1800b.c

    83	
    84	static int cv1800b_rtc_alarm_irq_enable(struct device *dev,
    85						unsigned int enabled)
    86	{
    87		struct cv1800b_rtc_priv *data = dev_get_drvdata(dev);
    88	
    89		if (enabled)
  > 90			writel_relaxed(REG_ENABLE_FUN, data->core_map + RTC_ALARM_ENABLE);
    91		else
    92			writel_relaxed(REG_DISABLE_FUN,
    93				       data->core_map + RTC_ALARM_ENABLE);
    94	
    95		return 0;
    96	}
    97	
    98	static int cv1800b_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alrm)
    99	{
   100		struct cv1800b_rtc_priv *data = dev_get_drvdata(dev);
   101		unsigned long time = rtc_tm_to_time64(&alrm->time);
   102	
   103		writel_relaxed(time, data->core_map + RTC_ALARM_TIME);
   104	
   105		cv1800b_rtc_alarm_irq_enable(dev, 1);
   106	
   107		return 0;
   108	}
   109	
   110	static int cv1800b_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alrm)
   111	{
   112		u32 alrm_time, now_time;
   113		struct cv1800b_rtc_priv *data = dev_get_drvdata(dev);
   114	
 > 115		alrm_time = readl(data->core_map + RTC_ALARM_TIME);
   116		now_time = readl(data->core_map + RTC_SEC_CNTR_VALUE);
   117		rtc_time64_to_tm(alrm_time, &alrm->time);
   118		alrm->pending = now_time > alrm_time ? 1 : 0;
   119		alrm->enabled = readl(data->core_map + RTC_ALARM_ENABLE);
   120	
   121		return 0;
   122	}
   123	
   124	static int cv1800b_rtc_softinit(struct cv1800b_rtc_priv *dev)
   125	{
   126		u32 timeout = 20;
   127	
 > 128		writel(ACTIVATE_RTC_POR_DB_MAGIC_KEY,
   129		       dev->core_map + RTC_POR_DB_MAGIC_KEY);
   130		writel(INIT_LOAD_TIME, dev->core_map + RTC_SET_SEC_CNTR_VALUE);
   131		writel(REG_DISABLE_FUN, dev->core_map + RTC_SET_SEC_CNTR_TRIG);
   132	
   133		while (readl(dev->core_map + RTC_SEC_CNTR_VALUE) == INIT_LOAD_TIME
   134		       && timeout--)
   135			udelay(5);
   136	
   137		if (!timeout)
   138			return -1;
   139		return 0;
   140	}
   141	
   142	static int cv1800b_rtc_read_time(struct device *dev, struct rtc_time *tm)
   143	{
   144		struct cv1800b_rtc_priv *data = dev_get_drvdata(dev);
   145		u32 time = 0;
   146	
   147		if (!data)
   148			return -1;
   149	
 > 150		time = readl_relaxed(data->core_map + RTC_SEC_CNTR_VALUE);
   151		rtc_time64_to_tm(time, tm);
   152	
   153		return 0;
   154	}
   155	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki




[Index of Archives]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux