From patchwork Fri Nov 1 08:23:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ley Foon Tan X-Patchwork-Id: 13859048 X-Patchwork-Delegate: kuba@kernel.org Received: from CHN02-SH0-obe.outbound.protection.partner.outlook.cn (mail-sh0chn02on2096.outbound.protection.partner.outlook.cn [139.219.146.96]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 531B5199FC9; Fri, 1 Nov 2024 09:57:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=139.219.146.96 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730455076; cv=fail; b=PX+YH9WKG0CHC76RE/f/3Uytl2W3JSwKgOnCZco0at0ejCjRQMMVfI147NnxqoDMYB2wFrbeEWN3j06She8XcYe8yv6fBKIY3LRLwTSkme2aO6LD1azuu5nMglgPBn7cS03fUFteedOFNzmZkOdy9mR4wER2T0vz2Vx3FtawfBw= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730455076; c=relaxed/simple; bh=2NvD15LNkjZuc+hxij3G+HIru5sVuk2IvYTigAQ2uOg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: Content-Type:MIME-Version; b=NGftUQyuyD9qHucvBH11W463yPgKQhtPFhCVLbfJMRbfzTGH9hwnIfMHgMQPiFFvbSp6QCTBjKOzCkH2ryVxJ14rcEW2Q23jPmkJsv+RHlM86FgB3O2wWWqnVAIsC1J+vIPTaMC8tMiSof/zfa4AeG+2jZ8TlPkqZJ2Wu32D4jM= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=starfivetech.com; spf=pass smtp.mailfrom=starfivetech.com; arc=fail smtp.client-ip=139.219.146.96 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=starfivetech.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=starfivetech.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ih+s83I2zICJitjMtc/HRAt++70j4MZE/nqH9KJoDQsYc6lAaNHXuMgiRQZGGSQ7Lu0kJ88f7fyeG2hjI5SrWlsPnUrnFjF9lBh/Wb6HDLAVfLtRYKJ9ti2VOXCP+C5UJIx57LguwdeCcqzqv5ifqQtKN6u09dKUe1HQDfj41/P4HAFXdJOfXX+YF7F7QK26RlxosLhW8XeGgQP4S+IKN0LHHTmP1seDm0HsSQXBw/8BGqNDRo7Fop/whuuRh/eswLhUwapYPXSgWjo2X67eKGKfOD7kzczp70LZ14nAbfq+DjeVrvh52YuakvVgoG2uR/ZL7O09Ul+qSNA9D1+Fqg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=C4OJP3dG+b6jMtZirVxAkm3476iD1/vHph0fe7hIxNE=; b=bSzT8fbWL4TmxQPmN5JLDMXfv0HD6ETw+3GbMtlBBwldrZvg62Ky1KB46Prb94dDWCAiu+envqU0bID1zWMI4au/qdzkfOl+mJ5N9inaACVn4QAmpoxYyuAAKH9oGsI2mLkOeWXGjtC8Au8GYvbv+VM8r1pTy1HGIZs7jpZ6wEB1wA8rvTqjHPR1pj27lpNMVKqUuZRR8hDsmeIt87meAfnthCc37fgsPdjDnsdoWGlLMrKyYRbIK3PjrjLh486fCwjP1brOse/6VFXoz3KSwEfl5tOcv754IWnZgYRzMZHWqVPskj0KlNnCGuHpg3P4FWp1uhNy6aLDFJJjXbahUA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=starfivetech.com; dmarc=pass action=none header.from=starfivetech.com; dkim=pass header.d=starfivetech.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=starfivetech.com; Received: from ZQZPR01MB0979.CHNPR01.prod.partner.outlook.cn (2406:e500:c550:f::12) by ZQZPR01MB1107.CHNPR01.prod.partner.outlook.cn (2406:e500:c550:f::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8069.27; Fri, 1 Nov 2024 08:24:04 +0000 Received: from ZQZPR01MB0979.CHNPR01.prod.partner.outlook.cn ([fe80::617c:34a2:c5bf:8095]) by ZQZPR01MB0979.CHNPR01.prod.partner.outlook.cn ([fe80::617c:34a2:c5bf:8095%4]) with mapi id 15.20.8069.016; Fri, 1 Nov 2024 08:24:04 +0000 From: Ley Foon Tan To: Alexandre Torgue , Jose Abreu , Andrew Lunn Cc: "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Maxime Coquelin , netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, lftan.linux@gmail.com, leyfoon.tan@starfivetech.com Subject: [net-next v2 1/3] net: stmmac: dwmac4: Fix MTL_OP_MODE_RTC mask and shift macros Date: Fri, 1 Nov 2024 16:23:34 +0800 Message-ID: <20241101082336.1552084-2-leyfoon.tan@starfivetech.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20241101082336.1552084-1-leyfoon.tan@starfivetech.com> References: <20241101082336.1552084-1-leyfoon.tan@starfivetech.com> X-ClientProxiedBy: ZQ0PR01CA0015.CHNPR01.prod.partner.outlook.cn (2406:e500:c550:5::9) To ZQZPR01MB0979.CHNPR01.prod.partner.outlook.cn (2406:e500:c550:f::12) Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: ZQZPR01MB0979:EE_|ZQZPR01MB1107:EE_ X-MS-Office365-Filtering-Correlation-Id: 62a34ed3-a266-4c8c-d4c3-08dcfa4e8ba2 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|366016|52116014|7416014|41320700013|38350700014; X-Microsoft-Antispam-Message-Info: GRG4iQHE1R7vsdiUBqeW/0IP2SX9LxilKEIRaucZV9PxgFdQGYS9c5sAYZgbuqTDlufrM0SRD4GQPPJAVBzkrNGSP7pfRkamH4BE1zgas6Jd/2DlyVC1pq5JnEjFzvcVSt9/5rIV9rxNCcelYeKy/YuHp5pypb9FdFCYlRhUTSV4prhDIppvcsIOw+n+aNivEghjiRH42EwGPIz73K5PakdBF54nLG4pw4Whofe4oe9GtSI4klvX4NLmk+x7WwtgEnzOEcfqEKBNaur5ycd7b/OVi2JNId3gI0KUfC8xf3qrQhnx2ORcjKr1DAIdllXOqrsruBmE5f90vQZHHpv94dZtARXL1bJ13sis6ezsBJOoIMsaFukZXlY2aRGqtYDGhcP3jrYja0izVcktmhOvvfgpFaHPg/1DG4Et/RqQuDHzMxmIQTJoLOSKaJ2Adx8NC5Pi9eXbDhvFbslJOqSJUyOW7JVoViADv3xI3DUcPpa7fHyWgZuKgWbGZaCSmoo9NH/jr2SX94hC1HLtT16vEK+uc7ZCT5P/3Aj2LN/Bm6Cu9DolQZ/CCXnklKXPhg0EVorkCBFBVrMIqMAmGXITx/5xoTKvLHLQuxHNviwijiJX+mQoPwaQN4YNyMBcWKMj X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:ZQZPR01MB0979.CHNPR01.prod.partner.outlook.cn;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(366016)(52116014)(7416014)(41320700013)(38350700014);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-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f7Ia4BJEG8TRKuKMyqawq/Xrv/+JevwNrT3mfQP1zQ2qYnbpo14TjUdkePjTmy5LmK1o85Hd3ez4SC1AHpZb1njmc5jEcBOZnRQLDk0HlhSzAsL051QeHJ7fZ/aRnIla6HFsr38jjyadDL63WG/B1aDdjNuee1cYTDjD3XwFYhEITI/vMgL+oa14Rjkgpg7e+GXwRQETWU168lZ85wDFQVXLhy5WcSGXckrq+QsHSmrKFPGTxMEj8WqfTewwkFtVKYkZcpI/Z6Y4IHo5Iq4aCWyJzm3/+DpER5F8CW5aqC9Gi/mECy3bwdlPfErPimtTtpNXdaLkgE6go+XICZNZMdVw5bdmSnqxbrtr6I71LuH4EGWkqATlXzdlFk+ZKsnY0MchQrS9OPF5UGy5wppdg82B7JsDnYExOQB3ThNpLckkBbwFTcx+nS4dlaj/HmQiayE5n1it4ZYMk6FltYMp3kEhggAETg1ZhHcTyRUuRIzUGvfUQ/483jr+auFK2wNRCadffsolC7+yrYPvR9D6ugxQSc2exZbw4tEh3V5KfFm4wHQPTE= X-OriginatorOrg: starfivetech.com X-MS-Exchange-CrossTenant-Network-Message-Id: 62a34ed3-a266-4c8c-d4c3-08dcfa4e8ba2 X-MS-Exchange-CrossTenant-AuthSource: ZQZPR01MB0979.CHNPR01.prod.partner.outlook.cn X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Nov 2024 08:24:03.8803 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 06fe3fa3-1221-43d3-861b-5a4ee687a85c X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 2hFhLD9lsl4h5hBRIXTtvRp2lXwXfieQekIsK6tqwmibz+H6FEb3jks76hW/LdsyG7ClINrQjOuIe5HAH04M+chOuiChhxxoecvT9wmzWto= X-MS-Exchange-Transport-CrossTenantHeadersStamped: ZQZPR01MB1107 X-Patchwork-Delegate: kuba@kernel.org RTC fields are located in bits [1:0]. Correct the _MASK and _SHIFT macros to use the appropriate mask and shift. Signed-off-by: Ley Foon Tan --- drivers/net/ethernet/stmicro/stmmac/dwmac4.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac4.h b/drivers/net/ethernet/stmicro/stmmac/dwmac4.h index 28fff6cab812..dd21dcfbbab3 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac4.h +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac4.h @@ -394,8 +394,8 @@ static inline u32 mtl_chanx_base_addr(const struct dwmac4_addrs *addrs, #define MTL_OP_MODE_EHFC BIT(7) -#define MTL_OP_MODE_RTC_MASK 0x18 -#define MTL_OP_MODE_RTC_SHIFT 3 +#define MTL_OP_MODE_RTC_MASK GENMASK(1, 0) +#define MTL_OP_MODE_RTC_SHIFT 0 #define MTL_OP_MODE_RTC_32 (1 << MTL_OP_MODE_RTC_SHIFT) #define MTL_OP_MODE_RTC_64 0