bt1-apb.c (1c8ceb16bcb924c8bceb638b2d6cde4c104a8114) bt1-apb.c (b19dc1b79993a7e6a2c0aa1725f679bb9ae8ad89)
1// SPDX-License-Identifier: GPL-2.0-only
2/*
3 * Copyright (C) 2020 BAIKAL ELECTRONICS, JSC
4 *
5 * Authors:
6 * Serge Semin <Sergey.Semin@baikalelectronics.ru>
7 *
8 * Baikal-T1 APB-bus driver

--- 297 unchanged lines hidden (view full) ---

306 n = clamp(n, APB_EHB_TIMEOUT_MIN, APB_EHB_TIMEOUT_MAX);
307
308 ret = regmap_write(apb->regs, APB_EHB_TIMEOUT, n);
309
310 return ret ?: count;
311}
312static DEVICE_ATTR_RW(timeout);
313
1// SPDX-License-Identifier: GPL-2.0-only
2/*
3 * Copyright (C) 2020 BAIKAL ELECTRONICS, JSC
4 *
5 * Authors:
6 * Serge Semin <Sergey.Semin@baikalelectronics.ru>
7 *
8 * Baikal-T1 APB-bus driver

--- 297 unchanged lines hidden (view full) ---

306 n = clamp(n, APB_EHB_TIMEOUT_MIN, APB_EHB_TIMEOUT_MAX);
307
308 ret = regmap_write(apb->regs, APB_EHB_TIMEOUT, n);
309
310 return ret ?: count;
311}
312static DEVICE_ATTR_RW(timeout);
313
314static ssize_t inject_error_show(struct device *dev, struct device_attribute *attr,
315 char *buf)
314static ssize_t inject_error_show(struct device *dev,
315 struct device_attribute *attr, char *buf)
316{
317 return scnprintf(buf, PAGE_SIZE, "Error injection: nodev irq\n");
318}
319
320static ssize_t inject_error_store(struct device *dev,
316{
317 return scnprintf(buf, PAGE_SIZE, "Error injection: nodev irq\n");
318}
319
320static ssize_t inject_error_store(struct device *dev,
321 struct device_attribute *attr,
322 const char *data, size_t count)
321 struct device_attribute *attr,
322 const char *data, size_t count)
323{
324 struct bt1_apb *apb = dev_get_drvdata(dev);
325
326 /*
327 * Either dummy read from the unmapped address in the APB IO area
328 * or manually set the IRQ status.
329 */
330 if (!strncmp(data, "nodev", 5))

--- 93 unchanged lines hidden ---
323{
324 struct bt1_apb *apb = dev_get_drvdata(dev);
325
326 /*
327 * Either dummy read from the unmapped address in the APB IO area
328 * or manually set the IRQ status.
329 */
330 if (!strncmp(data, "nodev", 5))

--- 93 unchanged lines hidden ---