aboutsummaryrefslogtreecommitdiff
path: root/drivers/reset/starfive
AgeCommit message (Collapse)AuthorFilesLines
2024-09-30reset: starfive: jh71x0: Fix accessing the empty member on JH7110 SoCChanghuang Liang1-0/+3
data->asserted will be NULL on JH7110 SoC since commit 82327b127d41 ("reset: starfive: Add StarFive JH7110 reset driver") was added. Add the judgment condition to avoid errors when calling reset_control_status on JH7110 SoC. Fixes: 82327b127d41 ("reset: starfive: Add StarFive JH7110 reset driver") Signed-off-by: Changhuang Liang <[email protected]> Acked-by: Hal Feng <[email protected]> Reviewed-by: Philipp Zabel <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Philipp Zabel <[email protected]>
2023-07-26reset: starfive: jh7110: Add StarFive STG/ISP/VOUT resets supportXingyu Wu1-0/+30
Add new struct members and auxiliary_device_id of resets to support System-Top-Group, Image-Signal-Process and Video-Output on the StarFive JH7110 SoC. Acked-by: Palmer Dabbelt <[email protected]> Reviewed-by: Emil Renner Berthing <[email protected]> Reviewed-by: Hal Feng <[email protected]> Signed-off-by: Xingyu Wu <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Stephen Boyd <[email protected]>
2023-05-08reset: starfive: select AUXILIARY_BUSPhilipp Zabel1-1/+2
CONFIG_AUXILIARY_BUS is not a user-visible symbol, replace 'depends on' with 'select'. Suggested-by: Arnd Bergmann <[email protected]> Reviewed-by: Hal Feng <[email protected]> Reviewed-by: Arnd Bergmann <[email protected]> Reviewed-by: Emil Renner Berthing <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Philipp Zabel <[email protected]>
2023-04-13clk: starfive: Avoid casting iomem pointersStephen Boyd1-3/+6
Let's use a wrapper struct for the auxiliary_device made in jh7110_reset_controller_register() so that we can stop casting iomem pointers. The casts trip up tools like sparse, and make for some awkward casts that are largely unnecessary. While we're here, change the allocation from devm and actually free the auxiliary_device memory in the release function. This avoids any use after free problems where the parent device driver is unbound from the device but the auxiliuary_device is still in use accessing devm freed memory. Cc: Tommaso Merciai <[email protected]> Cc: Emil Renner Berthing <[email protected]> Cc: Hal Feng <[email protected]> Cc: Conor Dooley <[email protected]> Cc: Xingyu Wu <[email protected]> Reviewed-by: Conor Dooley <[email protected]> Fixes: edab7204afe5 ("clk: starfive: Add StarFive JH7110 system clock driver") Signed-off-by: Stephen Boyd <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2023-04-05reset: starfive: Add StarFive JH7110 reset driverHal Feng3-0/+79
Add auxiliary driver to support StarFive JH7110 system and always-on resets. Tested-by: Tommaso Merciai <[email protected]> Reviewed-by: Emil Renner Berthing <[email protected]> Signed-off-by: Hal Feng <[email protected]> Signed-off-by: Conor Dooley <[email protected]>
2023-04-05reset: starfive: jh71x0: Use 32bit I/O on 32bit registersEmil Renner Berthing3-24/+23
We currently use 64bit I/O on the 32bit registers. This works because there are an even number of assert and status registers, so they're only ever accessed in pairs on 64bit boundaries. There are however other reset controllers for audio and video on the JH7100 SoC with only one status register that isn't 64bit aligned so 64bit I/O results in an unaligned access exception. Switch to 32bit I/O in preparation for supporting these resets too. Tested-by: Tommaso Merciai <[email protected]> Reviewed-by: Conor Dooley <[email protected]> Reviewed-by: Emil Renner Berthing <[email protected]> Signed-off-by: Emil Renner Berthing <[email protected]> Signed-off-by: Hal Feng <[email protected]> Signed-off-by: Conor Dooley <[email protected]>
2023-04-05reset: starfive: Rename "jh7100" to "jh71x0" for the common codeEmil Renner Berthing3-27/+27
For the common code will be shared with the StarFive JH7110 SoC. Tested-by: Tommaso Merciai <[email protected]> Reviewed-by: Conor Dooley <[email protected]> Reviewed-by: Emil Renner Berthing <[email protected]> Signed-off-by: Emil Renner Berthing <[email protected]> Signed-off-by: Hal Feng <[email protected]> Signed-off-by: Conor Dooley <[email protected]>
2023-04-05reset: starfive: Extract the common JH71X0 reset codeEmil Renner Berthing3-54/+76
Extract the common JH71X0 reset code for reusing them to support JH7110 SoC. Tested-by: Tommaso Merciai <[email protected]> Reviewed-by: Conor Dooley <[email protected]> Reviewed-by: Emil Renner Berthing <[email protected]> Signed-off-by: Emil Renner Berthing <[email protected]> Signed-off-by: Hal Feng <[email protected]> Signed-off-by: Conor Dooley <[email protected]>
2023-04-05reset: starfive: Factor out common JH71X0 reset codeEmil Renner Berthing5-149/+180
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 <[email protected]> Reviewed-by: Conor Dooley <[email protected]> Reviewed-by: Emil Renner Berthing <[email protected]> Signed-off-by: Emil Renner Berthing <[email protected]> Signed-off-by: Hal Feng <[email protected]> Signed-off-by: Conor Dooley <[email protected]>
2023-04-05reset: Create subdirectory for StarFive driversEmil Renner Berthing3-0/+183
This moves the StarFive JH7100 reset driver to a new subdirectory in preparation for adding more StarFive reset drivers. Reviewed-by: Philipp Zabel <[email protected]> Tested-by: Tommaso Merciai <[email protected]> Reviewed-by: Conor Dooley <[email protected]> Reviewed-by: Emil Renner Berthing <[email protected]> Signed-off-by: Emil Renner Berthing <[email protected]> Signed-off-by: Hal Feng <[email protected]> Signed-off-by: Conor Dooley <[email protected]>