From patchwork Thu Nov 7 06:36: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: 13865892 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 8012ED5AE6B for ; Thu, 7 Nov 2024 06:40:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:MIME-Version:Content-Type: Content-Transfer-Encoding:References:In-Reply-To:Message-ID:Date:Subject:Cc: To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=cH2vjZ2thek7RGOfUwjm1+5ZY5YuD6+EHAhHxSadIk0=; b=MSzYlnwsL+2Ezpg1QcuzqLHWpV MukUEgPQ+MJ+J6ACZqnfgVgqS63LLyYm4tI0OY4GOHt0ZiU5C/4sDV/2to1Z+SiJJvwGhwdLFoz5z q6L/mLaRPkp9m82tCGI7DBMnWXy96lK57pOLnkLBvX/OzpWdWPKYrK1wSbzugpgrpocG7kv2LCKe5 4XdNVG9svZU7sNJVFnP9Aim4OfLulYe4aB5Lo3uUYsUpAXUvx4/qr6ig+ykERBBEJZyJPkvcZOmTK QvxScCXetMCBeOOyWarOTdM6b1SKqIQJVC84bAaA8TGDbh/kpbHqH+4caJsaBbm3Uv++2bbGVlBVG MKOahS5A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t8wC1-00000005rwn-3hZY; Thu, 07 Nov 2024 06:40:33 +0000 Received: from mail-bjschn02on2070f.outbound.protection.partner.outlook.cn ([2406:e500:4440:2::70f] helo=CHN02-BJS-obe.outbound.protection.partner.outlook.cn) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t8w8b-00000005rIa-1fog for linux-arm-kernel@lists.infradead.org; Thu, 07 Nov 2024 06:37:02 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OfS71PvoBQnm7TdULqCk7TuaqRT2/NcJtx/0KPk/VPQokdEgsOx/9X6v3quUYfdmGyzriJPRrF/QObPucbklz+jv796BIytIbO1jB7UvQ0+u0QZqJb67uwNMrvdt2BhLE9C2q3gyJpr2JUPZX2BKoJLhxI/tohY9rwIuM7IFLjCynV7+W23eGQRpdpxu4u3qaCTrVI0jR0NkrjO4iWbYKw0QTjwXAvPykqV0ZImCAH8FQOOUwVjFuowWWmvrjtS/1qVjW+5h8nyzahVo6dwKaZvbdB5/W6FfA9auZ26/7pHibJEIa8DzB7cvobXSUK+JNP9OwxqC6l1/WS99Vys5oQ== 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=cH2vjZ2thek7RGOfUwjm1+5ZY5YuD6+EHAhHxSadIk0=; b=MVDp1KZySV+uGepbyDxchv9wAZmmgeKNRveEC++Ra5aArqh4Nnwfyu0k6j/S1QYU+xJUPLwI/BqwYxuKtjBldS99VEyMFp6fKTZtvoNa/ZFb+Y+lOVsh/McvwNOqxvT1kth7psuZ1WfT0Z0rNzYsODbPZtUqPkv97C16nffvILxDZxznKRm3AtKOeqQAaaHjkfQSga6HdbVaIXoPGgDyp9MCJwSj4gBlr56rgvIn8wfrFD4S6SvK+CHttl5+Qr1j1IYo5Ml/5mCD7Ci4Kmb+R5UBdG67Gap5Ow2K5SGFm8wZ/8wqyuo34lzU2rQEOqC2dmydD/c+smK9fs7jkmZT9Q== 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 ZQZPR01MB0963.CHNPR01.prod.partner.outlook.cn (2406:e500:c550:f::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8114.26; Thu, 7 Nov 2024 06:37:05 +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%5]) with mapi id 15.20.8114.023; Thu, 7 Nov 2024 06:37:05 +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: [PATCH net-next v3 1/3] net: stmmac: dwmac4: Fix MTL_OP_MODE_RTC mask and shift macros Date: Thu, 7 Nov 2024 14:36:34 +0800 Message-ID: <20241107063637.2122726-2-leyfoon.tan@starfivetech.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20241107063637.2122726-1-leyfoon.tan@starfivetech.com> References: <20241107063637.2122726-1-leyfoon.tan@starfivetech.com> X-ClientProxiedBy: NT0PR01CA0034.CHNPR01.prod.partner.outlook.cn (2406:e500:c510:c::11) To ZQZPR01MB0979.CHNPR01.prod.partner.outlook.cn (2406:e500:c550:f::12) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: ZQZPR01MB0979:EE_|ZQZPR01MB0963:EE_ X-MS-Office365-Filtering-Correlation-Id: e779b874-5d27-4fce-e928-08dcfef69850 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|1800799024|52116014|7416014|41320700013|38350700014; X-Microsoft-Antispam-Message-Info: E6aS3eSaZfMyJjqJWNCqISacKnX9Mh1bjTApX42f7LZqUdINn9u01xGuJb2jMBVHuyOrOuTdh2rpToKdQrxHd6oMAG5ZSGisAhnlnT2CkMIolDU2gYKNpYmvKiGwkgMB47OIL+OwkBsm9BTTwya8ewUmk0YzJOxmogkD6+oyuZ7j0qABiMX7OcTmjf1nn7yMzsqSa5Sj8bTuHvUgnC9lRt8Q3KtR1i3EjaV2kOIUYufyfLcBXTDsRcxxIo78X+5CJmLY5jtE6WorNbjXbPTGee140XLIGhwX1oNLP7WBuyZzMqSUMafkbZwsZRLK5t5G3vWhSS5HDFRS58uq76Nb595HNX588xSl9pboEQOF0jpsJ5ysGVkMHFv5KMHO/qzwenC+9DuyOaFQSOVzu0h5JEay+8EDXHMafLsjZ/1bHhfj9nxvDUmbroWC7y9LadKMNcIyMbVd9IfC6/artUXw3Rln3E9i5Jt/1J8/yt6oUsBZJm+0i0vJz0aoAmUNW99y4k+My2iM3l/TnI/CdPYoLVQBs9+C9T03zR/zJ4t0Sk0S/gs1xFruN3cRiYb4yfdbfx4R+pjSWvggk87+Xll34f0O2cqYqyMkg0LdimnitkMFcD4sALmxC6/7oLDIh46e 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)(366016)(1800799024)(52116014)(7416014)(41320700013)(38350700014);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: /GZMCGKsbZTgjJe3G4/TM80jWYPo8yC9w3XKmBEVZrLX+ytXl8cwrpJV/nmil/CUioSzhYGcGnrmpsTZtKz9rfCwh5xOz/di3Lw0oexOq1cwyQJeg6yakqHiExKQNuq+LkhdaFi2ywNx8ytcPtyxCf+6A2PMfV/kcgDuAslTHv/JqGSm8SUSF3+JoDY4xlpE9pkKrGX0Nl5Ly+zLgZsAD/6xoPVIdViPZ/DnpFhb5qEwnuiqEOl+tiWju9YGJlkjCa+dxXsF+vcqfBDIkUJjXtsTwTHWteXiXcIStLzDgUeU/UzwpKRv3fi2FCcKTKD+o95LXsV2GTrY2vYkMx/uwSgauueeTRvpsUK0h803WjFdYS25rlCpyW4+DGFGgxRbZx65xauNxsFbvmDvztOZ0ORGaoKNA+X9f3KeQ1rOcBIbhK//XPIWHqpynkaKKxmqdkKQw//tp9pDXRJ43emHUbYknSY22axDZ1yxf+nCZZFj5EWz88vI4ZzvmTth9cKH3B5XeZ5MW9FaOFJi0rPRE1OHT9np9ejAQFq4EfYFY0IRg2furlYKHvscitAZ2bz/kvzejMaqmNLlFGdrzQNM6k4rOza5pZ69E9tdhsypxLEDUwyeRgstlLQ8tqSaegtlLlpmcHHmS0cPEOTTWB5UVvq8D/spCTSqexOsPFrMLSvKgRwrwg1oB4HnOGbnR5x0CmWGM5dzHinctfWB+nFtkqX9jJt0HhHDcW3NzrEnZLv9Rg1sUumuxmvtkf9ZjziCT9+J8ANssQM4BB3SomNh10VbLDnjEtPUbIZOpFUdT6i6foeGRtdadlo3e3GoEtw3DcDWNk1HMt7Wjl8I6WCn5LHqJNLBiWR8jydOJ5PrW46Q0yTVyYpRpVA6wkPbG7XKXYPFL8apz63FBz6XpyWVeEydELDVFdlmzvB6sqTmdTWiLpHVSb/4f1QanEvq2zDJPxuUOiq7HnWl2ewlMeYwFIHJzut/nWz+/ffoeo1xbd3ySiBU+I3AGzX3srICZuBn56hVVUWexdWbMaqB9k3ks+2Hs1Z3DvCRaKuVRjVoDU2l5Aw8TNtWAgaPd32LjvQO1tUNGFCH0JjjnhtgsPu6eD8qRYm/6PxefMzWuIo3gl4+Xt1cojxsd5GBj9RbXvJ8hZH2Z4S67DbgsGowCPXdIl2Z37wfwMqV51s4qGLlMo5y9VDBEEmzvpRnUwkG5K5vvAU9M12Ptgorzb9Hv3IAFRvO1cvVKSCR7AGXMSO1eoQQ0dLneGDuJ0brC4hWjElSB89irlgoS4vlpqo5qlmkEyKT8q5jPGvLogj6nFaZtZEWziIt4bNiYsdIGsSza96V8w3UW0Y3A34Kt414raOAKvK1GyHeXwY7u503QqV5njg+LTRMEVRgrvVO+ApIPMej0seOCN1cEby3M5EAkJoxxlpYFrKir2Pj5orbIVMG6+Faq716I5+m83Gyk4vgugB0lxMtKUZfzp6LI4//4GvlSHOTC1HcneYLiWeWGJvO2S7GwJkNkEioa78uK5ojFc9WjPO1RcOfdOAYmjXYyJ3Hr4DlPNXVza+Q02yEs1eaiQ6uLqSWTzbGOkK6ikJ5bWnHTuxqfoJb077LIkVjBUcW2A== X-OriginatorOrg: starfivetech.com X-MS-Exchange-CrossTenant-Network-Message-Id: e779b874-5d27-4fce-e928-08dcfef69850 X-MS-Exchange-CrossTenant-AuthSource: ZQZPR01MB0979.CHNPR01.prod.partner.outlook.cn X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Nov 2024 06:37:05.2234 (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: 6NZ1o0phO+j7kXAAY8L4d4nub1S838IuEiJ9DdMPYS1LXTiTl158Ve4AFEChzpPq7Wh1j//KdykhBpRFjg8VIAhzh86nN8qPkS8nCiOdOsI= X-MS-Exchange-Transport-CrossTenantHeadersStamped: ZQZPR01MB0963 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241106_223701_460228_50AF9285 X-CRM114-Status: UNSURE ( 8.92 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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 Reviewed-by: Simon Horman --- 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 0c050324997a..184d41a306af 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac4.h +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac4.h @@ -393,8 +393,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