]> rtime.felk.cvut.cz Git - zynq/linux.git/commitdiff
misc: xilinx-sdfec: Remove RESET_REQ IOCTL
authorDerek Kiernan <derek.kiernan@xilinx.com>
Tue, 15 May 2018 00:17:00 +0000 (01:17 +0100)
committerMichal Simek <michal.simek@xilinx.com>
Tue, 15 May 2018 15:22:33 +0000 (17:22 +0200)
No longer needed the functionality is implemented in SET_DEFAULT_CONFIG and
CLEAR_STATS ioctl as reset occurs external to the driver. No reset function
implemented.

Signed-off-by: Derek Kiernan <derek.kiernan@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
drivers/misc/xilinx_sdfec.c
include/uapi/misc/xilinx_sdfec.h

index 8c69a5bc47e0e4427731b950bc4391f1a5c692c0..2935d059f0f42f2d667bbb15bd4f5d05fe56b71e 100644 (file)
@@ -111,7 +111,6 @@ static dev_t xsdfec_devt;
  * @isr_err_count: Count of ISR errors
  * @cecc_count: Count of Correctable ECC errors (SBE)
  * @uecc_count: Count of Uncorrectable ECC errors (MBE)
- * @reset_count: Count of Resets requested
  * @open_count: Count of char device being opened
  * @irq: IRQ number
  * @xsdfec_cdev: Character device handle
@@ -129,7 +128,6 @@ struct xsdfec_dev {
        atomic_t isr_err_count;
        atomic_t cecc_count;
        atomic_t uecc_count;
-       atomic_t reset_count;
        atomic_t open_count;
        int  irq;
        struct cdev xsdfec_cdev;
@@ -1174,25 +1172,6 @@ xsdfec_stop(struct xsdfec_dev *xsdfec)
        return 0;
 }
 
-/*
- * Reset will happen asynchronously
- * since there is no in-band reset register
- * Prepare driver for reset
- */
-
-static int
-xsdfec_reset_req(struct xsdfec_dev *xsdfec)
-{
-       xsdfec->state = XSDFEC_INIT;
-       xsdfec->config.order = XSDFEC_INVALID_ORDER;
-       xsdfec->wr_protect = false;
-       atomic_set(&xsdfec->isr_err_count, 0);
-       atomic_set(&xsdfec->uecc_count, 0);
-       atomic_set(&xsdfec->cecc_count, 0);
-       atomic_inc(&xsdfec->reset_count);
-       return 0;
-}
-
 static int
 xsdfec_clear_stats(struct xsdfec_dev *xsdfec)
 {
@@ -1251,7 +1230,8 @@ xsdfec_dev_ioctl(struct file *fptr, unsigned int cmd, unsigned long data)
 
        /* In failed state allow only reset and get status IOCTLs */
        if (xsdfec->state == XSDFEC_NEEDS_RESET &&
-           (cmd != XSDFEC_RESET_REQ && cmd != XSDFEC_GET_STATUS)) {
+           (cmd != XSDFEC_SET_DEFAULT_CONFIG && cmd != XSDFEC_GET_STATUS &&
+            cmd != XSDFEC_GET_STATS && cmd != XSDFEC_CLEAR_STATS)) {
                dev_err(xsdfec->dev,
                        "SDFEC%d in failed state. Reset Required",
                        xsdfec->config.fec_id);
@@ -1290,9 +1270,6 @@ xsdfec_dev_ioctl(struct file *fptr, unsigned int cmd, unsigned long data)
        case XSDFEC_STOP_DEV:
                rval = xsdfec_stop(xsdfec);
                break;
-       case XSDFEC_RESET_REQ:
-               rval = xsdfec_reset_req(xsdfec);
-               break;
        case XSDFEC_CLEAR_STATS:
                rval = xsdfec_clear_stats(xsdfec);
                break;
index 19189a30cbcb4d8aae1d8b8ba4206f28090d4bf0..13658d522aca899b6b7137d71a6ebbb45ef69bd0 100644 (file)
@@ -189,8 +189,6 @@ struct xsdfec_stats {
 #define XSDFEC_START_DEV       _IO(XSDFEC_MAGIC, 0)
 /* ioctl to stop the device */
 #define XSDFEC_STOP_DEV                _IO(XSDFEC_MAGIC, 1)
-/* ioctl to communicate to the driver that device has been reset */
-#define XSDFEC_RESET_REQ       _IO(XSDFEC_MAGIC, 2)
 /* ioctl that returns status of sdfec device */
 #define XSDFEC_GET_STATUS      _IOR(XSDFEC_MAGIC, 3, struct xsdfec_status *)
 /* ioctl to enable or disable irq */