summaryrefslogtreecommitdiff
path: root/drivers/video/fbdev/vga16fb.c
diff options
context:
space:
mode:
authorThomas Zimmermann <tzimmermann@suse.de>2022-07-18 10:23:19 +0300
committerThomas Zimmermann <tzimmermann@suse.de>2022-07-19 14:19:11 +0300
commit4652905f4e30ab7b4827faa38343fdafa90f2956 (patch)
tree613139eaef611c07ee8841ffe4e083fa181badd3 /drivers/video/fbdev/vga16fb.c
parent5e01376124309b4dbd30d413f43c0d9c2f60edea (diff)
downloadlinux-4652905f4e30ab7b4827faa38343fdafa90f2956.tar.xz
video: Provide constants for VGA I/O range
Provide VGA_FB_ constants for the VGA framebuffer I/O range and convert fbdev code. In the case of vga16fb, this is a rename of the existing constants VGA_FB_PHYS and VGA_FB_PHYS_LEN. v2: * clarify relationship with old constants in vga16fb (Javier) Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Javier Martinez Canillas <javierm@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20220718072322.8927-9-tzimmermann@suse.de
Diffstat (limited to 'drivers/video/fbdev/vga16fb.c')
-rw-r--r--drivers/video/fbdev/vga16fb.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/drivers/video/fbdev/vga16fb.c b/drivers/video/fbdev/vga16fb.c
index 3312b6a4e00d..35cf51ae3292 100644
--- a/drivers/video/fbdev/vga16fb.c
+++ b/drivers/video/fbdev/vga16fb.c
@@ -25,9 +25,6 @@
#include <asm/io.h>
#include <video/vga.h>
-#define VGA_FB_PHYS 0xA0000
-#define VGA_FB_PHYS_LEN 65536
-
#define MODE_SKIP4 1
#define MODE_8BPP 2
#define MODE_CFB 4
@@ -87,8 +84,8 @@ static struct fb_var_screeninfo vga16fb_defined = {
/* name should not depend on EGA/VGA */
static const struct fb_fix_screeninfo vga16fb_fix = {
.id = "VGA16 VGA",
- .smem_start = VGA_FB_PHYS,
- .smem_len = VGA_FB_PHYS_LEN,
+ .smem_start = VGA_FB_PHYS_BASE,
+ .smem_len = VGA_FB_PHYS_SIZE,
.type = FB_TYPE_VGA_PLANES,
.type_aux = FB_AUX_VGA_PLANES_VGA4,
.visual = FB_VISUAL_PSEUDOCOLOR,
@@ -1333,8 +1330,8 @@ static int vga16fb_probe(struct platform_device *dev)
goto err_ioremap;
}
- /* XXX share VGA_FB_PHYS and I/O region with vgacon and others */
- info->screen_base = (void __iomem *)VGA_MAP_MEM(VGA_FB_PHYS, 0);
+ /* XXX share VGA_FB_PHYS_BASE and I/O region with vgacon and others */
+ info->screen_base = (void __iomem *)VGA_MAP_MEM(VGA_FB_PHYS_BASE, 0);
if (!info->screen_base) {
printk(KERN_ERR "vga16fb: unable to map device\n");
@@ -1385,8 +1382,8 @@ static int vga16fb_probe(struct platform_device *dev)
vga16fb_update_fix(info);
- info->apertures->ranges[0].base = VGA_FB_PHYS;
- info->apertures->ranges[0].size = VGA_FB_PHYS_LEN;
+ info->apertures->ranges[0].base = VGA_FB_PHYS_BASE;
+ info->apertures->ranges[0].size = VGA_FB_PHYS_SIZE;
if (register_framebuffer(info) < 0) {
printk(KERN_ERR "vga16fb: unable to register framebuffer\n");