.. | .. |
---|
| 1 | +/* SPDX-License-Identifier: GPL-2.0-or-later */ |
---|
1 | 2 | /* |
---|
2 | 3 | * drivers/video/mmp/hw/mmp_ctrl.h |
---|
3 | | - * |
---|
4 | 4 | * |
---|
5 | 5 | * Copyright (C) 2012 Marvell Technology Group Ltd. |
---|
6 | 6 | * Authors: Guoqing Li <ligq@marvell.com> |
---|
7 | 7 | * Lisa Du <cldu@marvell.com> |
---|
8 | 8 | * 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 | 9 | */ |
---|
24 | 10 | |
---|
25 | 11 | #ifndef _MMP_CTRL_H_ |
---|
.. | .. |
---|
1407 | 1393 | /* platform related, get from config */ |
---|
1408 | 1394 | const char *name; |
---|
1409 | 1395 | int irq; |
---|
1410 | | - void *reg_base; |
---|
| 1396 | + void __iomem *reg_base; |
---|
1411 | 1397 | struct clk *clk; |
---|
1412 | 1398 | |
---|
1413 | 1399 | /* sys info */ |
---|
.. | .. |
---|
1420 | 1406 | |
---|
1421 | 1407 | /*pathes*/ |
---|
1422 | 1408 | int path_num; |
---|
1423 | | - struct mmphw_path_plat path_plats[0]; |
---|
| 1409 | + struct mmphw_path_plat path_plats[]; |
---|
1424 | 1410 | }; |
---|
1425 | 1411 | |
---|
1426 | 1412 | static inline int overlay_is_vid(struct mmp_overlay *overlay) |
---|
.. | .. |
---|
1443 | 1429 | return path_to_ctrl(overlay->path); |
---|
1444 | 1430 | } |
---|
1445 | 1431 | |
---|
1446 | | -static inline void *ctrl_regs(struct mmp_path *path) |
---|
| 1432 | +static inline void __iomem *ctrl_regs(struct mmp_path *path) |
---|
1447 | 1433 | { |
---|
1448 | 1434 | return path_to_ctrl(path)->reg_base; |
---|
1449 | 1435 | } |
---|
.. | .. |
---|
1452 | 1438 | static inline struct lcd_regs *path_regs(struct mmp_path *path) |
---|
1453 | 1439 | { |
---|
1454 | 1440 | if (path->id == PATH_PN) |
---|
1455 | | - return (struct lcd_regs *)(ctrl_regs(path) + 0xc0); |
---|
| 1441 | + return (struct lcd_regs __force *)(ctrl_regs(path) + 0xc0); |
---|
1456 | 1442 | else if (path->id == PATH_TV) |
---|
1457 | | - return (struct lcd_regs *)ctrl_regs(path); |
---|
| 1443 | + return (struct lcd_regs __force *)ctrl_regs(path); |
---|
1458 | 1444 | else if (path->id == PATH_P2) |
---|
1459 | | - return (struct lcd_regs *)(ctrl_regs(path) + 0x200); |
---|
| 1445 | + return (struct lcd_regs __force *)(ctrl_regs(path) + 0x200); |
---|
1460 | 1446 | else { |
---|
1461 | 1447 | dev_err(path->dev, "path id %d invalid\n", path->id); |
---|
1462 | 1448 | BUG_ON(1); |
---|