Message ID | 20221124101458.3353902-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 q4csp3304660wrr; Thu, 24 Nov 2022 02:21:02 -0800 (PST) X-Google-Smtp-Source: AA0mqf6lqpy1cvL5zn2AQjg/pcwe+5SVrp6fB2KhE/3OfdFBxipOg0d2mQDqe0T6ucjpQ5Pw4u4T X-Received: by 2002:a17:906:3ac1:b0:78d:36d8:1814 with SMTP id z1-20020a1709063ac100b0078d36d81814mr26262244ejd.99.1669285262677; Thu, 24 Nov 2022 02:21:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669285262; cv=none; d=google.com; s=arc-20160816; b=jzJEzUgiKPp4p9sUK6YddjA1BtpJj0n2/Y3FZtKVhjTj/D3u1ewk9AwMoQfzl8Bx/L AWzBiHmwiNqJupslE/WJcOUSXGt81VhiFR8csnY4YNgKZ7Le0Fl4vjLefz51Oq6caVBh 5WFc0GDewEwvjILEkYFvXdZWmh9RRBUobS+ru6SbtMaC/CUtq2Y/iNVya1qhQqQNYLp9 IvsfHBcfUvq/zII0/yrTp/c2DjUCEHJ4PksmZEWnZjUxbTSNbpGaCygXKySnmV+aNkU7 RukqmQs61Gt//AicWrBTBvKWxPmtSMIgwzaLiZbvgJvGampEMpZilmIy2EL6vlPiV0AI xR2w== 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=sdXfs+niImqI32P9xt9MxOCSgPq0jJsiEMqGX3CFafYjajMCoAsWPhQqPKs+t6QrQh 1AjIF+C5sSV09dRUyDcgJMsueZGIdn4j/opXHhTrFQdyjyL6xuANmLFzxs3tMUSpfYb6 OAFKpy0aHdYiXM1qXd6sooaO86fA48pkm8fdXx//QQJr4pu1p263An2UN+nn11z3lbCI A2svOlZjDTDQ5B/WQWt6qB6tocVpO9bxkZUK2kRrzyHriB00JA8oYqNzsg4j4ft5xcnY yLWkFJnnIYXSqob00G1T5AJcxwN24k8FDIJj8cHXwIQpKuu0cpwXzykFDFmwAtlz1kAl uC5A== 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 z13-20020a50cd0d000000b0045743696acbsi831881edi.139.2022.11.24.02.20.36; Thu, 24 Nov 2022 02:21:02 -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 S229959AbiKXKP1 (ORCPT <rfc822;fengqi706@gmail.com> + 99 others); Thu, 24 Nov 2022 05:15:27 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58074 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229817AbiKXKPO (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 24 Nov 2022 05:15:14 -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 B0B4BC053D for <linux-kernel@vger.kernel.org>; Thu, 24 Nov 2022 02:15:12 -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 1oy9G4-0004Id-1z; Thu, 24 Nov 2022 11:15:04 +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 1oy9G0-0000jU-Bb; Thu, 24 Nov 2022 11:15:01 +0100 Received: from ore by dude04.red.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from <ore@pengutronix.de>) id 1oy9Fz-00E4Wg-Ln; Thu, 24 Nov 2022 11:14:59 +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 v6 3/6] net: dsa: microchip: add ksz_rmw8() function Date: Thu, 24 Nov 2022 11:14:55 +0100 Message-Id: <20221124101458.3353902-4-o.rempel@pengutronix.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20221124101458.3353902-1-o.rempel@pengutronix.de> References: <20221124101458.3353902-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?1750372463542813035?= X-GMAIL-MSGID: =?utf-8?q?1750372463542813035?= |
Series |
net: dsa: microchip: add MTU support for KSZ8 series
|
|
Commit Message
Oleksij Rempel
Nov. 24, 2022, 10:14 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) {