aboutsummaryrefslogtreecommitdiffstats
path: root/include/uapi/misc
diff options
context:
space:
mode:
authorDragan Cvetic <dragan.cvetic@xilinx.com>2019-07-27 09:33:55 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-08-15 17:54:38 +0200
commitcc538f609dee49b73545569c49e3abd891fdd8b3 (patch)
treeb8a7622cf127a83c5888a521a5fefefd417ec159 /include/uapi/misc
parentmisc: xilinx_sdfec: Add ability to get/set config (diff)
downloadlinux-dev-cc538f609dee49b73545569c49e3abd891fdd8b3.tar.xz
linux-dev-cc538f609dee49b73545569c49e3abd891fdd8b3.zip
misc: xilinx_sdfec: Support poll file operation
Support monitoring and detecting the SD-FEC error events through IRQ and poll file operation. The SD-FEC device can detect one-error or multi-error events. An error triggers an interrupt which creates and run the ONE_SHOT IRQ thread. The ONE_SHOT IRQ thread detects type of error and pass that information to the poll function. The file_operation callback poll(), collects the events and updates the statistics accordingly. The function poll blocks() on waiting queue which can be unblocked by ONE_SHOT IRQ handling thread. Support SD-FEC interrupt set ioctl callback. The SD-FEC can detect two type of errors: coding errors (ECC) and a data interface errors (TLAST). The errors are events which can trigger an IRQ if enabled. The driver can monitor and detect these errors through IRQ. Also the driver updates the statistical data. Tested-by: Dragan Cvetic <dragan.cvetic@xilinx.com> Signed-off-by: Derek Kiernan <derek.kiernan@xilinx.com> Signed-off-by: Dragan Cvetic <dragan.cvetic@xilinx.com> Link: https://lore.kernel.org/r/1564216438-322406-6-git-send-email-dragan.cvetic@xilinx.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/uapi/misc')
-rw-r--r--include/uapi/misc/xilinx_sdfec.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/uapi/misc/xilinx_sdfec.h b/include/uapi/misc/xilinx_sdfec.h
index b8897ce41821..85ee288dbb33 100644
--- a/include/uapi/misc/xilinx_sdfec.h
+++ b/include/uapi/misc/xilinx_sdfec.h
@@ -252,6 +252,19 @@ struct xsdfec_ldpc_param_table_sizes {
*/
#define XSDFEC_MAGIC 'f'
/**
+ * DOC: XSDFEC_SET_IRQ
+ * @Parameters
+ *
+ * @struct xsdfec_irq *
+ * Pointer to the &struct xsdfec_irq that contains the interrupt settings
+ * for the SD-FEC core
+ *
+ * @Description
+ *
+ * ioctl to enable or disable irq
+ */
+#define XSDFEC_SET_IRQ _IOW(XSDFEC_MAGIC, 3, struct xsdfec_irq)
+/**
* DOC: XSDFEC_SET_TURBO
* @Parameters
*