Received: by 2002:a25:23cc:0:0:0:0:0 with SMTP id j195csp1039548ybj; Tue, 5 May 2020 11:54:34 -0700 (PDT) X-Google-Smtp-Source: APiQypLozpp4FIwf0rnfuQJljIPn3vGfkan4Y2TWf2YwPV3w3k9jThA12dIVMZbQm7SuOCyyM9Cn X-Received: by 2002:a17:906:b2c2:: with SMTP id cf2mr3985267ejb.262.1588704874450; Tue, 05 May 2020 11:54:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588704874; cv=none; d=google.com; s=arc-20160816; b=XyY5SfNrYH2oaRBR1fhUKBOyBtHXrA1m7Pqn9D234NK9bdcWRitAy1ZWpHkLR+svqS uc2f67ykePIJer0bHg1tlh+9gLAoSdx0yhxHwfJiPOiDhcKxfgqJz6ctUqWyniSC49OG s/gH/Cy4vd5rNqhhpWpK4TPhe1KJcIwXUickged3gFdibv3fekfyh990sl0tGW9XvD1S xvezpAZ/1W/sqXXrT7f/TPK3rfV/UHANU+RyPxA+2Ck1JblRDgCTKlkbr+W8TvfkLHxs 5t/gX8z1sFh4JrAEMkH+dyZHXX2/57xfGq6pn9loKuUPngnQU2V7l8M2hWzJXVY/1itF K+MQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=fQtcPUQW49oPTnT+jASB+pu5t+m5qPdUelhle+W5F4o=; b=BtnNqvT/KFz/5DhJBLwI/SROsJWD56+Wpzz4XICVayFbanNardkueWno+ht9eY4hVs v/dGjPyzY4vTY4JLXKFns3pxggYBF3B0AOOiA/BsHTsHAQbBM2gnEZktFLNvQl5ZY0Ie i5f25o8G94zXUPl3lUT1UiiDbUkXr6RvbbnRJ2SnxXKQHJW36L6VPy+I0EFt465R3EF+ xN70k+GWfSJUMQbsNnXCxTmuhnN1tNBEXR7RNq3BRFS61AhdFlEPddfvGNBrgWNbqLHv orU2Dg/Um++W30PNs0EeuPIsNOf+i+MxywIF/MPhpIgu6qZ9XUAwlVAer/VeYhLjtTCv HOHQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=e2LM4c7y; 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=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g3si1783437edp.190.2020.05.05.11.54.09; Tue, 05 May 2020 11:54:34 -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=@linaro.org header.s=google header.b=e2LM4c7y; 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=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729038AbgEESuc (ORCPT + 99 others); Tue, 5 May 2020 14:50:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35822 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728076AbgEESub (ORCPT ); Tue, 5 May 2020 14:50:31 -0400 Received: from mail-lj1-x241.google.com (mail-lj1-x241.google.com [IPv6:2a00:1450:4864:20::241]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 59AA7C061A0F for ; Tue, 5 May 2020 11:50:31 -0700 (PDT) Received: by mail-lj1-x241.google.com with SMTP id h4so2756518ljg.12 for ; Tue, 05 May 2020 11:50:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=fQtcPUQW49oPTnT+jASB+pu5t+m5qPdUelhle+W5F4o=; b=e2LM4c7y4U0BetC/gB0eIa7BcxIovrqW2+yMivftL2EUsrm9A/3tzPHnkWrENn0+BY 3u8nlKnzNbvWltqUbePhaEVeITEBqdy3oJ/OoqwDOACo021vaWG3fpFzoZBwAEfpJ/T7 +AgIzXtc4NJ1zsQ+y6SrWc1RKchP8F8XxTSv08dWWyQ2BtBnzBt+iy4L92tZ3UliSHEx lZPLffC2w/YnG5vf5M2YiUUcpWIt7S3jEiV8hAHP9h79nVayw4X1+qTG0d8wF3MY8iSJ v9f/mCqFam0KZFjTCQpO/p7SAEWfWjm3aKaNwCqNALVOt0eWz/CsLXXLRBCOZRGKAVY5 N1LA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=fQtcPUQW49oPTnT+jASB+pu5t+m5qPdUelhle+W5F4o=; b=LSQuXYLhlik0NKwjjC0eAFuj91quSGBYx+Mqkvn3SeeCcaiQX8dTvVpgdBmrICORXj DTdo7/A/jGf/dUhdxqNTs52s9RpsPkiBTbt+gf6paR1pIjUJDm2W1/z7p1nJ67uT61Ww Y4SOTxr5+JWVa2kcCWEJ7BC5d9Oi/H2m0lgG1uQTJPj/yUwLVGEqSweHzVIeSKM3iuDl zeEYLiJNbJwWc1be35HOZp5OQ2zuGwRCBIkGn6DU+tXRH5SNZaOT2j1XEMO81gUSSg5J dz+fbh42xLqwVfVQBsy3x9P9jwgIFY1UmVcKQHbq8VGtIgblmr1FOXD9lAJ2ewELGRI/ jVGw== X-Gm-Message-State: AGi0PuaK8/16zaMytY/E7xggQjYIAL67YOur3K5Gd6wtRPodDgyDV66W yTxgsEbLMo+VpDqgqT8dAjK+TVPuL5u09+wg6WnqSw== X-Received: by 2002:a05:651c:107a:: with SMTP id y26mr2697805ljm.80.1588704629773; Tue, 05 May 2020 11:50:29 -0700 (PDT) MIME-Version: 1.0 References: <20200505162123.13366-1-grygorii.strashko@ti.com> In-Reply-To: <20200505162123.13366-1-grygorii.strashko@ti.com> From: Anders Roxell Date: Tue, 5 May 2020 20:50:18 +0200 Message-ID: Subject: Re: [PATCH net-next] net: ethernet: ti: am65-cpts: fix build To: Grygorii Strashko Cc: "David S. Miller" , Networking , Sekhar Nori , Linux Kernel Mailing List , Linux ARM Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 5 May 2020 at 18:21, Grygorii Strashko wrote: > > 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 Tested-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 Don't we want to move this so it is below the other 'depends on' ? Cheers, Anders > 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 >