From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 03403C4332F for ; Sat, 19 Nov 2022 23:50:41 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id D27F3852A9; Sun, 20 Nov 2022 00:46:42 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com 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=konsulko.com header.i=@konsulko.com header.b="h2jdMaIF"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id A1C3C84913; Sun, 20 Nov 2022 00:46:13 +0100 (CET) Received: from mail-qt1-x835.google.com (mail-qt1-x835.google.com [IPv6:2607:f8b0:4864:20::835]) (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 E973285200 for ; Sun, 20 Nov 2022 00:46:05 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=trini@konsulko.com Received: by mail-qt1-x835.google.com with SMTP id h21so5396419qtu.2 for ; Sat, 19 Nov 2022 15:46:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=JMASp0kUKVszLrFtaDrlFncrOVQwjOaUOdyjHeBE+OY=; b=h2jdMaIFT6Ykw4ilGnQ9uqlCJNPRTXvU/cQbkHfXNj4Mncmc14eTwVBDUWhfDFND0p IxonAQuOHnYN/nCUcmdA8hOr8HY1/di6GR6dzEYhXkjuX3IkF9RH+Mzw7D30LBYSMr4Q gzhjaVtSvFS4eRZegMW7Z7me8vbu1WLGW7464= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=JMASp0kUKVszLrFtaDrlFncrOVQwjOaUOdyjHeBE+OY=; b=XIWttX1qukJtsnLaFNyn0YsSeuQeqrYPOPfKjO7XRJHR1E/Sp2051rRHQ+Z9/z3hHC W3T8NW3cReV28Wt4TYksTUFZ5+ZWhqoBKMebhgIvPS22kSmaFiMZ6hnpPUw/b8X8/ha4 SJEQxTY18a9YDbh7fC3OKpziovel+G2ChtBg9EVmN3ylqbNeL1E3B95RlWNlHWNA7oVW qDl+M9FjfRyp8fSWL+3Sd8S45+K3/BEIYL3XEhBLSRbHyWLJOAW3bc7oIAOAM4Vm6RyR j+AJ30en837jBEh2PTBO5b/dOdfhti7u29OJVTZFvJhqBGgoHKPEYL1WpMT+I8q3C8Qn O9IQ== X-Gm-Message-State: ANoB5pnH2GckXP8JfpLrOTsVjiq2ZRk25OeS2zGQh4K110CkecG9176p H1q2MH95dLaGuaSGpmawAOz6CBbX6kRIkg== X-Google-Smtp-Source: AA0mqf6kit7JM6X2fup0Udo6+dPNc2NkMWq2ucNMsEA3xkcE+MIFOuryaQZF5481ndK2HbtX+AGfPg== X-Received: by 2002:ac8:43d0:0:b0:3a4:f758:1c81 with SMTP id w16-20020ac843d0000000b003a4f7581c81mr1927960qtn.456.1668901565372; Sat, 19 Nov 2022 15:46:05 -0800 (PST) Received: from bill-the-cat.lan (2603-6081-7b00-6400-55ec-b699-c19f-3363.res6.spectrum.com. [2603:6081:7b00:6400:55ec:b699:c19f:3363]) by smtp.gmail.com with ESMTPSA id y11-20020a37f60b000000b006ce1bfbd603sm5169743qkj.124.2022.11.19.15.46.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 19 Nov 2022 15:46:05 -0800 (PST) From: Tom Rini To: u-boot@lists.denx.de Subject: [PATCH 33/38] net: ftmac100: Remove non-DM_ETH code Date: Sat, 19 Nov 2022 18:45:40 -0500 Message-Id: <20221119234545.404563-33-trini@konsulko.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221119234545.404563-1-trini@konsulko.com> References: <20221119234545.404563-1-trini@konsulko.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.6 at phobos.denx.de X-Virus-Status: Clean At this point all users of this driver enable DM_ETH, so remove the legacy code paths. Signed-off-by: Tom Rini --- drivers/net/ftmac100.c | 91 +----------------------------------------- 1 file changed, 2 insertions(+), 89 deletions(-) diff --git a/drivers/net/ftmac100.c b/drivers/net/ftmac100.c index c30ace96bb13..f710c271c64b 100644 --- a/drivers/net/ftmac100.c +++ b/drivers/net/ftmac100.c @@ -17,10 +17,10 @@ #include #include "ftmac100.h" -#ifdef CONFIG_DM_ETH #include + DECLARE_GLOBAL_DATA_PTR; -#endif + #define ETH_ZLEN 60 struct ftmac100_data { @@ -231,92 +231,6 @@ static int _ftmac100_send(struct ftmac100_data *priv, void *packet, int length) return 0; } -#ifndef CONFIG_DM_ETH -/* - * disable transmitter, receiver - */ -static void ftmac100_halt(struct eth_device *dev) -{ - struct ftmac100_data *priv = dev->priv; - return _ftmac100_halt(priv); -} - -static int ftmac100_init(struct eth_device *dev, struct bd_info *bd) -{ - struct ftmac100_data *priv = dev->priv; - return _ftmac100_init(priv , dev->enetaddr); -} - -static int _ftmac100_recv(struct ftmac100_data *priv) -{ - struct ftmac100_rxdes *curr_des; - unsigned short len; - curr_des = &priv->rxdes[priv->rx_index]; - len = __ftmac100_recv(priv); - if (len) { - /* pass the packet up to the protocol layers. */ - net_process_received_packet((void *)curr_des->rxdes2, len); - _ftmac100_free_pkt(priv); - } - return len ? 1 : 0; -} - -/* - * Get a data block via Ethernet - */ -static int ftmac100_recv(struct eth_device *dev) -{ - struct ftmac100_data *priv = dev->priv; - return _ftmac100_recv(priv); -} - -/* - * Send a data block via Ethernet - */ -static int ftmac100_send(struct eth_device *dev, void *packet, int length) -{ - struct ftmac100_data *priv = dev->priv; - return _ftmac100_send(priv , packet , length); -} - -int ftmac100_initialize (struct bd_info *bd) -{ - struct eth_device *dev; - struct ftmac100_data *priv; - dev = malloc (sizeof *dev); - if (!dev) { - printf ("%s(): failed to allocate dev\n", __func__); - goto out; - } - /* Transmit and receive descriptors should align to 16 bytes */ - priv = memalign (16, sizeof (struct ftmac100_data)); - if (!priv) { - printf ("%s(): failed to allocate priv\n", __func__); - goto free_dev; - } - memset (dev, 0, sizeof (*dev)); - memset (priv, 0, sizeof (*priv)); - - strcpy(dev->name, "FTMAC100"); - dev->iobase = CONFIG_FTMAC100_BASE; - dev->init = ftmac100_init; - dev->halt = ftmac100_halt; - dev->send = ftmac100_send; - dev->recv = ftmac100_recv; - dev->priv = priv; - priv->iobase = dev->iobase; - eth_register (dev); - - return 1; - -free_dev: - free (dev); -out: - return 0; -} -#endif - -#ifdef CONFIG_DM_ETH static int ftmac100_start(struct udevice *dev) { struct eth_pdata *plat = dev_get_plat(dev); @@ -445,4 +359,3 @@ U_BOOT_DRIVER(ftmac100) = { .plat_auto = sizeof(struct eth_pdata), .flags = DM_FLAG_ALLOC_PRIV_DMA, }; -#endif -- 2.25.1