Skip to content

Commit 0e2b2a7

Browse files
SFxingyuwubebarino
authored andcommitted
reset: starfive: jh7110: Add StarFive STG/ISP/VOUT resets support
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 <palmer@rivosinc.com> Reviewed-by: Emil Renner Berthing <emil.renner.berthing@canonical.com> Reviewed-by: Hal Feng <hal.feng@starfivetech.com> Signed-off-by: Xingyu Wu <xingyu.wu@starfivetech.com> Link: https://lore.kernel.org/r/20230724055440.100947-1-xingyu.wu@starfivetech.com Signed-off-by: Stephen Boyd <sboyd@kernel.org>
1 parent 8303d4e commit 0e2b2a7

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

drivers/reset/starfive/reset-starfive-jh7110.c

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,24 @@ static const struct jh7110_reset_info jh7110_aon_info = {
3131
.status_offset = 0x3C,
3232
};
3333

34+
static const struct jh7110_reset_info jh7110_stg_info = {
35+
.nr_resets = JH7110_STGRST_END,
36+
.assert_offset = 0x74,
37+
.status_offset = 0x78,
38+
};
39+
40+
static const struct jh7110_reset_info jh7110_isp_info = {
41+
.nr_resets = JH7110_ISPRST_END,
42+
.assert_offset = 0x38,
43+
.status_offset = 0x3C,
44+
};
45+
46+
static const struct jh7110_reset_info jh7110_vout_info = {
47+
.nr_resets = JH7110_VOUTRST_END,
48+
.assert_offset = 0x48,
49+
.status_offset = 0x4C,
50+
};
51+
3452
static int jh7110_reset_probe(struct auxiliary_device *adev,
3553
const struct auxiliary_device_id *id)
3654
{
@@ -58,6 +76,18 @@ static const struct auxiliary_device_id jh7110_reset_ids[] = {
5876
.name = "clk_starfive_jh7110_sys.rst-aon",
5977
.driver_data = (kernel_ulong_t)&jh7110_aon_info,
6078
},
79+
{
80+
.name = "clk_starfive_jh7110_sys.rst-stg",
81+
.driver_data = (kernel_ulong_t)&jh7110_stg_info,
82+
},
83+
{
84+
.name = "clk_starfive_jh7110_sys.rst-isp",
85+
.driver_data = (kernel_ulong_t)&jh7110_isp_info,
86+
},
87+
{
88+
.name = "clk_starfive_jh7110_sys.rst-vo",
89+
.driver_data = (kernel_ulong_t)&jh7110_vout_info,
90+
},
6191
{ /* sentinel */ }
6292
};
6393
MODULE_DEVICE_TABLE(auxiliary, jh7110_reset_ids);

0 commit comments

Comments
 (0)