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=-19.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,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 0F044C432BE for ; Mon, 2 Aug 2021 01:07:46 +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 89EBF60E97 for ; Mon, 2 Aug 2021 01:07:45 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 89EBF60E97 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 8F5708336F; Mon, 2 Aug 2021 03:07:31 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="BSLJJpsv"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id B3D57831D6; Mon, 2 Aug 2021 03:05:36 +0200 (CEST) Received: from mail-oo1-xc2a.google.com (mail-oo1-xc2a.google.com [IPv6:2607:f8b0:4864:20::c2a]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 69A0582B4E for ; Mon, 2 Aug 2021 02:55:10 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-oo1-xc2a.google.com with SMTP id h7-20020a4ab4470000b0290263c143bcb2so4036288ooo.7 for ; Sun, 01 Aug 2021 17:55:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ymFSPciXycgJ3lDEbdk40SQDh2IoSY8JHzRdnNGvmxs=; b=BSLJJpsva8ZJD7NTRMZX64yaKuv0FULW8xMONBRhPtK7pMl+Sl+4+vkbX0Y2a+QEKb XLBwt/Abw6b1TEnw7mfGXNhiHA5qrdEiKtV+s+ufK8X3bcmUvxqfmAI38731kfH6uiuP Ti4rxpTHEcyqIYbMF+HDnVWN0n6DTugMc5Geo= 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=ymFSPciXycgJ3lDEbdk40SQDh2IoSY8JHzRdnNGvmxs=; b=FoLx3AuIgJP88GjOpd7myouEv2F3+yTAPE7AiH4qvUTx4BnruuVBCENgU2SgQ+MxLg jM2m1TK8nIl/jfO7/bTBVCAwkDWILrmv7uTujpkzaj2GwEQCsLWRcNKcFmoEWCci3z62 jpOYnAjHf3YQwvEv8Euj5jW446CTb0x5E4wfyeiQbMWLz6PBz3yulkmcC64EyDOcWaFH cQFExyfkhVOdPiQOkS95atTwFLxavE6jr0ynDzhytWi/AhKS6xGH17ExnnuliYCegUBk 3roTQLoWnpbCTW1/4/PUO2sTA9OAWV1XvaHwAnz5YB+REEJT55A/7rkRpuEx7pwbWmEc oOEw== X-Gm-Message-State: AOAM530ftMK35zjg2S0w5kA7F0I3HmMtmQBVh1xY2LTwWQ1IjsnZloKT RxoidvwP33oYeU8yp4CMnGwFCxGJlD8RxN+2 X-Google-Smtp-Source: ABdhPJw9Va7Z1SBfKCHMx3E9I5CxgHZgsACP88PasQa0X7nZTH541RXr65SZ0nkIWkI8IFPbvBP7qQ== X-Received: by 2002:a4a:d0c3:: with SMTP id u3mr9026552oor.6.1627865708456; Sun, 01 Aug 2021 17:55:08 -0700 (PDT) Received: from kiwi.bld.corp.google.com (c-67-190-101-114.hsd1.co.comcast.net. [67.190.101.114]) by smtp.gmail.com with ESMTPSA id s2sm1452616ooc.15.2021.08.01.17.55.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 01 Aug 2021 17:55:08 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Simon Glass , Joe Hershberger Subject: [PATCH v2 21/32] net: Drop DM_PCI check from designware driver Date: Sun, 1 Aug 2021 18:54:34 -0600 Message-Id: <20210802005446.2267075-22-sjg@chromium.org> X-Mailer: git-send-email 2.32.0.554.ge1b32706d8-goog In-Reply-To: <20210802005446.2267075-1-sjg@chromium.org> References: <20210802005446.2267075-1-sjg@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 We don't need this check anymore since when PCI is enabled, driver model is always used. Drop it. Signed-off-by: Simon Glass --- (no changes since v1) drivers/net/designware.c | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/drivers/net/designware.c b/drivers/net/designware.c index 5d92257e74d..5aaac603a0e 100644 --- a/drivers/net/designware.c +++ b/drivers/net/designware.c @@ -756,16 +756,16 @@ int designware_eth_write_hwaddr(struct udevice *dev) static int designware_eth_bind(struct udevice *dev) { -#ifdef CONFIG_DM_PCI - static int num_cards; - char name[20]; - - /* Create a unique device name for PCI type devices */ - if (device_is_on_pci_bus(dev)) { - sprintf(name, "eth_designware#%u", num_cards++); - device_set_name(dev, name); + if (IS_ENABLED(CONFIG_PCI)) { + static int num_cards; + char name[20]; + + /* Create a unique device name for PCI type devices */ + if (device_is_on_pci_bus(dev)) { + sprintf(name, "eth_designware#%u", num_cards++); + device_set_name(dev, name); + } } -#endif return 0; } @@ -831,12 +831,11 @@ int designware_eth_probe(struct udevice *dev) else reset_deassert_bulk(&reset_bulk); -#ifdef CONFIG_DM_PCI /* * If we are on PCI bus, either directly attached to a PCI root port, * or via a PCI bridge, fill in plat before we probe the hardware. */ - if (device_is_on_pci_bus(dev)) { + if (IS_ENABLED(CONFIG_PCI) && device_is_on_pci_bus(dev)) { dm_pci_read_config32(dev, PCI_BASE_ADDRESS_0, &iobase); iobase &= PCI_BASE_ADDRESS_MEM_MASK; iobase = dm_pci_mem_to_phys(dev, iobase); @@ -844,7 +843,6 @@ int designware_eth_probe(struct udevice *dev) pdata->iobase = iobase; pdata->phy_interface = PHY_INTERFACE_MODE_RMII; } -#endif debug("%s, iobase=%x, priv=%p\n", __func__, iobase, priv); ioaddr = iobase; -- 2.32.0.554.ge1b32706d8-goog