hc
2024-05-10 37f49e37ab4cb5d0bc4c60eb5c6d4dd57db767bb
kernel/drivers/video/fbdev/mmp/hw/mmp_ctrl.h
....@@ -1,25 +1,11 @@
1
+/* SPDX-License-Identifier: GPL-2.0-or-later */
12 /*
23 * drivers/video/mmp/hw/mmp_ctrl.h
3
- *
44 *
55 * Copyright (C) 2012 Marvell Technology Group Ltd.
66 * Authors: Guoqing Li <ligq@marvell.com>
77 * Lisa Du <cldu@marvell.com>
88 * 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
- *
239 */
2410
2511 #ifndef _MMP_CTRL_H_
....@@ -1407,7 +1393,7 @@
14071393 /* platform related, get from config */
14081394 const char *name;
14091395 int irq;
1410
- void *reg_base;
1396
+ void __iomem *reg_base;
14111397 struct clk *clk;
14121398
14131399 /* sys info */
....@@ -1420,7 +1406,7 @@
14201406
14211407 /*pathes*/
14221408 int path_num;
1423
- struct mmphw_path_plat path_plats[0];
1409
+ struct mmphw_path_plat path_plats[];
14241410 };
14251411
14261412 static inline int overlay_is_vid(struct mmp_overlay *overlay)
....@@ -1443,7 +1429,7 @@
14431429 return path_to_ctrl(overlay->path);
14441430 }
14451431
1446
-static inline void *ctrl_regs(struct mmp_path *path)
1432
+static inline void __iomem *ctrl_regs(struct mmp_path *path)
14471433 {
14481434 return path_to_ctrl(path)->reg_base;
14491435 }
....@@ -1452,11 +1438,11 @@
14521438 static inline struct lcd_regs *path_regs(struct mmp_path *path)
14531439 {
14541440 if (path->id == PATH_PN)
1455
- return (struct lcd_regs *)(ctrl_regs(path) + 0xc0);
1441
+ return (struct lcd_regs __force *)(ctrl_regs(path) + 0xc0);
14561442 else if (path->id == PATH_TV)
1457
- return (struct lcd_regs *)ctrl_regs(path);
1443
+ return (struct lcd_regs __force *)ctrl_regs(path);
14581444 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);
14601446 else {
14611447 dev_err(path->dev, "path id %d invalid\n", path->id);
14621448 BUG_ON(1);