zynqmp-debug.c (b9b3a8be28b31a3dbcb0ced07aa0d869f45cdb69) | zynqmp-debug.c (6366c1bac3149c63752c03ea1c731d461d5349a7) |
---|---|
1// SPDX-License-Identifier: GPL-2.0 2/* 3 * Xilinx Zynq MPSoC Firmware layer for debugfs APIs 4 * 5 * Copyright (C) 2014-2018 Xilinx, Inc. 6 * 7 * Michal Simek <michal.simek@xilinx.com> 8 * Davorin Mista <davorin.mista@aggios.com> --- 71 unchanged lines hidden (view full) --- 80 if (i == ARRAY_SIZE(pm_api_list) && kstrtouint(pm_api_req, 10, pm_id)) 81 return -EINVAL; 82 83 return 0; 84} 85 86static int process_api_request(u32 pm_id, u64 *pm_api_arg, u32 *pm_api_ret) 87{ | 1// SPDX-License-Identifier: GPL-2.0 2/* 3 * Xilinx Zynq MPSoC Firmware layer for debugfs APIs 4 * 5 * Copyright (C) 2014-2018 Xilinx, Inc. 6 * 7 * Michal Simek <michal.simek@xilinx.com> 8 * Davorin Mista <davorin.mista@aggios.com> --- 71 unchanged lines hidden (view full) --- 80 if (i == ARRAY_SIZE(pm_api_list) && kstrtouint(pm_api_req, 10, pm_id)) 81 return -EINVAL; 82 83 return 0; 84} 85 86static int process_api_request(u32 pm_id, u64 *pm_api_arg, u32 *pm_api_ret) 87{ |
88 const struct zynqmp_eemi_ops *eemi_ops = zynqmp_pm_get_eemi_ops(); | |
89 u32 pm_api_version; 90 int ret; 91 struct zynqmp_pm_query_data qdata = {0}; 92 93 switch (pm_id) { 94 case PM_GET_API_VERSION: 95 ret = zynqmp_pm_get_api_version(&pm_api_version); 96 sprintf(debugfs_buf, "PM-API Version = %d.%d\n", 97 pm_api_version >> 16, pm_api_version & 0xffff); 98 break; 99 case PM_QUERY_DATA: 100 qdata.qid = pm_api_arg[0]; 101 qdata.arg1 = pm_api_arg[1]; 102 qdata.arg2 = pm_api_arg[2]; 103 qdata.arg3 = pm_api_arg[3]; 104 | 88 u32 pm_api_version; 89 int ret; 90 struct zynqmp_pm_query_data qdata = {0}; 91 92 switch (pm_id) { 93 case PM_GET_API_VERSION: 94 ret = zynqmp_pm_get_api_version(&pm_api_version); 95 sprintf(debugfs_buf, "PM-API Version = %d.%d\n", 96 pm_api_version >> 16, pm_api_version & 0xffff); 97 break; 98 case PM_QUERY_DATA: 99 qdata.qid = pm_api_arg[0]; 100 qdata.arg1 = pm_api_arg[1]; 101 qdata.arg2 = pm_api_arg[2]; 102 qdata.arg3 = pm_api_arg[3]; 103 |
105 ret = eemi_ops->query_data(qdata, pm_api_ret); | 104 ret = zynqmp_pm_query_data(qdata, pm_api_ret); |
106 if (ret) 107 break; 108 109 switch (qdata.qid) { 110 case PM_QID_CLOCK_GET_NAME: 111 sprintf(debugfs_buf, "Clock name = %s\n", 112 (char *)pm_api_ret); 113 break; --- 127 unchanged lines hidden --- | 105 if (ret) 106 break; 107 108 switch (qdata.qid) { 109 case PM_QID_CLOCK_GET_NAME: 110 sprintf(debugfs_buf, "Clock name = %s\n", 111 (char *)pm_api_ret); 112 break; --- 127 unchanged lines hidden --- |