Lines Matching +full:port +full:- +full:base
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. */
33 void __iomem *base;
35 base = dfl_get_feature_ioaddr_by_id(fdata, PORT_FEATURE_ID_ERROR);
37 writeq(mask ? ERROR_MASK : 0, base + PORT_ERROR_MASK);
44 mutex_lock(&fdata->lock);
46 mutex_unlock(&fdata->lock);
49 /* clear port errors. */
54 int enable_ret = 0, ret = -EBUSY;
60 mutex_lock(&fdata->lock);
63 * clear Port Errors
65 * - Check for AP6 State
66 * - Halt Port by keeping Port in reset
67 * - Set PORT Error mask to all 1 to mask errors
68 * - Clear all errors
69 * - Set Port mask to all 0 to enable errors
70 * - All errors start capturing new errors
71 * - Enable Port by pulling the port out of reset
81 /* Halt Port by keeping Port in reset */
89 /* Clear errors if err input matches with current port errors.*/
100 ret = -EINVAL;
106 /* Enable the Port by clearing the reset */
110 mutex_unlock(&fdata->lock);
118 void __iomem *base;
121 base = dfl_get_feature_ioaddr_by_id(fdata, PORT_FEATURE_ID_ERROR);
123 mutex_lock(&fdata->lock);
124 error = readq(base + PORT_ERROR);
125 mutex_unlock(&fdata->lock);
137 return -EINVAL;
149 void __iomem *base;
152 base = dfl_get_feature_ioaddr_by_id(fdata, PORT_FEATURE_ID_ERROR);
154 mutex_lock(&fdata->lock);
155 error = readq(base + PORT_FIRST_ERROR);
156 mutex_unlock(&fdata->lock);
167 void __iomem *base;
170 base = dfl_get_feature_ioaddr_by_id(fdata, PORT_FEATURE_ID_ERROR);
172 mutex_lock(&fdata->lock);
173 req0 = readq(base + PORT_MALFORMED_REQ0);
174 req1 = readq(base + PORT_MALFORMED_REQ1);
175 mutex_unlock(&fdata->lock);
203 return attr->mode;
215 afu_port_err_mask(&pdev->dev, false);
223 afu_port_err_mask(&pdev->dev, true);
236 dev_dbg(&pdev->dev, "%x cmd not handled", cmd);
237 return -ENODEV;