0057-reset-starfive-jh7110-Add-StarFive-STG-ISP-VOUT-rese.patch 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. From a04a6eb3b4d112f3600bbd783249f24a43797e7a Mon Sep 17 00:00:00 2001
  2. From: Xingyu Wu <[email protected]>
  3. Date: Thu, 18 May 2023 18:12:31 +0800
  4. Subject: [PATCH 057/122] reset: starfive: jh7110: Add StarFive STG/ISP/VOUT
  5. resets support
  6. Add new struct members and auxiliary_device_id of resets to support
  7. System-Top-Group, Image-Signal-Process and Video-Output on the StarFive
  8. JH7110 SoC.
  9. Signed-off-by: Xingyu Wu <[email protected]>
  10. ---
  11. .../reset/starfive/reset-starfive-jh7110.c | 30 +++++++++++++++++++
  12. 1 file changed, 30 insertions(+)
  13. --- a/drivers/reset/starfive/reset-starfive-jh7110.c
  14. +++ b/drivers/reset/starfive/reset-starfive-jh7110.c
  15. @@ -31,6 +31,24 @@ static const struct jh7110_reset_info jh
  16. .status_offset = 0x3C,
  17. };
  18. +static const struct jh7110_reset_info jh7110_stg_info = {
  19. + .nr_resets = JH7110_STGRST_END,
  20. + .assert_offset = 0x74,
  21. + .status_offset = 0x78,
  22. +};
  23. +
  24. +static const struct jh7110_reset_info jh7110_isp_info = {
  25. + .nr_resets = JH7110_ISPRST_END,
  26. + .assert_offset = 0x38,
  27. + .status_offset = 0x3C,
  28. +};
  29. +
  30. +static const struct jh7110_reset_info jh7110_vout_info = {
  31. + .nr_resets = JH7110_VOUTRST_END,
  32. + .assert_offset = 0x48,
  33. + .status_offset = 0x4C,
  34. +};
  35. +
  36. static int jh7110_reset_probe(struct auxiliary_device *adev,
  37. const struct auxiliary_device_id *id)
  38. {
  39. @@ -58,6 +76,18 @@ static const struct auxiliary_device_id
  40. .name = "clk_starfive_jh7110_sys.rst-aon",
  41. .driver_data = (kernel_ulong_t)&jh7110_aon_info,
  42. },
  43. + {
  44. + .name = "clk_starfive_jh7110_sys.rst-stg",
  45. + .driver_data = (kernel_ulong_t)&jh7110_stg_info,
  46. + },
  47. + {
  48. + .name = "clk_starfive_jh7110_sys.rst-isp",
  49. + .driver_data = (kernel_ulong_t)&jh7110_isp_info,
  50. + },
  51. + {
  52. + .name = "clk_starfive_jh7110_sys.rst-vo",
  53. + .driver_data = (kernel_ulong_t)&jh7110_vout_info,
  54. + },
  55. { /* sentinel */ }
  56. };
  57. MODULE_DEVICE_TABLE(auxiliary, jh7110_reset_ids);