From patchwork Tue Jan 22 10:36:02 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anders Roxell X-Patchwork-Id: 156290 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp7412260jaa; Tue, 22 Jan 2019 02:36:21 -0800 (PST) X-Google-Smtp-Source: ALg8bN6XZ7hfS4/uNn4QVQjO/i8YQaApe+om7cRUs2gGUwGLB+dKVZ0Cg6hyGB+PG8bUhYIEYh5a X-Received: by 2002:a17:902:7448:: with SMTP id e8mr11242636plt.120.1548153381772; Tue, 22 Jan 2019 02:36:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548153381; cv=none; d=google.com; s=arc-20160816; b=qcpUjM2DhYqajOvEk5zw5KIsqaW/j6F29zKdvMwarv8ylJI0N3jPlef2F2QUUK8jvq Nz9PIYJNfiw6ruU6MbcyBteBwKuRWzs/r0J8GXm57+aKkl7Xw4TjqgLnVY8+3W7ot7n4 3YfP44p9KgcEUhoVCWX/3IKKiaI9NIZ+L+7kgDNu8o/gS3tEqt67JnXRFVkO8UXMduRT 3nRjR0ZiMJF7jHZyXnehNOTVEm7PKAQ40kwzyxbdLTCkY1okWrixqf7zY6es+nzNyJ+K XZhD8aloNhfZVYAyqkfxb+CH/gx8GtRWDWi6pV5gYGl/d7Oa1Libq6bCk3/Tk6vXPRlS qQKw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=YSObxwMHqtkC/awE9I+bX0AU7eKOCKScYLfpaQugPuE=; b=o7hsjkDNRpiC9k5CU0Lsg6WiyCMVkZCzrP6J83eWuAeWbquDQ34JnJb7soU6EAsF+N DYZmR1y5N8PnkDHP6SW/g2xvFMk86zaLLm55h0d59HdDsutMchUtXF8ACRLYTjwbzQ6W jAHVM8aZZq+xi2wdKoH7YvwV9mw5Fpb4hUd/rSKYM4SBs+3tOwbV5dMw4JIyrpu6wjbB SQQiW0fBECqBCIwqyAamDJXi0EJRxWRbz0La42Q4C41VWxvbTGhETpieuFOKUCUInv6l UJRkD9uilkJshJxdGYW7kf/cEvlqAC+IDtarKginNBAi05lwVQPQ2/Br6/DByZwUyYGv gJ1g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ccP0SZnD; spf=pass (google.com: best guess record for domain of linux-usb-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-usb-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t6si15743967plz.96.2019.01.22.02.36.21; Tue, 22 Jan 2019 02:36:21 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-usb-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ccP0SZnD; spf=pass (google.com: best guess record for domain of linux-usb-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-usb-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727680AbfAVKgU (ORCPT + 5 others); Tue, 22 Jan 2019 05:36:20 -0500 Received: from mail-lj1-f196.google.com ([209.85.208.196]:33321 "EHLO mail-lj1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727655AbfAVKgU (ORCPT ); Tue, 22 Jan 2019 05:36:20 -0500 Received: by mail-lj1-f196.google.com with SMTP id v1-v6so20174840ljd.0 for ; Tue, 22 Jan 2019 02:36:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=YSObxwMHqtkC/awE9I+bX0AU7eKOCKScYLfpaQugPuE=; b=ccP0SZnDW53Tty9adhgMbars1kax5HN6gnRZch4Cj6BLS9FX8AeQQRog/3F5qu0QoB adegLU0/UyoM/vTV2qZQ7PiR66YouofnDMmXgerVXgj3Bm1/btX6hDsk5a2ROFxX3asz 8CY2yr5kZKJK07Y3HqVyiqNb8UZDPoY5DoPTs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=YSObxwMHqtkC/awE9I+bX0AU7eKOCKScYLfpaQugPuE=; b=oKaEnLsLU4uPginPyM3qj6SllP3kS+J0PYYz4gkwNjszUyxlMU/jd0D4xkzF3wsusj d0woOTt+o2tim/nhuFMT9Vqhq9YjlPQdV2L90wUYBl0TzkQTqCuKWTaaqnSFDZ/oXHZG RhAGLov20tctVx4rYyVXZvi7ifjuS/tgk4c5paTN6bkNgN4wKBZv8ZdyLZh2EvEJSODy eQf07O/FN60p3LpnzyEJ2ewOpdLlAgkcBf6h+wdco+e3oypuySpPYmaqmJ4K4povg+gd KcGViujh2n/Jqq/R3PxDR9sqw3IqlpmI81lxFrfU2ltyGt/SnB8DZDcOsiIBRvrUBDCS tAKA== X-Gm-Message-State: AJcUukcZVXYh4ZbgeNCfc7PGM6I8Uehz0NbPdhV+l/RmUCm4xIdFNv5W HXec+Y+sVkAsp2o6NNB4EyQ4Zg== X-Received: by 2002:a2e:9dcb:: with SMTP id x11-v6mr21579413ljj.158.1548153378296; Tue, 22 Jan 2019 02:36:18 -0800 (PST) Received: from localhost (c-573670d5.07-21-73746f28.bbcust.telenor.se. [213.112.54.87]) by smtp.gmail.com with ESMTPSA id l21-v6sm2737684ljj.48.2019.01.22.02.36.17 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 22 Jan 2019 02:36:17 -0800 (PST) From: Anders Roxell To: balbi@kernel.org, gregkh@linuxfoundation.org Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, Anders Roxell Subject: [PATCH] usb: phy: fix link errors Date: Tue, 22 Jan 2019 11:36:02 +0100 Message-Id: <20190122103602.2641-1-anders.roxell@linaro.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org 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 --- drivers/usb/phy/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.20.1 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