From patchwork Wed Nov 25 23:24:56 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lukasz Majewski X-Patchwork-Id: 11932355 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=-16.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,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 E4BA6C56201 for ; Wed, 25 Nov 2020 23:27:21 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 660D62083E for ; Wed, 25 Nov 2020 23:27:21 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="dCRFEgwQ" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 660D62083E Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=YabTT4zS75Dqkx9a72XngKGvdqQMbxZsSbGAOIrbn0g=; b=dCRFEgwQh3meoSxLxegMyFqtZ OkJlYFRxs4B39+EtzdkbR2b6LZ9j/L6lS8EO4g8sXdlIXUx/HuCZyFq+mmBGaF6tQnzYmT7++5UF7 x2sPfO3BkvzSwzGfdgaa+AqVlb9biv8+3O3qZTXa//rlXeMGfeXGOnB96VJOIa44dVUzRd10Pa40V 4iTg4L434/O57Gy+kG7jZ1yzxxkUP3kvTFfq7P03MyKzMqM7pY5wD8Y1CkfTegnhw86Gx+/ypPBFg xCXQ42Lw8r83XuRZ2zG026Mmeg+MawYTwRcJ1Hi+Yd/6c9eslN139hSrX7ZZNSG2Ya9Ke0zV7fM8i O2WdlPUkg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1ki4Ai-00012P-Rj; Wed, 25 Nov 2020 23:26:00 +0000 Received: from mail-out.m-online.net ([2001:a60:0:28:0:1:25:1]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1ki4AY-00010D-Sy for linux-arm-kernel@lists.infradead.org; Wed, 25 Nov 2020 23:25:54 +0000 Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 4ChH7b4jj5z1rwZq; Thu, 26 Nov 2020 00:25:45 +0100 (CET) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 4ChH7Y1vZ5z1vdfs; Thu, 26 Nov 2020 00:25:45 +0100 (CET) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id Bo2OedDOC47N; Thu, 26 Nov 2020 00:25:43 +0100 (CET) X-Auth-Info: Pw9YCvMdnOzlHdaksvWkRNQhWgJkn2CYCowWoZ/VK/w= Received: from localhost.localdomain (89-64-5-98.dynamic.chello.pl [89.64.5.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Thu, 26 Nov 2020 00:25:43 +0100 (CET) From: Lukasz Majewski To: Fugang Duan , "David S . Miller" , Jakub Kicinski , netdev@vger.kernel.org, Andrew Lunn , Fabio Estevam , Vivien Didelot Subject: [RFC 1/4] net: fec: Move some defines to ./drivers/net/ethernet/freescale/fec.h header Date: Thu, 26 Nov 2020 00:24:56 +0100 Message-Id: <20201125232459.378-2-lukma@denx.de> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201125232459.378-1-lukma@denx.de> References: <20201125232459.378-1-lukma@denx.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201125_182551_082727_388EB7B8 X-CRM114-Status: GOOD ( 12.10 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peng Fan , Florian Fainelli , stefan.agner@toradex.com, linux-kernel@vger.kernel.org, krzk@kernel.org, Lukasz Majewski , NXP Linux Team , Vladimir Oltean , Shawn Guo , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org After this change ECR (control register) defines are moved to fec.h, so they can be reused by L2 switch code. Signed-off-by: Lukasz Majewski --- drivers/net/ethernet/freescale/fec.h | 3 +++ drivers/net/ethernet/freescale/fec_main.c | 3 --- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/freescale/fec.h b/drivers/net/ethernet/freescale/fec.h index 832a2175636d..c555a421f647 100644 --- a/drivers/net/ethernet/freescale/fec.h +++ b/drivers/net/ethernet/freescale/fec.h @@ -189,6 +189,9 @@ #define FEC_RXIC2 0xfff #endif /* CONFIG_M5272 */ +/* FEC ECR bits definition */ +#define FEC_ECR_MAGICEN (1 << 2) +#define FEC_ECR_SLEEP (1 << 3) /* * Define the buffer descriptor structure. diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c index fb37816a74db..bd29c84fd89a 100644 --- a/drivers/net/ethernet/freescale/fec_main.c +++ b/drivers/net/ethernet/freescale/fec_main.c @@ -249,9 +249,6 @@ MODULE_PARM_DESC(macaddr, "FEC Ethernet MAC address"); #define FEC_MMFR_RA(v) ((v & 0x1f) << 18) #define FEC_MMFR_TA (2 << 16) #define FEC_MMFR_DATA(v) (v & 0xffff) -/* FEC ECR bits definition */ -#define FEC_ECR_MAGICEN (1 << 2) -#define FEC_ECR_SLEEP (1 << 3) #define FEC_MII_TIMEOUT 30000 /* us */