[PATCH 06/20] phy: rockchip-emmc: switch to HWORD_UPDATE macro
Nicolas Frattaroli
nicolas.frattaroli at collabora.com
Thu Jun 12 18:56:08 UTC 2025
The era of hand-rolled HIWORD_UPDATE macros is over, at least for those
drivers that use constant masks.
Replace the implementation of the rockchip eMMC PHY driver's
HIWORD_UPDATE macro with bitfield.h's HWORD_UPDATE. This makes the
change more easily reviewable.
Signed-off-by: Nicolas Frattaroli <nicolas.frattaroli at collabora.com>
---
drivers/phy/rockchip/phy-rockchip-emmc.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/phy/rockchip/phy-rockchip-emmc.c b/drivers/phy/rockchip/phy-rockchip-emmc.c
index 20023f6eb9944eaab505101d57e806476ecfac71..42423d4cd1811cd039a701895758050483d1c959 100644
--- a/drivers/phy/rockchip/phy-rockchip-emmc.c
+++ b/drivers/phy/rockchip/phy-rockchip-emmc.c
@@ -6,6 +6,7 @@
* Copyright (C) 2016 ROCKCHIP, Inc.
*/
+#include <linux/bitfield.h>
#include <linux/clk.h>
#include <linux/delay.h>
#include <linux/mfd/syscon.h>
@@ -21,7 +22,7 @@
* only if BIT(x + 16) set to 1 the BIT(x) can be written.
*/
#define HIWORD_UPDATE(val, mask, shift) \
- ((val) << (shift) | (mask) << ((shift) + 16))
+ (HWORD_UPDATE((mask) << (shift), (val)))
/* Register definition */
#define GRF_EMMCPHY_CON0 0x0
--
2.49.0
More information about the dri-devel
mailing list