From: kernel test robot <lkp@intel.com>
To: chang hao <ot_chhao.chang@mediatek.com>,
matthias.bgg@gmail.com, angelogioacchino.delregno@collabora.com,
sean.wang@kernel.org, linus.walleij@linaro.org
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
linux-mediatek@lists.infradead.org, linux-gpio@vger.kernel.org,
linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
Chhao Chang <ot_chhao.chang@mediatek.com>
Subject: Re: [PATCH] pinctrl: mediatek: add eint new design for mt8196
Date: Mon, 2 Dec 2024 19:50:11 +0800 [thread overview]
Message-ID: <202412021959.txWIlGI0-lkp@intel.com> (raw)
In-Reply-To: <20241202085024.25375-1-ot_chhao.chang@mediatek.com>
Hi chang,
kernel test robot noticed the following build errors:
[auto build test ERROR on linusw-pinctrl/devel]
[also build test ERROR on linusw-pinctrl/for-next linus/master v6.13-rc1 next-20241128]
[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/chang-hao/pinctrl-mediatek-add-eint-new-design-for-mt8196/20241202-165544
base: https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl.git devel
patch link: https://lore.kernel.org/r/20241202085024.25375-1-ot_chhao.chang%40mediatek.com
patch subject: [PATCH] pinctrl: mediatek: add eint new design for mt8196
config: x86_64-buildonly-randconfig-004-20241202 (https://download.01.org/0day-ci/archive/20241202/202412021959.txWIlGI0-lkp@intel.com/config)
compiler: clang version 19.1.3 (https://github.com/llvm/llvm-project ab51eccf88f5321e7c60591c5546b254b6afab99)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241202/202412021959.txWIlGI0-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/202412021959.txWIlGI0-lkp@intel.com/
All error/warnings (new ones prefixed by >>):
>> drivers/pinctrl/mediatek/mtk-eint.c:246:6: warning: no previous prototype for function 'mt6983_eint_ack' [-Wmissing-prototypes]
246 | void mt6983_eint_ack(struct irq_data *d)
| ^
drivers/pinctrl/mediatek/mtk-eint.c:246:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
246 | void mt6983_eint_ack(struct irq_data *d)
| ^
| static
>> drivers/pinctrl/mediatek/mtk-eint.c:605:2: error: call to undeclared function 'dsb'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
605 | dsb(sy);
| ^
>> drivers/pinctrl/mediatek/mtk-eint.c:605:6: error: use of undeclared identifier 'sy'
605 | dsb(sy);
| ^
drivers/pinctrl/mediatek/mtk-eint.c:626:2: error: call to undeclared function 'dsb'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
626 | dsb(sy);
| ^
drivers/pinctrl/mediatek/mtk-eint.c:626:6: error: use of undeclared identifier 'sy'
626 | dsb(sy);
| ^
>> drivers/pinctrl/mediatek/mtk-eint.c:704:14: warning: no previous prototype for function 'mtk_eint_get_debounce_en' [-Wmissing-prototypes]
704 | unsigned int mtk_eint_get_debounce_en(struct mtk_eint *eint,
| ^
drivers/pinctrl/mediatek/mtk-eint.c:704:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
704 | unsigned int mtk_eint_get_debounce_en(struct mtk_eint *eint,
| ^
| static
>> drivers/pinctrl/mediatek/mtk-eint.c:727:14: warning: no previous prototype for function 'mtk_eint_get_debounce_value' [-Wmissing-prototypes]
727 | unsigned int mtk_eint_get_debounce_value(struct mtk_eint *eint,
| ^
drivers/pinctrl/mediatek/mtk-eint.c:727:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
727 | unsigned int mtk_eint_get_debounce_value(struct mtk_eint *eint,
| ^
| static
3 warnings and 4 errors generated.
vim +/dsb +605 drivers/pinctrl/mediatek/mtk-eint.c
589
590 int mtk_eint_do_suspend(struct mtk_eint *eint)
591 {
592 unsigned int i, j, port;
593
594 for (i = 0; i < eint->instance_number; i++) {
595 struct mtk_eint_instance inst = eint->instances[i];
596
597 for (j = 0; j < inst.number; j += 32) {
598 port = j >> 5;
599 writel_relaxed(~inst.wake_mask[port],
600 inst.base + port * 4 + eint->comp->regs->mask_set);
601 writel_relaxed(inst.wake_mask[port],
602 inst.base + port * 4 + eint->comp->regs->mask_clr);
603 }
604 }
> 605 dsb(sy);
606
607 return 0;
608 }
609 EXPORT_SYMBOL_GPL(mtk_eint_do_suspend);
610
611 int mtk_eint_do_resume(struct mtk_eint *eint)
612 {
613 unsigned int i, j, port;
614
615 for (i = 0; i < eint->instance_number; i++) {
616 struct mtk_eint_instance inst = eint->instances[i];
617
618 for (j = 0; j < inst.number; j += 32) {
619 port = j >> 5;
620 writel_relaxed(~inst.cur_mask[port],
621 inst.base + port * 4 + eint->comp->regs->mask_set);
622 writel_relaxed(inst.cur_mask[port],
623 inst.base + port * 4 + eint->comp->regs->mask_clr);
624 }
625 }
626 dsb(sy);
627
628 return 0;
629 }
630 EXPORT_SYMBOL_GPL(mtk_eint_do_resume);
631
632 int mtk_eint_set_debounce(struct mtk_eint *eint, unsigned long eint_num,
633 unsigned int debounce)
634 {
635 int virq, eint_offset;
636 unsigned int set_offset, bit, clr_bit, clr_offset, rst, i, unmask,
637 dbnc;
638 static const unsigned int debounce_time[] = { 156, 313, 625, 1250,
639 20000, 40000, 80000, 160000, 320000, 640000 };
640 struct irq_data *d;
641 unsigned int instance, index;
642 void __iomem *reg;
643
644 /*
645 * Due to different number of bit field, we only decode
646 * the coordinate here, instead of get the VA.
647 */
648 reg = mtk_eint_get_offset(eint, eint_num, MTK_EINT_NO_OFFSET,
649 &instance, &index);
650
651 if (!reg) {
652 dev_err(eint->dev, "%s invalid eint_num %lu\n",
653 __func__, eint_num);
654 return 0;
655 }
656
657 virq = irq_find_mapping(eint->domain, eint_num);
658 eint_offset = (index % 4) * 8;
659 d = irq_get_irq_data(virq);
660
661 reg = eint->instances[instance].base;
662 set_offset = (index / 4) * 4 + eint->comp->regs->dbnc_set;
663 clr_offset = (index / 4) * 4 + eint->comp->regs->dbnc_clr;
664
665 if (!mtk_eint_can_en_debounce(eint, eint_num))
666 return -EINVAL;
667
668 /*
669 * Check eint number to avoid access out-of-range
670 */
671 dbnc = ARRAY_SIZE(debounce_time) - 1;
672 for (i = 0; i < ARRAY_SIZE(debounce_time); i++) {
673 if (debounce <= debounce_time[i]) {
674 dbnc = i;
675 break;
676 }
677 }
678
679 if (!mtk_eint_get_mask(eint, eint_num)) {
680 mtk_eint_mask(d);
681 unmask = 1;
682 } else {
683 unmask = 0;
684 }
685
686 clr_bit = 0xff << eint_offset;
687 writel(clr_bit, reg + clr_offset);
688
689 bit = ((dbnc << MTK_EINT_DBNC_SET_DBNC_BITS)
690 | MTK_EINT_DBNC_SET_EN) << eint_offset;
691 rst = MTK_EINT_DBNC_RST_BIT << eint_offset;
692 writel(rst | bit, reg + set_offset);
693
694 /* Delay should be (8T @ 32k) from dbc rst to work correctly. */
695 udelay(250);
696
697 if (unmask == 1)
698 mtk_eint_unmask(d);
699
700 return 0;
701 }
702 EXPORT_SYMBOL_GPL(mtk_eint_set_debounce);
703
> 704 unsigned int mtk_eint_get_debounce_en(struct mtk_eint *eint,
705 unsigned int eint_num)
706 {
707 unsigned int instance, index, bit;
708 void __iomem *reg;
709
710 reg = mtk_eint_get_offset(eint, eint_num, MTK_EINT_NO_OFFSET,
711 &instance, &index);
712
713 if (!reg) {
714 dev_err(eint->dev, "%s invalid eint_num %d\n",
715 __func__, eint_num);
716 return 0;
717 }
718
719 reg = eint->instances[instance].base +
720 (index / 4) * 4 + eint->comp->regs->dbnc_ctrl;
721
722 bit = MTK_EINT_DBNC_SET_EN << ((index % 4) * 8);
723
724 return (readl(reg) & bit) ? 1 : 0;
725 }
726
> 727 unsigned int mtk_eint_get_debounce_value(struct mtk_eint *eint,
728 unsigned int eint_num)
729 {
730 unsigned int instance, index, mask, offset;
731 void __iomem *reg;
732
733 reg = mtk_eint_get_offset(eint, eint_num, MTK_EINT_NO_OFFSET,
734 &instance, &index);
735
736 if (!reg) {
737 dev_err(eint->dev, "%s invalid eint_num %d\n",
738 __func__, eint_num);
739 return 0;
740 }
741
742 reg = eint->instances[instance].base +
743 (index / 4) * 4 + eint->comp->regs->dbnc_ctrl;
744
745 offset = MTK_EINT_DBNC_SET_DBNC_BITS + ((index % 4) * 8);
746 mask = 0xf << offset;
747
748 return ((readl(reg) & mask) >> offset);
749 }
750
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2024-12-02 11:52 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-02 8:50 [PATCH] pinctrl: mediatek: add eint new design for mt8196 chang hao
2024-12-02 11:50 ` kernel test robot [this message]
2024-12-02 12:41 ` kernel test robot
-- strict thread matches above, loose matches on Subject: below --
2024-10-27 6:22 kernel test robot
2024-10-25 3:16 chang hao
2024-10-25 4:12 ` Chen-Yu Tsai
2024-10-26 18:27 ` kernel test robot
2024-10-27 3:35 ` kernel test robot
2024-10-27 18:20 ` kernel test robot
2024-10-25 2:43 chang hao
2024-10-24 14:15 chang hao
2024-10-24 15:55 ` AngeloGioacchino Del Regno
[not found] ` <2d385d533e8f0f23cedad22d4ef46ed4f6550f31.camel@mediatek.com>
2025-01-07 11:36 ` AngeloGioacchino Del Regno
2024-10-24 12:21 chang hao
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=202412021959.txWIlGI0-lkp@intel.com \
--to=lkp@intel.com \
--cc=angelogioacchino.delregno@collabora.com \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=llvm@lists.linux.dev \
--cc=matthias.bgg@gmail.com \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=ot_chhao.chang@mediatek.com \
--cc=sean.wang@kernel.org \
/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.