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 96BD3C433EF for ; Mon, 11 Apr 2022 17:58:31 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 834E683E4C; Mon, 11 Apr 2022 19:57:04 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1649699825; bh=S9/68aQQYWdqoU1ChTSRpot66Y0qwUPFGOz6il+C7CQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=Fwm8ImeW7tflUe49UYpjAQf2zQnFuTrdDR2POMOwRJUSAgxI/Z2RtNxgxI6WNJwxw kGSKqNhe8A1YJwvUIGN8976CxxhBUVfZ2F53Y3O9kSetHAX6RHhTqdNJNe4G1Ik5ZB WnKAxiQJYuB1qHeMGTlaX/FsQLrPK0XL6Xbi9+TPRMjUODW4eJR+UzukyGVpepPqkr k10t1tq/5XwixicnrTmz5DmFaT++x5ZIUb3UjVBAUMQdAek8MlPs4dykpp65q85a5z YZqUkS5L45YBjTaPZM48nBnzFzv2IiHqKd2VtHkyo0IQm77hfLCcx0sDPp1ntwpBAb pT+67S9zMxQpg== Received: from tr.lan (ip-86-49-12-201.net.upcbroadband.cz [86.49.12.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: marex@denx.de) by phobos.denx.de (Postfix) with ESMTPSA id B40EE83BAC; Mon, 11 Apr 2022 19:56:36 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1649699797; bh=S9/68aQQYWdqoU1ChTSRpot66Y0qwUPFGOz6il+C7CQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=UOOrgn1RIwjOlIXfmkVTyCAZoFYs+Annf9NmeF7zN5kyLJHEgrh1lPchrU+2DQm8z DKDJIpLvexYBFyyKgBbnNtcD1kHK40ZtvomOynmWkzDLJ2LNCGHxnzcSVQ5zSi+D2w NXbo32JwRIt5sqezejNJqvR+WiRiJM/zTCbIXnBInWQNRWUaNM57MLlYHVvqwXW9mf kYZOX0aRoNuWIMWGwKXVAeZmR2lEFUWh8n0qYSPP3XqRz5r7KFGV+WUjZAAC64lf+E lvOHQ2cMhbibYAgPSVujqsRradVJ/qoGf4ybpyHedBhnmVm3amfSwUTnvbALHqaJZy GTyZwAa+IyniQ== From: Marek Vasut To: u-boot@lists.denx.de Cc: marcel.ziswiler@toradex.com, trini@konsulko.com, Marek Vasut , Joe Hershberger , Ramon Fried Subject: [PATCH 11/16] net: dm9000: Drop dm9000.h and staticize SROM access Date: Mon, 11 Apr 2022 19:56:02 +0200 Message-Id: <20220411175607.626034-11-marex@denx.de> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220411175607.626034-1-marex@denx.de> References: <20220411175607.626034-1-marex@denx.de> 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.5 at phobos.denx.de X-Virus-Status: Clean Dispose of dm9000.h because none of the function prototypes declared in it are called anywhere in the codebase. Staticize dm9000_read_srom_word() because it is now called only from within the dm9000 driver. Drop dm9000_write_srom_word() because it is no longer used. Signed-off-by: Marek Vasut Cc: Joe Hershberger Cc: Ramon Fried --- drivers/net/dm9000x.c | 13 +------------ include/dm9000.h | 16 ---------------- 2 files changed, 1 insertion(+), 28 deletions(-) delete mode 100644 include/dm9000.h diff --git a/drivers/net/dm9000x.c b/drivers/net/dm9000x.c index 666883ee19e..3c0d848b10f 100644 --- a/drivers/net/dm9000x.c +++ b/drivers/net/dm9000x.c @@ -53,7 +53,6 @@ #include #include #include -#include #include #include "dm9000x.h" @@ -556,7 +555,7 @@ static int dm9000_rx(struct eth_device *dev) * Read a word data from SROM */ #if !defined(CONFIG_DM9000_NO_SROM) -void dm9000_read_srom_word(int offset, u8 *to) +static void dm9000_read_srom_word(int offset, u8 *to) { dm9000_iow(DM9000_EPAR, offset); dm9000_iow(DM9000_EPCR, 0x4); @@ -566,16 +565,6 @@ void dm9000_read_srom_word(int offset, u8 *to) to[1] = dm9000_ior(DM9000_EPDRH); } -void dm9000_write_srom_word(int offset, u16 val) -{ - dm9000_iow(DM9000_EPAR, offset); - dm9000_iow(DM9000_EPDRH, ((val >> 8) & 0xff)); - dm9000_iow(DM9000_EPDRL, (val & 0xff)); - dm9000_iow(DM9000_EPCR, 0x12); - mdelay(8); - dm9000_iow(DM9000_EPCR, 0); -} - static void dm9000_get_enetaddr(struct eth_device *dev) { int i; diff --git a/include/dm9000.h b/include/dm9000.h deleted file mode 100644 index f780e513f69..00000000000 --- a/include/dm9000.h +++ /dev/null @@ -1,16 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0+ */ -/* - * NOTE: DAVICOM DM9000 ethernet driver interface - * - * Authors: Remy Bohmer - */ -#ifndef __DM9000_H__ -#define __DM9000_H__ - -/****************** function prototypes **********************/ -#if !defined(CONFIG_DM9000_NO_SROM) -void dm9000_write_srom_word(int offset, u16 val); -void dm9000_read_srom_word(int offset, u8 *to); -#endif - -#endif /* __DM9000_H__ */ -- 2.35.1