fpga: xilinx-pr-decoupler: add shutdown() handler
Subsystems (2)
PATCH 1/1 fpga: xilinx-pr-decoupler: add shutdown() handler
Add a .shutdown() handler to decouple the Reconfigurable Partition from the static logic on reboot, shutdown, and kexec.
The handler writes CTRL_CMD_DECOUPLE to the control register. On the PR Decoupler, this turns decoupling on, which stops signal changes passing through the bridge. On the DFX AXI Shutdown Manager, it requests that the IP stop passing AXI transactions through.
--- drivers/fpga/xilinx-pr-decoupler.c | 8 ++++++++ 1 file changed, 8 insertions(+)
drivers/fpga/xilinx-pr-decoupler.c +8 -0
@@ -137,6 +137,13 @@ static int xlnx_pr_decoupler_probe(struct platform_device *pdev)return 0 ; } +static void xlnx_pr_decoupler_shutdown (struct platform_device *pdev) +{ +struct fpga_bridge *bridge =platform_get_drvdata (pdev); + +xlnx_pr_decoupler_enable_set (bridge, false); +} +static void xlnx_pr_decoupler_remove (struct platform_device *pdev) {struct fpga_bridge *bridge =platform_get_drvdata (pdev);
@@ -147,6 +154,7 @@ static void xlnx_pr_decoupler_remove(struct platform_device *pdev)static struct platform_driver xlnx_pr_decoupler_driver = { .probe = xlnx_pr_decoupler_probe, .remove = xlnx_pr_decoupler_remove, + .shutdown = xlnx_pr_decoupler_shutdown, .driver = { .name ="xlnx_pr_decoupler" , .of_match_table = xlnx_pr_decoupler_of_match,
---
base-commit: b3dfbde62cf1981c4638939c159dfd087b7a72e9
change-id: 20261110-pr_decoupler_shutdown_handler-bf2596f6d1de
Best regards,
Signature · 1 line
Aravind Thokala <[email protected]>
Quoted 2 lines · Aravind Thokala
Add a .shutdown() handler to decouple the Reconfigurable Partition from the static logic on reboot, shutdown, and kexec.
I'm not sure what problem are you going to solve by gating the PR region from static region regardless. Please specify.
Before I get enough information, I generally think that's not the right way to solve problems. You need to gracefully handle the specific logic inside the PR region which actually impact kexec, so that they work in expected ways, rather than abruptly cutting down the HW connection regardless.
Quoted 47 lines
The handler writes
CTRL_CMD_DECOUPLEto the control register. On the PR Decoupler, this turns decoupling on, which stops signal changes passing through the bridge. On the DFX AXI Shutdown Manager, it requests that the IP stop passing AXI transactions through.Signed-off-by Aravind Thokala <[email protected]>--- drivers/fpga/xilinx-pr-decoupler.c | 8 ++++++++ 1 file changed, 8 insertions(+)drivers/fpga/xilinx-pr-decoupler.c +8
-1@@ -137,6 +137,13 @@ static int xlnx_pr_decoupler_probe(struct platform_device *pdev)return 0 ; } +static void xlnx_pr_decoupler_shutdown (struct platform_device *pdev) +{ +struct fpga_bridge *bridge =platform_get_drvdata (pdev); + +xlnx_pr_decoupler_enable_set (bridge, false); +} +static void xlnx_pr_decoupler_remove (struct platform_device *pdev) {struct fpga_bridge *bridge =platform_get_drvdata (pdev);@@ -147,6 +154,7 @@ static void xlnx_pr_decoupler_remove(struct platform_device *pdev)static struct platform_driver xlnx_pr_decoupler_driver = { .probe = xlnx_pr_decoupler_probe, .remove = xlnx_pr_decoupler_remove, + .shutdown = xlnx_pr_decoupler_shutdown, .driver = { .name ="xlnx_pr_decoupler" , .of_match_table = xlnx_pr_decoupler_of_match, ---base-commit:
b3dfbde62cf1981c4638939c159dfd087b7a72e9
change-id: 20261110-pr_decoupler_shutdown_handler-bf2596f6d1deBest regards,
Signature · 1 line
Aravind Thokala <[email protected]>
Hi Xu Yilun,
Quoted 4 lines · Xu Yilun
Quoted 2 lines · Aravind Thokala
Add a .shutdown() handler to decouple the Reconfigurable Partition from the static logic on reboot, shutdown, and kexec.
Quoted 9 lines
I'm not sure what problem are you going to solve by gating the PR region from static region regardless. Please specify.
Before I get enough information, I generally think that's not the right way to solve problems. You need to gracefully handle the specific logic inside the PR region which actually impact kexec, so that they work in expected ways, rather than abruptly cutting down the HW connection regardless.
Thank you for the review. I will look into this further and follow up with more details.
Best regards,
Aravind.
Quoted 47 lines
Quoted 47 lines
The handler writes
CTRL_CMD_DECOUPLEto the control register. On the PR Decoupler, this turns decoupling on, which stops signal changes passing through the bridge. On the DFX AXI Shutdown Manager, it requests that the IP stop passing AXI transactions through.Signed-off-by Aravind Thokala <[email protected]>--- drivers/fpga/xilinx-pr-decoupler.c | 8 ++++++++ 1 file changed, 8 insertions(+)drivers/fpga/xilinx-pr-decoupler.c +8
-1@@ -137,6 +137,13 @@ static int xlnx_pr_decoupler_probe(struct platform_device *pdev)return 0 ; } +static void xlnx_pr_decoupler_shutdown (struct platform_device *pdev) +{ +struct fpga_bridge *bridge =platform_get_drvdata (pdev); + +xlnx_pr_decoupler_enable_set (bridge, false); +} +static void xlnx_pr_decoupler_remove (struct platform_device *pdev) {struct fpga_bridge *bridge =platform_get_drvdata (pdev);@@ -147,6 +154,7 @@ static void xlnx_pr_decoupler_remove(struct platform_device *pdev)static struct platform_driver xlnx_pr_decoupler_driver = { .probe = xlnx_pr_decoupler_probe, .remove = xlnx_pr_decoupler_remove, + .shutdown = xlnx_pr_decoupler_shutdown, .driver = { .name ="xlnx_pr_decoupler" , .of_match_table = xlnx_pr_decoupler_of_match, ---base-commit:
b3dfbde62cf1981c4638939c159dfd087b7a72e9
change-id: 20261110-pr_decoupler_shutdown_handler-bf2596f6d1deBest regards,
--
Aravind Thokala <[email protected]>