[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1527713725-1086-8-git-send-email-jollys@xilinx.com>
Date: Wed, 30 May 2018 13:55:22 -0700
From: Jolly Shah <jolly.shah@...inx.com>
To: <ard.biesheuvel@...aro.org>, <mingo@...nel.org>,
<gregkh@...uxfoundation.org>, <matt@...eblueprint.co.uk>,
<sudeep.holla@....com>, <hkallweit1@...il.com>,
<keescook@...omium.org>, <dmitry.torokhov@...il.com>,
<mturquette@...libre.com>, <sboyd@...eaurora.org>,
<michal.simek@...inx.com>, <robh+dt@...nel.org>,
<mark.rutland@....com>, <linux-clk@...r.kernel.org>
CC: <rajanv@...inx.com>, <linux-arm-kernel@...ts.infradead.org>,
<linux-kernel@...r.kernel.org>, <devicetree@...r.kernel.org>,
Jolly Shah <jollys@...inx.com>
Subject: [PATCH v7 07/10] firmware: xilinx: Add debugfs for IOCTL API
From: Rajan Vaja <rajanv@...inx.com>
Add debugfs file to set/get IOCTL using debugfs interface.
Signed-off-by: Rajan Vaja <rajanv@...inx.com>
Signed-off-by: Jolly Shah <jollys@...inx.com>
---
drivers/firmware/xilinx/zynqmp-debug.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/drivers/firmware/xilinx/zynqmp-debug.c b/drivers/firmware/xilinx/zynqmp-debug.c
index 4800366..148dbff 100644
--- a/drivers/firmware/xilinx/zynqmp-debug.c
+++ b/drivers/firmware/xilinx/zynqmp-debug.c
@@ -32,6 +32,7 @@ static char debugfs_buf[PAGE_SIZE];
#define PM_API(id) {id, #id, strlen(#id)}
static struct pm_api_info pm_api_list[] = {
PM_API(PM_GET_API_VERSION),
+ PM_API(PM_IOCTL),
};
/**
@@ -95,6 +96,15 @@ static int process_api_request(u32 pm_id, u64 *pm_api_arg, u32 *pm_api_ret)
sprintf(debugfs_buf, "PM-API Version = %d.%d\n",
pm_api_version >> 16, pm_api_version & 0xffff);
break;
+ case PM_IOCTL:
+ ret = eemi_ops->ioctl(pm_api_arg[0], pm_api_arg[1],
+ pm_api_arg[2], pm_api_arg[3],
+ &pm_api_ret[0]);
+ if (!ret && (pm_api_arg[1] == IOCTL_GET_PLL_FRAC_MODE ||
+ pm_api_arg[1] == IOCTL_GET_PLL_FRAC_DATA))
+ sprintf(debugfs_buf, "IOCTL return value: %u\n",
+ pm_api_ret[1]);
+ break;
default:
sprintf(debugfs_buf, "Unsupported PM-API request\n");
ret = -EINVAL;
--
2.7.4
Powered by blists - more mailing lists