Received: by 2002:a25:23cc:0:0:0:0:0 with SMTP id j195csp905552ybj; Tue, 5 May 2020 09:24:46 -0700 (PDT) X-Google-Smtp-Source: APiQypJzCNndSwjWyrmMYITLF9QaKI49DkdX0i6UuB16a31KUOAqEf6JOcwG0tAq8oOL8NkasE7U X-Received: by 2002:a17:906:7d1:: with SMTP id m17mr3342919ejc.247.1588695886086; Tue, 05 May 2020 09:24:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588695886; cv=none; d=google.com; s=arc-20160816; b=oIIwibMQHLBZDrffQXq54MK/mXqS2STQYSvjwP97ktd78892WWhNhY8YzFSAr1tj7T k2YVQC9EAlyy9wDWV073yUypvUW2sn+7S1yx+f4DkBec8ZO2kv6bRbXcXTtU9lFuSL3I R1oBJ8tUOV25VqoVSVf6wIVhib5vgWE8HVhQf8eeM/8J914pnoAKtpmV/aqEqg4b7sMB FIelMAYIJgytu2+oBAg7aOAFkPuzZ8BkvnWGdYbtyj2ryhYPxsJvdYOzkLobUJlMC5Yd feZMWyMio78tXv5Oxg+ih35wAGkJiURg3O8JHLDJGQmwWKya4bRHNKY2JAymsYenE5ko 5n3w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from:dkim-signature; bh=OxUyjvjTpC4dkBUPPz1IUnY359iQO02H2M1zKF1GPlc=; b=gTK8iSKnLyd/gV43fXe/sB7vCDrsmmW8sSUcfpQAdFYsvdmWKB2E/9EEL2omGaUvO5 0Yybdl52/Ol0Ax1YoKzDfzSH2H9+PdXJ9IqH/b/7sgl5SjS+3i6PNQmhB3LKpkeWW2jS 5f3Kkg66Rp7eazK4trSrMTN8fV0mmk4QGug4vdu7SZ8LzNFQQgra5rxB1BHQBR7FPrD1 Kc51kkVkNOwNN9ftWQ7DcA7mVdBNtiTXWcj8PXl5GbGdwo69DCxup3l5WikKxw46weoO 5FiK4QhvpgJWGKCO6nrQgXe1DaqtePq/S7uywB8u02Yz0zuYqCUU6LXM2E00Q8V9r6Lr 4wXQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=RbzphmRf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j13si1549015edn.465.2020.05.05.09.24.21; Tue, 05 May 2020 09:24:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=RbzphmRf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730530AbgEEQVh (ORCPT + 99 others); Tue, 5 May 2020 12:21:37 -0400 Received: from lelv0143.ext.ti.com ([198.47.23.248]:45014 "EHLO lelv0143.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729119AbgEEQVh (ORCPT ); Tue, 5 May 2020 12:21:37 -0400 Received: from fllv0034.itg.ti.com ([10.64.40.246]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id 045GLVnj022356; Tue, 5 May 2020 11:21:31 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1588695691; bh=OxUyjvjTpC4dkBUPPz1IUnY359iQO02H2M1zKF1GPlc=; h=From:To:CC:Subject:Date; b=RbzphmRfOpEU1RoFFZjjFWb0wr6p1BzWmY3ZnlTL9AQT3O0gTHH4Xr7copS1vrCeu quUAd71JiKxoQTk9o7HDQCbCu23xb3OXLWrUD/oKWp9QR67+RhJs8pFR7i65K7kC2o kvWBkrD5XX8CX4PH3nwZwUs5DEhf9Z/GMfYGnUAk= Received: from DFLE114.ent.ti.com (dfle114.ent.ti.com [10.64.6.35]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 045GLV6Y087775 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 5 May 2020 11:21:31 -0500 Received: from DFLE104.ent.ti.com (10.64.6.25) by DFLE114.ent.ti.com (10.64.6.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1979.3; Tue, 5 May 2020 11:21:31 -0500 Received: from lelv0326.itg.ti.com (10.180.67.84) by DFLE104.ent.ti.com (10.64.6.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1979.3 via Frontend Transport; Tue, 5 May 2020 11:21:31 -0500 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0326.itg.ti.com (8.15.2/8.15.2) with ESMTP id 045GLUkF026653; Tue, 5 May 2020 11:21:30 -0500 From: Grygorii Strashko To: "David S. Miller" , Anders Roxell CC: , Sekhar Nori , , , Grygorii Strashko Subject: [PATCH net-next] net: ethernet: ti: am65-cpts: fix build Date: Tue, 5 May 2020 19:21:23 +0300 Message-ID: <20200505162123.13366-1-grygorii.strashko@ti.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Type: text/plain X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org It's possible to have build configuration which will force PTP_1588_CLOCK=m and so TI_K3_AM65_CPTS=m while still have TI_K3_AM65_CPSW_NUSS=y. This will cause build failures: aarch64-linux-gnu-ld: ../drivers/net/ethernet/ti/am65-cpsw-nuss.o: in function `am65_cpsw_init_cpts': ../drivers/net/ethernet/ti/am65-cpsw-nuss.c:1685: undefined reference to `am65_cpts_create' aarch64-linux-gnu-ld: ../drivers/net/ethernet/ti/am65-cpsw-nuss.c:1685:(.text+0x2e20): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `am65_cpts_create' Fix it by adding dependencies from CPTS in TI_K3_AM65_CPSW_NUSS as below: config TI_K3_AM65_CPSW_NUSS ... depends on TI_K3_AM65_CPTS || !TI_K3_AM65_CPTS Note. This will create below dependencies and for NFS boot + CPTS all of them have to be built-in. PTP_1588_CLOCK -> TI_K3_AM65_CPTS -> TI_K3_AM65_CPSW_NUSS While here, clean up TI_K3_AM65_CPTS definition. Fixes: b1f66a5bee07 ("net: ethernet: ti: am65-cpsw-nuss: enable packet timestamping support") Signed-off-by: Grygorii Strashko Reported-by: Anders Roxell --- drivers/net/ethernet/ti/Kconfig | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/ti/Kconfig b/drivers/net/ethernet/ti/Kconfig index 4ab35ce7b451..988e907e3322 100644 --- a/drivers/net/ethernet/ti/Kconfig +++ b/drivers/net/ethernet/ti/Kconfig @@ -99,7 +99,7 @@ config TI_K3_AM65_CPSW_NUSS depends on ARCH_K3 && OF && TI_K3_UDMA_GLUE_LAYER select TI_DAVINCI_MDIO imply PHY_TI_GMII_SEL - imply TI_AM65_CPTS + depends on TI_K3_AM65_CPTS || !TI_K3_AM65_CPTS help This driver supports TI K3 AM654/J721E CPSW2G Ethernet SubSystem. The two-port Gigabit Ethernet MAC (MCU_CPSW0) subsystem provides @@ -112,9 +112,8 @@ config TI_K3_AM65_CPSW_NUSS config TI_K3_AM65_CPTS tristate "TI K3 AM65x CPTS" - depends on ARCH_K3 && OF && PTP_1588_CLOCK + depends on ARCH_K3 && OF depends on PTP_1588_CLOCK - select NET_PTP_CLASSIFY help Say y here to support the TI K3 AM65x CPTS with 1588 features such as PTP hardware clock for each CPTS device and network packets -- 2.17.1