Skip to content
Snippets Groups Projects
Commit b81c447a authored by Myron Stowe's avatar Myron Stowe
Browse files

PCI: rockchip: Simplify reset control handling by using reset_control_bulk*() function

JIRA: https://issues.redhat.com/browse/RHEL-83611
Upstream Status: 18715931a5c08d199d14df116832d88dc4df48c5

commit 18715931a5c08d199d14df116832d88dc4df48c5
Author: Anand Moon <linux.amoon@gmail.com>
Date:   Mon Dec 2 20:41:43 2024 +0530

    PCI: rockchip: Simplify reset control handling by using reset_control_bulk*() function

    Currently, the driver acquires and asserts/deasserts the resets
    individually thereby making the driver complex to read.

    This can be simplified by using the reset_control_bulk() APIs.

    Use devm_reset_control_bulk_get_exclusive() API to acquire all the resets
    and use reset_control_bulk_{assert/deassert}() APIs to assert/deassert them
    in bulk.

    Following the recommendations in 'Rockchip RK3399 TRM v1.3 Part2':

      1. Split the reset controls into two groups as per section '17.5.8.1.1
         PCIe as Root Complex'.

      2. Deassert the 'Pipe, MGMT Sticky, MGMT, Core' resets in groups as per
         section '17.5.8.1.1 PCIe as Root Complex'. This is accomplished using
         the reset_control_bulk APIs.

    Link: https://lore.kernel.org/r/20241202151150.7393-3-linux.amoon@gmail.com


Co-developed-by: default avatarDan Carpenter <dan.carpenter@linaro.org>
Signed-off-by: default avatarAnand Moon <linux.amoon@gmail.com>
Signed-off-by: default avatarLorenzo Pieralisi <lpieralisi@kernel.org>
Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
    [kwilczynski: squash error handling fix from https://lore.kernel.org/r/7da6ac56-af55-4436-9597-6af24df8122c@stanley.mountain

]
Signed-off-by: default avatarKrzysztof Wilczyński <kwilczynski@kernel.org>
Reviewed-by: default avatarManivannan Sadhasivam <manivannan.sadhasivam@linaro.org>

Signed-off-by: default avatarMyron Stowe <mstowe@redhat.com>
parent f13289c9
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment