Skip to contentSkip to conversation

rtc: mpc5121: replace in_8/out_8 with generic accessors

PATCH New Rosen Penev 2 participants 2 messages Oct 4 Real time clock (RTC)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 rtc: mpc5121: replace in_8/out_8 with generic accessors

Convert the PowerPC-specific in_8/out_8, in_be16/out_be16 and in_be32/out_be32 accessors to the portable ioread8/iowrite8, ioread16be/iowrite16be and ioread32be/iowrite32be. On PowerPC these use the same ordered MMIO accessors, so behaviour is unchanged.

With no PowerPC-only accessors left, allow COMPILE_TEST, and add the HAS_IOMEM dependency the generic accessors need.

Assisted-by LLM
---
 drivers/rtc/Kconfig       |  3 +-
 drivers/rtc/rtc-mpc5121.c | 80 +++++++++++++++++++--------------------
 2 files changed, 42 insertions(+), 41 deletions(-)
drivers/rtc/Kconfig +2 -1
index 0636b9ead2c2..8c0ac7e7a582 100644
@@ -1773,7 +1773,8 @@ config RTC_DRV_MC13XXX
 
 config RTC_DRV_MPC5121
 	tristate "Freescale MPC5121 built-in RTC"
-	depends on PPC_MPC512x || PPC_MPC52xx
+	depends on PPC_MPC512x || PPC_MPC52xx || COMPILE_TEST
+	depends on HAS_IOMEM
 	help
 	  If you say yes here you will get support for the
 	  built-in RTC on MPC5121 or on MPC5200.
drivers/rtc/rtc-mpc5121.c +40 -40

167 lines not on this page · raw message

Signature · 1 line
2.56.0
#1 lore raw
Sashiko has reviewed this patch and found no issues. It looks great!
Quoted 10 lines

Convert the PowerPC-specific in_8/out_8, in_be16/out_be16 and in_be32/out_be32 accessors to the portable ioread8/iowrite8, ioread16be/iowrite16be and ioread32be/iowrite32be. On PowerPC these use the same ordered MMIO accessors, so behaviour is unchanged.

With no PowerPC-only accessors left, allow COMPILE_TEST, and add the HAS_IOMEM dependency the generic accessors need.

Assisted-by LLM

Sashiko has reviewed this patch and found no issues. It looks great!

Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1