lkml.org 
[lkml]   [2019]   [Mar]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 4.19 081/149] usb: phy: fix link errors
    Date
    4.19-stable review patch.  If anyone has any objections, please let me know.

    ------------------

    [ Upstream commit f2105d42597f4d10e431b195d69e96dccaf9b012 ]

    Fix link errors when CONFIG_FSL_USB2_OTG is enabled and USB_OTG_FSM is
    set to module then the following link error occurs.

    aarch64-linux-gnu-ld: drivers/usb/phy/phy-fsl-usb.o: in function `fsl_otg_ioctl':
    drivers/usb/phy/phy-fsl-usb.c:1083: undefined reference to `otg_statemachine'
    aarch64-linux-gnu-ld: drivers/usb/phy/phy-fsl-usb.c:1083:(.text+0x574): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `otg_statemachine'
    aarch64-linux-gnu-ld: drivers/usb/phy/phy-fsl-usb.o: in function `fsl_otg_start_srp':
    drivers/usb/phy/phy-fsl-usb.c:674: undefined reference to `otg_statemachine'
    aarch64-linux-gnu-ld: drivers/usb/phy/phy-fsl-usb.c:674:(.text+0x61c): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `otg_statemachine'
    aarch64-linux-gnu-ld: drivers/usb/phy/phy-fsl-usb.o: in function `fsl_otg_set_host':
    drivers/usb/phy/phy-fsl-usb.c:593: undefined reference to `otg_statemachine'
    aarch64-linux-gnu-ld: drivers/usb/phy/phy-fsl-usb.c:593:(.text+0x7a4): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `otg_statemachine'
    aarch64-linux-gnu-ld: drivers/usb/phy/phy-fsl-usb.o: in function `fsl_otg_start_hnp':
    drivers/usb/phy/phy-fsl-usb.c:695: undefined reference to `otg_statemachine'
    aarch64-linux-gnu-ld: drivers/usb/phy/phy-fsl-usb.c:695:(.text+0x858): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `otg_statemachine'
    aarch64-linux-gnu-ld: drivers/usb/phy/phy-fsl-usb.o: in function `a_wait_enum':
    drivers/usb/phy/phy-fsl-usb.c:274: undefined reference to `otg_statemachine'
    aarch64-linux-gnu-ld: drivers/usb/phy/phy-fsl-usb.c:274:(.text+0x16f0): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `otg_statemachine'
    aarch64-linux-gnu-ld: drivers/usb/phy/phy-fsl-usb.o:drivers/usb/phy/phy-fsl-usb.c:619: more undefined references to `otg_statemachine' follow
    aarch64-linux-gnu-ld: drivers/usb/phy/phy-fsl-usb.o: in function `fsl_otg_set_peripheral':
    drivers/usb/phy/phy-fsl-usb.c:619:(.text+0x1fa0): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `otg_statemachine'
    make[1]: *** [Makefile:1020: vmlinux] Error 1
    make[1]: Target 'Image' not remade because of errors.
    make: *** [Makefile:152: sub-make] Error 2
    make: Target 'Image' not remade because of errors.

    Rework so that FSL_USB2_OTG depends on that the USB_OTG_FSM is builtin.

    Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
    Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    ---
    drivers/usb/phy/Kconfig | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    diff --git a/drivers/usb/phy/Kconfig b/drivers/usb/phy/Kconfig
    index d7312eed6088..91ea3083e7ad 100644
    --- a/drivers/usb/phy/Kconfig
    +++ b/drivers/usb/phy/Kconfig
    @@ -21,7 +21,7 @@ config AB8500_USB

    config FSL_USB2_OTG
    bool "Freescale USB OTG Transceiver Driver"
    - depends on USB_EHCI_FSL && USB_FSL_USB2 && USB_OTG_FSM && PM
    + depends on USB_EHCI_FSL && USB_FSL_USB2 && USB_OTG_FSM=y && PM
    depends on USB_GADGET || !USB_GADGET # if USB_GADGET=m, this can't be 'y'
    select USB_PHY
    help
    --
    2.19.1


    \
     
     \ /
      Last update: 2019-03-12 18:16    [W:2.229 / U:0.076 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site