From patchwork Wed Jun 21 22:06:06 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 106135 Delivered-To: patch@linaro.org Received: by 10.140.91.2 with SMTP id y2csp2154714qgd; Wed, 21 Jun 2017 15:07:42 -0700 (PDT) X-Received: by 10.13.196.134 with SMTP id g128mr27852197ywd.272.1498082862401; Wed, 21 Jun 2017 15:07:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1498082862; cv=none; d=google.com; s=arc-20160816; b=HHUpHzs/qqSS9XLbw2ZsIdO3kAy8eYAl4c3HMaqc06xFV8MajCruGurcjwY73ObL7d uCvZPy1UCCA4dmeTF/v77XxxSPKslCNC6qNua2PHKlsmXgY+jGmmX7hCyrvn4L86RVLw DGiyHEtVG4erxNJsEcCSW4uHjZUpmeB0fWjkyUSzN4ra1pG5fE/XyBtYZpWa5CtUa+Wq lnMSeiEyr+HQ+junKkoQfOa294Xh8+d/5P1dTDHZ2MhSPJYH1uKM19KBbtHCtq3/BdC0 wJ3otUYWETzn/yiTAtcDgh3fcEYWXtJvyKR2h8KsjC0aAcYU1bzpMG71MgGq/pyoseba F2hQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=QPfd9irFn7PU8jhi4B3tWjH/oa3rJb8YEmp8yCTHJU4=; b=PD3GOgnKf+MKelytjvlg296LE1LqjbCCCUb1lPqcA7n7l5AzrLwXl6JDpmcSK4aox3 yn2VPXLPw7GY2mcRJ57eWsrOYfXL8RSFjwCPIYafsa2q15HwTdGcKGaY8Uop3GYtKIJU sppC8S8CkGhqB9ugVUwzP8PGT8ZlxIz1JIQT8hiEhkm/8kX57GUn6W2n09NBd+4m7xnj +sxTsdQKSrcL1ye0eOFnw+7ckxrD6A8GuwD92LJ8VF8AHOfJ3xl5imfw5yvIbNaqgOlS KOKJzzSW2lF9lZepDSekYrWNdbzYITrJMm1CknaCetFf25x4WvRtVCI32vAchyHRY5FG 0N9g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n189si429874ywn.18.2017.06.21.15.07.42; Wed, 21 Jun 2017 15:07:42 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752227AbdFUWGv (ORCPT + 25 others); Wed, 21 Jun 2017 18:06:51 -0400 Received: from mout.kundenserver.de ([212.227.17.24]:58439 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751667AbdFUWGt (ORCPT ); Wed, 21 Jun 2017 18:06:49 -0400 Received: from wuerfel.lan ([5.56.224.194]) by mrelayeu.kundenserver.de (mreue103 [212.227.15.145]) with ESMTPA (Nemesis) id 0Lar3w-1e3PyC3UPw-00kNbF; Thu, 22 Jun 2017 00:06:32 +0200 From: Arnd Bergmann To: Florian Fainelli Cc: =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= , Kishon Vijay Abraham I , Andrew Lunn , netdev@vger.kernel.org, "David S . Miller" , Arnd Bergmann , linux-kernel@vger.kernel.org Subject: [RFC 1/2] net: phy: rework Kconfig settings for MDIO_BUS Date: Thu, 22 Jun 2017 00:06:06 +0200 Message-Id: <20170621220626.46691-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:ZhSJpKMM4ljfIsxwlp5x5/cs+eKgS2feXJOWItRiqCBrmOqnmsV +LQr7fZDnmiR6vpXy6mXp/WqP1ixa4wq4gTPGxP1kgSjpsTVI6UlJEQzX3T2gHJfTW30YZk L4Jg+Bu2V2uRjlAE3cLE2MDxincgEU2kDHV7MpOGP9sq+xS5layXaVMWk0WDzyIEGyw38t1 WKfNXq6zzgUZr4aSCk0zA== X-UI-Out-Filterresults: notjunk:1; V01:K0:G8Ov7gl5AeY=:sKpXKA3exhDELv9Ax28Dsx 6uwImlRLoSTH+WW5snfu3UThCslAJN8SfSKWvOePN8zTESGLzVuGr+OD8uLQJq94C4QwTThyT yw5nzkBet4U48IIiygsd6WlQkrz7yfNhwlVcyRKvNUJiRvPr+GwRPpH80hMM4R4PAyH+sj3VU 9SHngLfTViLOsUNnFS/NIyCySGHcq01EtQ2NmlR+tZSNq0jLhAhflJfiMhG10AqPQXkMUTZmL 1R2/+sPdBSM31KKU5znB13XwofW6zoa/WCYwIpIJyQ3UBbGoPCkTgeBOktNPIfBi5eevFrIae H0VpPeD9D0vTf2ydLguUSsnrvtGQek89+i2T+x+l/Ny/GLs+oHs+mj5mzaZ28Pe6VSOWDExMk MLtBlzY/huLbPuc2jU+iZmYUvtwtat93+suM3tOqq8R9NBYiz05z0gAUjcvHNZpZsFxnHx2ws HKxBQ5QCW+Ug+ld5esdIA8H62tsjUV6cToYg1gYmNFVJzKOavLmHj2yuTTAtSc9N0yPVa9wsM w5O36eEAhFKZf3OtpMdo8RZOsFHZgeN0myllIU7WmrxsOlfsMVd9AAGznq4R277JEDj9r2Fv3 aHZqJ51p25QBIBU+RJ6GKHWVA36o0A9uBTv7KIUFKbTwd7kRZrVQdiLngf6BlexbWsyIr7c/6 xQKiQaAXVY//zf3hJ/AU9Y375jbON+VVP4UkClrcTzCR01EkCFo1DbjRZ02Z4Sa24YiU= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org I still see build errors in randconfig builds and have had this patch for a while to locally work around it: drivers/built-in.o: In function `xgene_mdio_probe': mux-core.c:(.text+0x352154): undefined reference to `of_mdiobus_register' mux-core.c:(.text+0x352168): undefined reference to `mdiobus_free' mux-core.c:(.text+0x3521c0): undefined reference to `mdiobus_alloc_size' The idea is that CONFIG_MDIO_BUS now reflects whether the mdio_bus code is built-in or a module, and other drivers that use the core code can simply depend on that, instead of having a complex dependency line. Fixes: 90eff9096c01 ("net: phy: Allow splitting MDIO bus/device support from PHYs") Signed-off-by: Arnd Bergmann --- drivers/net/phy/Kconfig | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) -- 2.9.0 Reviewed-by: Florian Fainelli diff --git a/drivers/net/phy/Kconfig b/drivers/net/phy/Kconfig index 2dda72004a7d..928fd892f167 100644 --- a/drivers/net/phy/Kconfig +++ b/drivers/net/phy/Kconfig @@ -7,7 +7,16 @@ menuconfig MDIO_DEVICE help MDIO devices and driver infrastructure code. -if MDIO_DEVICE +config MDIO_BUS + tristate + default m if PHYLIB=m + default MDIO_DEVICE + help + This internal symbol is used for link time dependencies and it + reflects whether the mdio_bus/mdio_device code is built as a + loadable module or built-in. + +if MDIO_BUS config MDIO_BCM_IPROC tristate "Broadcom iProc MDIO bus controller" @@ -28,7 +37,6 @@ config MDIO_BCM_UNIMAC config MDIO_BITBANG tristate "Bitbanged MDIO buses" - depends on !(MDIO_DEVICE=y && PHYLIB=m) help This module implements the MDIO bus protocol in software, for use by low level drivers that export the ability to @@ -127,7 +135,6 @@ config MDIO_THUNDER tristate "ThunderX SOCs MDIO buses" depends on 64BIT depends on PCI - depends on !(MDIO_DEVICE=y && PHYLIB=m) select MDIO_CAVIUM help This driver supports the MDIO interfaces found on Cavium