.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /* |
---|
2 | 3 | * TI Keystone DSP remoteproc driver |
---|
3 | 4 | * |
---|
4 | 5 | * Copyright (C) 2015-2017 Texas Instruments Incorporated - http://www.ti.com/ |
---|
5 | | - * |
---|
6 | | - * This program is free software; you can redistribute it and/or |
---|
7 | | - * modify it under the terms of the GNU General Public License |
---|
8 | | - * version 2 as published by the Free Software Foundation. |
---|
9 | | - * |
---|
10 | | - * This program is distributed in the hope that it will be useful, but |
---|
11 | | - * WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
12 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
---|
13 | | - * General Public License for more details. |
---|
14 | 6 | */ |
---|
15 | 7 | |
---|
16 | 8 | #include <linux/module.h> |
---|
.. | .. |
---|
254 | 246 | * can be used either by the remoteproc core for loading (when using kernel |
---|
255 | 247 | * remoteproc loader), or by any rpmsg bus drivers. |
---|
256 | 248 | */ |
---|
257 | | -static void *keystone_rproc_da_to_va(struct rproc *rproc, u64 da, int len) |
---|
| 249 | +static void *keystone_rproc_da_to_va(struct rproc *rproc, u64 da, size_t len, bool *is_iomem) |
---|
258 | 250 | { |
---|
259 | 251 | struct keystone_rproc *ksproc = rproc->priv; |
---|
260 | 252 | void __iomem *va = NULL; |
---|
.. | .. |
---|
263 | 255 | size_t size; |
---|
264 | 256 | int i; |
---|
265 | 257 | |
---|
266 | | - if (len <= 0) |
---|
| 258 | + if (len == 0) |
---|
267 | 259 | return NULL; |
---|
268 | 260 | |
---|
269 | 261 | for (i = 0; i < ksproc->num_mems; i++) { |
---|
.. | .. |
---|
432 | 424 | ksproc->irq_ring = platform_get_irq_byname(pdev, "vring"); |
---|
433 | 425 | if (ksproc->irq_ring < 0) { |
---|
434 | 426 | ret = ksproc->irq_ring; |
---|
435 | | - dev_err(dev, "failed to get vring interrupt, status = %d\n", |
---|
436 | | - ret); |
---|
437 | 427 | goto disable_clk; |
---|
438 | 428 | } |
---|
439 | 429 | |
---|
440 | 430 | ksproc->irq_fault = platform_get_irq_byname(pdev, "exception"); |
---|
441 | 431 | if (ksproc->irq_fault < 0) { |
---|
442 | 432 | ret = ksproc->irq_fault; |
---|
443 | | - dev_err(dev, "failed to get exception interrupt, status = %d\n", |
---|
444 | | - ret); |
---|
445 | 433 | goto disable_clk; |
---|
446 | 434 | } |
---|
447 | 435 | |
---|