reset: starfive: Factor out common JH71X0 reset code
authorEmil Renner Berthing <kernel@esmil.dk>
Sat, 1 Apr 2023 11:19:21 +0000 (19:19 +0800)
committerConor Dooley <conor.dooley@microchip.com>
Wed, 5 Apr 2023 14:43:53 +0000 (15:43 +0100)
commit1ec3d20e4e2fef33c618b2ef550cbf3b4728e4cd
tree185112a160b4990d098cb7702606529a65a1ad2d
parent69bfec7548f4c1595bac0e3ddfc0458a5af31f4c
reset: starfive: Factor out common JH71X0 reset code

The StarFive JH7100 SoC has additional reset controllers for audio and
video, but the registers follow the same structure. On the JH7110 the
reset registers don't get their own memory range, but instead follow the
clock control registers. The registers still follow the same structure
though, so let's factor out the common code to handle all these cases.

Tested-by: Tommaso Merciai <tomm.merciai@gmail.com>
Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
Reviewed-by: Emil Renner Berthing <emil.renner.berthing@canonical.com>
Signed-off-by: Emil Renner Berthing <kernel@esmil.dk>
Signed-off-by: Hal Feng <hal.feng@starfivetech.com>
Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
drivers/reset/starfive/Kconfig
drivers/reset/starfive/Makefile
drivers/reset/starfive/reset-starfive-jh7100.c
drivers/reset/starfive/reset-starfive-jh71x0.c [new file with mode: 0644]
drivers/reset/starfive/reset-starfive-jh71x0.h [new file with mode: 0644]