Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5BC8CC2B9F4 for ; Mon, 28 Jun 2021 13:31:30 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C00CF61463 for ; Mon, 28 Jun 2021 13:31:29 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C00CF61463 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 054BA82DD5; Mon, 28 Jun 2021 15:31:20 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=arm.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by phobos.denx.de (Postfix, from userid 109) id DAD2082DD8; Mon, 28 Jun 2021 15:31:16 +0200 (CEST) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by phobos.denx.de (Postfix) with ESMTP id 06BD882B7D for ; Mon, 28 Jun 2021 15:31:10 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=andre.przywara@arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id EC8E81042; Mon, 28 Jun 2021 06:31:08 -0700 (PDT) Received: from localhost.localdomain (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 13EF33F718; Mon, 28 Jun 2021 06:31:07 -0700 (PDT) From: Andre Przywara To: Joe Hershberger , Ramon Fried Cc: u-boot@lists.denx.de, Marek Vasut Subject: [PATCH 0/2] net: smc911x: Determine bus width at runtime Date: Mon, 28 Jun 2021 14:30:29 +0100 Message-Id: <20210628133031.17765-1-andre.przywara@arm.com> X-Mailer: git-send-email 2.14.1 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean The SMC911x Ethernet MACs can be integrated using a 16 or 32-bit bus. The driver needs to know about this choice, which is the reason for us having a Kconfig symbol for that. Now this bus width is already described using a devicetree property, and since the driver is DM compliant and is using the DT now, we should query this at runtime. We leave the Kconfig choice around, in case the DT is missing this property. Patch 1/2 simplifies the current Kconfig choice, to be a single symbol instead of a two-options choice. This helps with patch 2/2, which queries the DT to learn about the bus width, falling back to the Kconfig symbol if the property cannot be found. Cheers, Andre Andre Przywara (2): net: smc911x: Drop redundant CONFIG_SMC911X_16_BIT Kconfig symbol net: smc911x: Determine bus width at runtime drivers/net/Kconfig | 17 +++++------------ drivers/net/smc911x.c | 41 ++++++++++++++++++++--------------------- 2 files changed, 25 insertions(+), 33 deletions(-) -- 2.17.5