Functions read_deviceid(), get_cpu_dev(), get_cpu_rev(), get_cpu_type()
and get_cpu_package() code are duplicated between stm32mp25x.c, 
stm32mp23x.c and stm32mp21x.c.

Migrate these functions into new stm32mp2x.c file.

Adds also a fix in read_deviceid() for STM32MP13 and STM32MP2x to avoid
a Synchronous abort.

Signed-off-by: Patrice Chotard <[email protected]>
---
Changes in v2:
- Fix typo in patch 1 commit title.
- Link to v1: 
https://lore.kernel.org/r/20260204-upstream_factorize_and_update_read_idc-v1-0-f41a063c2...@foss.st.com

---
Patrice Chotard (3):
      stm32mp2: Migrate duplicated code into stm32mp2x.c
      stm32mp2: Add check on syscon_get_first_range() return value
      stm32mp1: Add check on syscon_get_first_range() return value

 arch/arm/mach-stm32mp/stm32mp1/stm32mp13x.c |  7 ++++
 arch/arm/mach-stm32mp/stm32mp2/Makefile     |  1 +
 arch/arm/mach-stm32mp/stm32mp2/stm32mp21x.c | 44 --------------------
 arch/arm/mach-stm32mp/stm32mp2/stm32mp23x.c | 44 --------------------
 arch/arm/mach-stm32mp/stm32mp2/stm32mp25x.c | 46 ---------------------
 arch/arm/mach-stm32mp/stm32mp2/stm32mp2x.c  | 63 +++++++++++++++++++++++++++++
 6 files changed, 71 insertions(+), 134 deletions(-)
---
base-commit: 66891ffb14920e35abfafcae795cf4604de6682f
change-id: 20260203-upstream_factorize_and_update_read_idc-c0c548c5b198
prerequisite-change-id: 20260203-upstream_add_stm32mp21_support-0b0ed074dda9:v1
prerequisite-patch-id: 74f65301011fc90379e04dd25eebdf3cb2a24fe2
prerequisite-patch-id: cd2da5c9e5f556ca492c91ff76ee91cf939d126e
prerequisite-patch-id: 2f2d9574cac61f21c1caedf11601b3b79806e5ea
prerequisite-patch-id: ee473859e76b2783f858e603f0956ed7644192b1
prerequisite-patch-id: 79f85d5f5eccc0a773f973c2234939916bb84ef1
prerequisite-patch-id: fe65a2b4f620e362d1a963b00c8c9cda5c4a85f3
prerequisite-patch-id: 37714354f2763227c1ee72d57626c36687d03fb4

Best regards,
-- 
Patrice Chotard <[email protected]>

Reply via email to