02-06-2020 11:03 PM - edited 02-06-2020 11:27 PM
Hi,
Based on Xilinx v2017.4 version.
I want to power down SD0 through Xilinx Zynq MPSoC firmware debug APIs.
I use the following command from Linux:
root@root:/home# echo get_node_status 39 > /sys/kernel/debug/zynqmp_pm/power
[ 67.656382] GET_NODE_STATUS:
[ 67.656382] NodeId: 39
[ 67.656382] Status: 1
[ 67.656382] Requirements: 1
[ 67.656382] Usage: 1
root@root:/home# echo force_powerdown 39 > /sys/kernel/debug/zynqmp_pm/power
root@root:/home# echo get_node_status 39 > /sys/kernel/debug/zynqmp_pm/power
[ 80.212382] GET_NODE_STATUS:
[ 80.212382] NodeId: 39
[ 80.212382] Status: 1
[ 80.212382] Requirements: 1
[ 80.212382] Usage: 1
The node status seems not change anything, and after insert the SD card, I can still access the SD card.
root@root:/home# [ 304.681311] mmc0: new high speed SDHC card at address 1234
[ 304.687029] mmcblk0: mmc0:1234 SA16G 14.5 GiB
[ 304.692421] mmcblk0: p1
root@root:/home# mount /dev/mmcblk0p1 /mnt/
root@root:/home# ls /mnt/
test.txt
Can you please give me a hint of what I am missing?
By the way, what is the mean of Status, Requirements, and Usage that return from get_node_status?
Thanks.
02-21-2020 12:02 AM
I trace pmufw code, and found that echo force_powerdown 39 > /sys/kernel/debug/zynqmp_pm/power will call the PmForcePowerdown() in pmufw.
According to the function description, it can only power down RPU, APU, PL (in the future).
https://github.com/Xilinx/embeddedsw/blob/xilinx-v2017.4/lib/sw_apps/zynqmp_pmufw/src/pm_core.c#L231
02-21-2020 12:02 AM
I trace pmufw code, and found that echo force_powerdown 39 > /sys/kernel/debug/zynqmp_pm/power will call the PmForcePowerdown() in pmufw.
According to the function description, it can only power down RPU, APU, PL (in the future).
https://github.com/Xilinx/embeddedsw/blob/xilinx-v2017.4/lib/sw_apps/zynqmp_pmufw/src/pm_core.c#L231