Lines Matching +full:mask +full:- +full:reset
1 // SPDX-License-Identifier: GPL-2.0
17 #include <linux/fpga-dfl.h>
20 #include "dfl-afu.h"
30 /* mask or unmask port errors by the error mask register. */
31 static void __afu_port_err_mask(struct device *dev, bool mask) in __afu_port_err_mask() argument
37 writeq(mask ? ERROR_MASK : 0, base + PORT_ERROR_MASK); in __afu_port_err_mask()
40 static void afu_port_err_mask(struct device *dev, bool mask) in afu_port_err_mask() argument
44 mutex_lock(&pdata->lock); in afu_port_err_mask()
45 __afu_port_err_mask(dev, mask); in afu_port_err_mask()
46 mutex_unlock(&pdata->lock); in afu_port_err_mask()
55 int ret = -EBUSY; in afu_port_err_clear()
61 mutex_lock(&pdata->lock); in afu_port_err_clear()
66 * - Check for AP6 State in afu_port_err_clear()
67 * - Halt Port by keeping Port in reset in afu_port_err_clear()
68 * - Set PORT Error mask to all 1 to mask errors in afu_port_err_clear()
69 * - Clear all errors in afu_port_err_clear()
70 * - Set Port mask to all 0 to enable errors in afu_port_err_clear()
71 * - All errors start capturing new errors in afu_port_err_clear()
72 * - Enable Port by pulling the port out of reset in afu_port_err_clear()
82 /* Halt Port by keeping Port in reset */ in afu_port_err_clear()
87 /* Mask all errors */ in afu_port_err_clear()
99 ret = -EINVAL; in afu_port_err_clear()
102 /* Clear mask */ in afu_port_err_clear()
105 /* Enable the Port by clear the reset */ in afu_port_err_clear()
109 mutex_unlock(&pdata->lock); in afu_port_err_clear()
122 mutex_lock(&pdata->lock); in errors_show()
124 mutex_unlock(&pdata->lock); in errors_show()
136 return -EINVAL; in errors_store()
153 mutex_lock(&pdata->lock); in first_error_show()
155 mutex_unlock(&pdata->lock); in first_error_show()
171 mutex_lock(&pdata->lock); in first_malformed_req_show()
174 mutex_unlock(&pdata->lock); in first_malformed_req_show()
200 return attr->mode; in port_err_attrs_visible()
212 afu_port_err_mask(&pdev->dev, false); in port_err_init()
220 afu_port_err_mask(&pdev->dev, true); in port_err_uinit()
233 dev_dbg(&pdev->dev, "%x cmd not handled", cmd); in port_err_ioctl()
234 return -ENODEV; in port_err_ioctl()