aboutsummaryrefslogtreecommitdiff
path: root/drivers/firmware/xilinx/zynqmp-debug.c
AgeCommit message (Collapse)AuthorFilesLines
2020-04-28firmware: xilinx: Remove eemi ops for query_dataRajan Vaja1-2/+1
Use direct function call for query_data instead of using eemi ops. Signed-off-by: Rajan Vaja <[email protected]> Signed-off-by: Jolly Shah <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2020-04-28firmware: xilinx: Remove eemi ops for get_api_versionRajan Vaja1-1/+1
Use direct function calls instead of using eemi ops. So remove eemi ops for get_api_version and use direct function call. Signed-off-by: Rajan Vaja <[email protected]> Signed-off-by: Jolly Shah <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2020-04-15firmware: xilinx: make firmware_debugfs_root staticJason Yan1-1/+1
Fix the following sparse warning: drivers/firmware/xilinx/zynqmp-debug.c:38:15: warning: symbol 'firmware_debugfs_root' was not declared. Should it be static? Reported-by: Hulk Robot <[email protected]> Signed-off-by: Jason Yan <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Michal Simek <[email protected]>
2019-03-18drivers: Defer probe if firmware is not readyRajan Vaja1-3/+0
Driver needs ZynqMP firmware interface to call EEMI APIs. In case firmware is not ready, dependent drivers should wait until the firmware is ready. Signed-off-by: Rajan Vaja <[email protected]> Signed-off-by: Jolly Shah <[email protected]> Signed-off-by: Michal Simek <[email protected]>
2019-03-18firmware: xilinx: fix debugfs write handlerJann Horn1-11/+4
- Userspace wants to write a string with `len` bytes, not counting the terminating NULL, so we should allocate `len+1` bytes. It looks like the current code relied on having a nullbyte directly behind `kern_buff`, which happens to work reliably as long as `len` isn't one of the kmalloc size classes. - strncpy_from_user() is completely wrong here; userspace is giving us a (not necessarily null-terminated) buffer and its length. strncpy_from_user() is for cases in which we don't know the length. - Don't let broken userspace allocate arbitrarily big kmalloc allocations. Just use memdup_user_nul(), which is designed precisely for things like this. Signed-off-by: Jann Horn <[email protected]> Acked-by: Jolly Shah <[email protected]> Signed-off-by: Michal Simek <[email protected]>
2018-09-26firmware: xilinx: Add debugfs for query data APIRajan Vaja1-0/+28
Add debugfs file to query platform specific data from firmware using debugfs interface. Signed-off-by: Rajan Vaja <[email protected]> Signed-off-by: Jolly Shah <[email protected]> Signed-off-by: Michal Simek <[email protected]>
2018-09-26firmware: xilinx: Add debugfs interfaceRajan Vaja1-0/+222
Firmware-debug provides debugfs interface to all APIs. Debugfs can be used to call firmware APIs with required parameters. Usage: * Calling firmware API through debugfs: # echo "<api-name> <arg1> .. <argn>" > /sys/.../zynqmp-firmware/pm * Read output of last called firmware API: # cat /sys/.../zynqmp-firmware/pm Refer ug1200 for more information on these APIs: * https://www.xilinx.com/support/documentation/user_guides/ug1200-eemi-api.pdf Add basic debugfs file to get API version. Signed-off-by: Rajan Vaja <[email protected]> Signed-off-by: Jolly Shah <[email protected]> Signed-off-by: Michal Simek <[email protected]>