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 18A68C43217 for ; Sun, 27 Nov 2022 15:28:29 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 8ACA385176; Sun, 27 Nov 2022 16:26:22 +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="bdu5iESo"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 98A8684FCC; Sun, 27 Nov 2022 16:25:59 +0100 (CET) Received: from mail-ej1-x62d.google.com (mail-ej1-x62d.google.com [IPv6:2a00:1450:4864:20::62d]) (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 063FE84F24 for ; Sun, 27 Nov 2022 16:25:57 +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-ej1-x62d.google.com with SMTP id ud5so20359288ejc.4 for ; Sun, 27 Nov 2022 07:25:57 -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=UmJXZEGcFIW7UcEvuwrpv1po77QcHFpxR3AoXZuCsro=; b=bdu5iESoYvH4+GqcRbuHYgw5H1jgBvhsx+6wRKOqVNNBOpLTCG+YTSOrmSQrEuE8C4 pho0bD4DIUtuP21jpJshQY4P7nedE3UXtwnLonUDi+VqIw7zVNo9clRpARmMsBB2I3cM kzbTO0/mnNtYtKMR9k3ZyOs+cVufbINVMmx+k= 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=UmJXZEGcFIW7UcEvuwrpv1po77QcHFpxR3AoXZuCsro=; b=MArhfspZH7eYScHW7Z5RtDKd9pzPF34qNhagu2U5eck5ZPIfHplPWAq/p1WcLDwe8w 2utMoVezdMyvaL1y/og53hm4/vWsYlsYR+yFYge68GoyNDqfAob+nGTfKcjPmt3KFXtA TOuo4dMVzH9dRwBPt/lV39G4VoeS7qaERkxn86sE2w7/u/NyhUpPSWec2b8+VrIhbZuY f3POej3CqTIuStlpqGeb2ypICgtvsFgO5B+D80nq2KUkjtn7WLgs5dxliJEnLJmhDwS8 fM/XSxRIozgdy+DtOCTMnbZTbDgKtBe41SO2Uqd5Ob8fHw07IEPHj4SsLvRq3sHAFsG8 bggA== X-Gm-Message-State: ANoB5pnyBtzAFChgItw9/BAIRAmKVNl3smclszoUHmmLffWoNWLZtDvM arYWlNfHpFUxTZc9SaFyHG7XPulb1tnYSw== X-Google-Smtp-Source: AA0mqf7WO7LnTNYJbE4BzQe2fu/9kvHw2IKEcaSZPorfLOJBm79t1IhLfzno+r5qVbHqCgK3ebbpxg== X-Received: by 2002:a17:906:b250:b0:7b2:86d5:8b14 with SMTP id ce16-20020a170906b25000b007b286d58b14mr40394440ejb.230.1669562756318; Sun, 27 Nov 2022 07:25:56 -0800 (PST) Received: from bill-the-cat.lan (2603-6081-7b00-6400-dc2c-1c0a-ea3e-04dc.res6.spectrum.com. [2603:6081:7b00:6400:dc2c:1c0a:ea3e:4dc]) by smtp.gmail.com with ESMTPSA id tb6-20020a1709078b8600b007b47749838asm3853036ejc.45.2022.11.27.07.25.55 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 27 Nov 2022 07:25:56 -0800 (PST) From: Tom Rini To: u-boot@lists.denx.de Subject: [PATCH 16/41] net: ethoc: Remove non-DM_ETH code Date: Sun, 27 Nov 2022 10:25:11 -0500 Message-Id: <20221127152536.1556469-16-trini@konsulko.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221127152536.1556469-1-trini@konsulko.com> References: <20221119234545.404563-38-trini@konsulko.com> <20221127152536.1556469-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 As DM_ETH is required for all network drivers, it's now safe to remove the non-DM_ETH support code. Signed-off-by: Tom Rini --- drivers/net/ethoc.c | 85 ---------------------------- include/dm/platform_data/net_ethoc.h | 4 -- 2 files changed, 89 deletions(-) diff --git a/drivers/net/ethoc.c b/drivers/net/ethoc.c index a219affb58a2..29067e9e9494 100644 --- a/drivers/net/ethoc.c +++ b/drivers/net/ethoc.c @@ -643,8 +643,6 @@ static inline int ethoc_phy_init(struct ethoc *priv, void *dev) #endif -#ifdef CONFIG_DM_ETH - static int ethoc_write_hwaddr(struct udevice *dev) { struct ethoc_eth_pdata *pdata = dev_get_plat(dev); @@ -753,86 +751,3 @@ U_BOOT_DRIVER(ethoc) = { .priv_auto = sizeof(struct ethoc), .plat_auto = sizeof(struct ethoc_eth_pdata), }; - -#else - -static int ethoc_init(struct eth_device *dev, struct bd_info *bd) -{ - struct ethoc *priv = (struct ethoc *)dev->priv; - - return ethoc_init_common(priv); -} - -static int ethoc_write_hwaddr(struct eth_device *dev) -{ - struct ethoc *priv = (struct ethoc *)dev->priv; - u8 *mac = dev->enetaddr; - - return ethoc_write_hwaddr_common(priv, mac); -} - -static int ethoc_send(struct eth_device *dev, void *packet, int length) -{ - return ethoc_send_common(dev->priv, packet, length); -} - -static void ethoc_halt(struct eth_device *dev) -{ - ethoc_disable_rx_and_tx(dev->priv); -} - -static int ethoc_recv(struct eth_device *dev) -{ - struct ethoc *priv = (struct ethoc *)dev->priv; - int count; - - if (!ethoc_is_new_packet_received(priv)) - return 0; - - for (count = 0; count < PKTBUFSRX; ++count) { - uchar *packetp; - int size = ethoc_rx_common(priv, &packetp); - - if (size < 0) - break; - if (size > 0) - net_process_received_packet(packetp, size); - ethoc_free_pkt_common(priv); - } - return 0; -} - -int ethoc_initialize(u8 dev_num, int base_addr) -{ - struct ethoc *priv; - struct eth_device *dev; - - priv = malloc(sizeof(*priv)); - if (!priv) - return 0; - dev = malloc(sizeof(*dev)); - if (!dev) { - free(priv); - return 0; - } - - memset(dev, 0, sizeof(*dev)); - dev->priv = priv; - dev->iobase = base_addr; - dev->init = ethoc_init; - dev->halt = ethoc_halt; - dev->send = ethoc_send; - dev->recv = ethoc_recv; - dev->write_hwaddr = ethoc_write_hwaddr; - sprintf(dev->name, "%s-%hu", "ETHOC", dev_num); - priv->iobase = ioremap(dev->iobase, ETHOC_IOSIZE); - - eth_register(dev); - - ethoc_mdio_init(dev->name, priv); - ethoc_phy_init(priv, dev); - - return 1; -} - -#endif diff --git a/include/dm/platform_data/net_ethoc.h b/include/dm/platform_data/net_ethoc.h index 855e9999a0a8..44547d14f53e 100644 --- a/include/dm/platform_data/net_ethoc.h +++ b/include/dm/platform_data/net_ethoc.h @@ -8,13 +8,9 @@ #include -#ifdef CONFIG_DM_ETH - struct ethoc_eth_pdata { struct eth_pdata eth_pdata; phys_addr_t packet_base; }; -#endif - #endif /* _ETHOC_H */ -- 2.25.1