oe-kbuild-all.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Jingbao Qiu <qiujingbao.dlmu@gmail.com>,
	a.zummo@towertech.it, alexandre.belloni@bootlin.com,
	krzysztof.kozlowski+dt@linaro.org, chao.wei@sophgo.com,
	unicorn_wang@outlook.com, conor+dt@kernel.org,
	robh+dt@kernel.org, conor@kernel.org, paul.walmsley@sifive.com,
	palmer@dabbelt.com, aou@eecs.berkeley.edu
Cc: oe-kbuild-all@lists.linux.dev, linux-rtc@vger.kernel.org,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	Jingbao Qiu <qiujingbao.dlmu@gmail.com>
Subject: Re: [PATCH 2/3] rtc: add rtc controller support for Sophgo CV1800B SoC
Date: Wed, 22 Nov 2023 06:52:16 +0800	[thread overview]
Message-ID: <202311220645.2hOquYn6-lkp@intel.com> (raw)
In-Reply-To: <20231121094642.2973795-3-qiujingbao.dlmu@gmail.com>

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@intel.com/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@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/202311220645.2hOquYn6-lkp@intel.com/

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

      parent reply	other threads:[~2023-11-21 22:52 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20231121094642.2973795-3-qiujingbao.dlmu@gmail.com>
2023-11-21 17:58 ` [PATCH 2/3] rtc: add rtc controller support for Sophgo CV1800B SoC kernel test robot
2023-11-21 22:52 ` kernel test robot [this message]

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=202311220645.2hOquYn6-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=a.zummo@towertech.it \
    --cc=alexandre.belloni@bootlin.com \
    --cc=aou@eecs.berkeley.edu \
    --cc=chao.wei@sophgo.com \
    --cc=conor+dt@kernel.org \
    --cc=conor@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rtc@vger.kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=palmer@dabbelt.com \
    --cc=paul.walmsley@sifive.com \
    --cc=qiujingbao.dlmu@gmail.com \
    --cc=robh+dt@kernel.org \
    --cc=unicorn_wang@outlook.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).