Message ID | 20221123112625.2082797-4-o.rempel@pengutronix.de |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp2732236wrr; Wed, 23 Nov 2022 03:34:08 -0800 (PST) X-Google-Smtp-Source: AA0mqf6P/AGuV7bqzETtSxWQ6r98ymvmw4mkpXEKgIhmQiQiyJjstHg/5gGNYMjBAnvxJOeMaAqr X-Received: by 2002:a17:906:6d88:b0:7ad:b86b:3ff with SMTP id h8-20020a1709066d8800b007adb86b03ffmr24406738ejt.448.1669203248092; Wed, 23 Nov 2022 03:34:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669203248; cv=none; d=google.com; s=arc-20160816; b=Ews0Geby1SuRb5Rmddw46QkLFl/L5X42KPmxJ77JDL1KwLxEpAbOLcMhlxE8UpgYyd dOx//4Q7xKMr/EyR/ZvrcP8K+/QOajKOLAsFHYkwu9Ag8hinTBVtRicvHloSPfunw53t ALHMM5MdwMFdN2pVYyXv8uBac8q+ygK9LbsqReyCqX7pGX1z5zj4g1px7d12PMohpUIi TZi85Z3WP4+F5kKNzVZELR6Sbr+mBI8VxujyhNI/QfXz3j67DTvcakG8Wgg2ZBIxVr2m 8ffPbqQ+4WPjAOsI09Bb5Ew8LYDXIDYq+VGE/QY5aRxFzlzUQbcxKMxNpFjoafYxuMIl 6J0g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=iK5cN8ByIGaChYdijyCtpN9KKl5RJzFpP5av/reYnKY=; b=LCLCoRnI+0CpMHR/l+szLeI+Oa9ExJixcqeF2qYQiA73dpEK9hmxRZsgoCt7i6oTyL KuPNTset6cBC4tT9q4dTbqY2ZGMgYpUoRcJIn5PdiifCvyJOef653gOLorkk1KVjVAnN 7SNVSMFzwGddcL0av/bmoOth3+yAXgNW2P5W7BJKX5AJdB7tWCOKXwCkSwUBwQDMOhgG Xn0LfN2mJZXkdoaeIhRwZthfGxG7D703qxJomwOjG/ngH0FkuYO5hHZMWrRf14C42cwW peDKuz/vVF7+7rnpHqRoWVh20MEExU1C5qNL0hB9NgGDLAk8H+vokLmycZgzXWRzFH/l odZg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id fj17-20020a0564022b9100b0045928479b71si13037285edb.405.2022.11.23.03.33.44; Wed, 23 Nov 2022 03:34:08 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237347AbiKWL1P (ORCPT <rfc822;fengqi706@gmail.com> + 99 others); Wed, 23 Nov 2022 06:27:15 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32836 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236367AbiKWL0l (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 23 Nov 2022 06:26:41 -0500 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E7EB8ED5F0 for <linux-kernel@vger.kernel.org>; Wed, 23 Nov 2022 03:26:39 -0800 (PST) Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from <ore@pengutronix.de>) id 1oxntd-0003vp-Hd; Wed, 23 Nov 2022 12:26:29 +0100 Received: from [2a0a:edc0:0:1101:1d::ac] (helo=dude04.red.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from <ore@pengutronix.de>) id 1oxntb-0062RI-Fq; Wed, 23 Nov 2022 12:26:28 +0100 Received: from ore by dude04.red.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from <ore@pengutronix.de>) id 1oxntb-008jqt-7E; Wed, 23 Nov 2022 12:26:27 +0100 From: Oleksij Rempel <o.rempel@pengutronix.de> To: Woojung Huh <woojung.huh@microchip.com>, UNGLinuxDriver@microchip.com, Andrew Lunn <andrew@lunn.ch>, Vivien Didelot <vivien.didelot@gmail.com>, Florian Fainelli <f.fainelli@gmail.com>, Vladimir Oltean <olteanv@gmail.com>, "David S. Miller" <davem@davemloft.net>, Eric Dumazet <edumazet@google.com>, Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com> Cc: Oleksij Rempel <o.rempel@pengutronix.de>, Arun Ramadoss <arun.ramadoss@microchip.com>, kernel@pengutronix.de, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, Arun.Ramadoss@microchip.com Subject: [PATCH net-next v5 3/5] net: dsa: microchip: add ksz_rmw8() function Date: Wed, 23 Nov 2022 12:26:23 +0100 Message-Id: <20221123112625.2082797-4-o.rempel@pengutronix.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20221123112625.2082797-1-o.rempel@pengutronix.de> References: <20221123112625.2082797-1-o.rempel@pengutronix.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ore@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1750286464854524001?= X-GMAIL-MSGID: =?utf-8?q?1750286464854524001?= |
Series |
net: dsa: microchip: add MTU support for KSZ8 series
|
|
Commit Message
Oleksij Rempel
Nov. 23, 2022, 11:26 a.m. UTC
Add ksz_rmw8(), it will be used in the next patch. Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Acked-by: Arun Ramadoss <arun.ramadoss@microchip.com> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> --- drivers/net/dsa/microchip/ksz_common.h | 5 +++++ 1 file changed, 5 insertions(+)
diff --git a/drivers/net/dsa/microchip/ksz_common.h b/drivers/net/dsa/microchip/ksz_common.h index 61228be299f9..5f404a444ce1 100644 --- a/drivers/net/dsa/microchip/ksz_common.h +++ b/drivers/net/dsa/microchip/ksz_common.h @@ -454,6 +454,11 @@ static inline int ksz_write64(struct ksz_device *dev, u32 reg, u64 value) return regmap_bulk_write(dev->regmap[2], reg, val, 2); } +static inline int ksz_rmw8(struct ksz_device *dev, int offset, u8 mask, u8 val) +{ + return regmap_update_bits(dev->regmap[0], offset, mask, val); +} + static inline int ksz_pread8(struct ksz_device *dev, int port, int offset, u8 *data) {