tree:
https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git queue-5.4
head: d2c5af89e80c5b71f1da59879464a930947306a2
commit: 677684bdcc9f12acfd230bf92e68595987cdca56 [55/132] usb: gadget: Add UDC driver for
tegra XUSB device mode controller
config: arm64-allyesconfig (attached as .config)
compiler: aarch64-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O
~/bin/make.cross
chmod +x ~/bin/make.cross
#
https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git/c...
git remote add sashal-linux-stable
https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git
git fetch --no-tags sashal-linux-stable queue-5.4
git checkout 677684bdcc9f12acfd230bf92e68595987cdca56
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
drivers/usb/gadget/udc/tegra-xudc.c: In function 'tegra_xudc_device_mode_on':
> drivers/usb/gadget/udc/tegra-xudc.c:611:2: error: implicit
declaration of function 'tegra_xusb_padctl_set_vbus_override'; did you mean
'tegra_xusb_padctl_hsic_set_idle'? [-Werror=implicit-function-declaration]
611 | tegra_xusb_padctl_set_vbus_override(xudc->padctl, true);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| tegra_xusb_padctl_hsic_set_idle
drivers/usb/gadget/udc/tegra-xudc.c: In function
'tegra_xudc_port_reset_war_work':
> drivers/usb/gadget/udc/tegra-xudc.c:741:10: error: implicit
declaration of function 'tegra_phy_xusb_utmi_port_reset'
[-Werror=implicit-function-declaration]
741 | ret =
tegra_phy_xusb_utmi_port_reset(xudc->utmi_phy);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +611 drivers/usb/gadget/udc/tegra-xudc.c
594
595 static void tegra_xudc_device_mode_on(struct tegra_xudc *xudc)
596 {
597 int err;
598
599 pm_runtime_get_sync(xudc->dev);
600
601 err = phy_power_on(xudc->utmi_phy);
602 if (err < 0)
603 dev_err(xudc->dev, "utmi power on failed %d\n", err);
604
605 err = phy_power_on(xudc->usb3_phy);
606 if (err < 0)
607 dev_err(xudc->dev, "usb3 phy power on failed %d\n", err);
608
609 dev_dbg(xudc->dev, "device mode on\n");
610
611 tegra_xusb_padctl_set_vbus_override(xudc->padctl, true);
612
613 xudc->device_mode = USB_ROLE_DEVICE;
614 }
615
616 static void tegra_xudc_device_mode_off(struct tegra_xudc *xudc)
617 {
618 bool connected = false;
619 u32 pls, val;
620 int err;
621
622 dev_dbg(xudc->dev, "device mode off\n");
623
624 connected = !!(xudc_readl(xudc, PORTSC) & PORTSC_CCS);
625
626 reinit_completion(&xudc->disconnect_complete);
627
628 tegra_xusb_padctl_set_vbus_override(xudc->padctl, false);
629
630 pls = (xudc_readl(xudc, PORTSC) & PORTSC_PLS_MASK) >>
631 PORTSC_PLS_SHIFT;
632
633 /* Direct link to U0 if disconnected in RESUME or U2. */
634 if (xudc->soc->pls_quirk && xudc->gadget.speed == USB_SPEED_SUPER
&&
635 (pls == PORTSC_PLS_RESUME || pls == PORTSC_PLS_U2)) {
636 val = xudc_readl(xudc, PORTPM);
637 val |= PORTPM_FRWE;
638 xudc_writel(xudc, val, PORTPM);
639
640 val = xudc_readl(xudc, PORTSC);
641 val &= ~(PORTSC_CHANGE_MASK | PORTSC_PLS_MASK);
642 val |= PORTSC_LWS | PORTSC_PLS(PORTSC_PLS_U0);
643 xudc_writel(xudc, val, PORTSC);
644 }
645
646 xudc->device_mode = USB_ROLE_NONE;
647
648 /* Wait for disconnect event. */
649 if (connected)
650 wait_for_completion(&xudc->disconnect_complete);
651
652 /* Make sure interrupt handler has completed before powergating. */
653 synchronize_irq(xudc->irq);
654
655 err = phy_power_off(xudc->utmi_phy);
656 if (err < 0)
657 dev_err(xudc->dev, "utmi_phy power off failed %d\n", err);
658
659 err = phy_power_off(xudc->usb3_phy);
660 if (err < 0)
661 dev_err(xudc->dev, "usb3_phy power off failed %d\n", err);
662
663 pm_runtime_put(xudc->dev);
664 }
665
666 static void tegra_xudc_usb_role_sw_work(struct work_struct *work)
667 {
668 struct tegra_xudc *xudc = container_of(work, struct tegra_xudc,
669 usb_role_sw_work);
670
671 if (!xudc->usb_role_sw ||
672 usb_role_switch_get_role(xudc->usb_role_sw) == USB_ROLE_DEVICE)
673 tegra_xudc_device_mode_on(xudc);
674 else
675 tegra_xudc_device_mode_off(xudc);
676
677 }
678
679 static int tegra_xudc_usb_role_sw_set(struct device *dev, enum usb_role role)
680 {
681 struct tegra_xudc *xudc = dev_get_drvdata(dev);
682 unsigned long flags;
683
684 dev_dbg(dev, "%s role is %d\n", __func__, role);
685
686 spin_lock_irqsave(&xudc->lock, flags);
687
688 if (!xudc->suspended)
689 schedule_work(&xudc->usb_role_sw_work);
690
691 spin_unlock_irqrestore(&xudc->lock, flags);
692
693 return 0;
694 }
695
696 static void tegra_xudc_plc_reset_work(struct work_struct *work)
697 {
698 struct delayed_work *dwork = to_delayed_work(work);
699 struct tegra_xudc *xudc = container_of(dwork, struct tegra_xudc,
700 plc_reset_work);
701 unsigned long flags;
702
703 spin_lock_irqsave(&xudc->lock, flags);
704
705 if (xudc->wait_csc) {
706 u32 pls = (xudc_readl(xudc, PORTSC) & PORTSC_PLS_MASK) >>
707 PORTSC_PLS_SHIFT;
708
709 if (pls == PORTSC_PLS_INACTIVE) {
710 dev_info(xudc->dev, "PLS = Inactive. Toggle VBUS\n");
711 tegra_xusb_padctl_set_vbus_override(xudc->padctl,
712 false);
713 tegra_xusb_padctl_set_vbus_override(xudc->padctl, true);
714 xudc->wait_csc = false;
715 }
716 }
717
718 spin_unlock_irqrestore(&xudc->lock, flags);
719 }
720
721 static void tegra_xudc_port_reset_war_work(struct work_struct *work)
722 {
723 struct delayed_work *dwork = to_delayed_work(work);
724 struct tegra_xudc *xudc =
725 container_of(dwork, struct tegra_xudc, port_reset_war_work);
726 unsigned long flags;
727 u32 pls;
728 int ret;
729
730 spin_lock_irqsave(&xudc->lock, flags);
731
732 if ((xudc->device_mode == USB_ROLE_DEVICE)
733 && xudc->wait_for_sec_prc) {
734 pls = (xudc_readl(xudc, PORTSC) & PORTSC_PLS_MASK) >>
735 PORTSC_PLS_SHIFT;
736 dev_dbg(xudc->dev, "pls = %x\n", pls);
737
738 if (pls == PORTSC_PLS_DISABLED) {
739 dev_dbg(xudc->dev, "toggle vbus\n");
740 /* PRC doesn't complete in 100ms, toggle the vbus */
741 ret = tegra_phy_xusb_utmi_port_reset(xudc->utmi_phy);
742 if (ret == 1)
743 xudc->wait_for_sec_prc = 0;
744 }
745 }
746
747 spin_unlock_irqrestore(&xudc->lock, flags);
748 }
749
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org