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:Dan Carpenter <dan.carpenter@linaro.org> Signed-off-by:
Anand Moon <linux.amoon@gmail.com> Signed-off-by:
Lorenzo Pieralisi <lpieralisi@kernel.org> Signed-off-by:
Bjorn 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:
Krzysztof Wilczyński <kwilczynski@kernel.org> Reviewed-by:
Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Signed-off-by:
Myron Stowe <mstowe@redhat.com>
Loading
Please register or sign in to comment