| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * linux/drivers/video/mmp/hw/mmp_spi.c |
|---|
| 3 | 4 | * using the spi in LCD controler for commands send |
|---|
| .. | .. |
|---|
| 6 | 7 | * Authors: Guoqing Li <ligq@marvell.com> |
|---|
| 7 | 8 | * Lisa Du <cldu@marvell.com> |
|---|
| 8 | 9 | * Zhou Zhu <zzhu3@marvell.com> |
|---|
| 9 | | - * |
|---|
| 10 | | - * This program is free software; you can redistribute it and/or modify it |
|---|
| 11 | | - * under the terms of the GNU General Public License as published by the |
|---|
| 12 | | - * Free Software Foundation; either version 2 of the License, or (at your |
|---|
| 13 | | - * option) any later version. |
|---|
| 14 | | - * |
|---|
| 15 | | - * This program is distributed in the hope that it will be useful, but WITHOUT |
|---|
| 16 | | - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|---|
| 17 | | - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for |
|---|
| 18 | | - * more details. |
|---|
| 19 | | - * |
|---|
| 20 | | - * You should have received a copy of the GNU General Public License along with |
|---|
| 21 | | - * this program. If not, see <http://www.gnu.org/licenses/>. |
|---|
| 22 | | - * |
|---|
| 23 | 10 | */ |
|---|
| 24 | 11 | #include <linux/errno.h> |
|---|
| 25 | 12 | #include <linux/delay.h> |
|---|
| .. | .. |
|---|
| 44 | 31 | { |
|---|
| 45 | 32 | int timeout = 100000, isr, ret = 0; |
|---|
| 46 | 33 | u32 tmp; |
|---|
| 47 | | - void *reg_base = |
|---|
| 34 | + void __iomem *reg_base = (void __iomem *) |
|---|
| 48 | 35 | *(void **)spi_master_get_devdata(spi->master); |
|---|
| 49 | 36 | |
|---|
| 50 | 37 | /* clear ISR */ |
|---|
| .. | .. |
|---|
| 93 | 80 | |
|---|
| 94 | 81 | static int lcd_spi_setup(struct spi_device *spi) |
|---|
| 95 | 82 | { |
|---|
| 96 | | - void *reg_base = |
|---|
| 83 | + void __iomem *reg_base = (void __iomem *) |
|---|
| 97 | 84 | *(void **)spi_master_get_devdata(spi->master); |
|---|
| 98 | 85 | u32 tmp; |
|---|
| 99 | 86 | |
|---|
| .. | .. |
|---|
| 159 | 146 | return -ENOMEM; |
|---|
| 160 | 147 | } |
|---|
| 161 | 148 | p_regbase = spi_master_get_devdata(master); |
|---|
| 162 | | - *p_regbase = ctrl->reg_base; |
|---|
| 149 | + *p_regbase = (void __force *)ctrl->reg_base; |
|---|
| 163 | 150 | |
|---|
| 164 | 151 | /* set bus num to 5 to avoid conflict with other spi hosts */ |
|---|
| 165 | 152 | master->bus_num = 5; |
|---|