summaryrefslogtreecommitdiff
path: root/drivers/video/fbdev
diff options
context:
space:
mode:
authorEthan Nelson-Moore <enelsonmoore@gmail.com>2026-09-14 22:20:29 -0700
committerHelge Deller <deller@gmx.de>2026-10-13 11:33:12 +0200
commit8e7b98afecd734f6543c65550a265fa6b87b8feb (patch)
tree3c5fb6ed343333691ab6b7c7c69bddfccb366ec2 /drivers/video/fbdev
parent8710af6a35201a6d01b5af8f7e4bad29cc40467f (diff)
fbdev: acornfb: remove unused code for 26-bit hardware
The acornfb driver contains code to support machines with a MEMC chip and without IOMD and VIDC20 chips. All 32-bit Acorn hardware has IOMD and VIDC20 chips and does not have a MEMC chip. Linux formerly supported 26-bit Acorn computers, but that support was removed in commit 99eb8a550dbc ("Remove the arm26 port") because it had bitrotted to the extent that it did not even compile. Remove this unused code. Also take the opportunity to remove incorrect file paths in the file headers, which are bad style regardless. Signed-off-by: Ethan Nelson-Moore <enelsonmoore@gmail.com> Signed-off-by: Helge Deller <deller@gmx.de>
Diffstat (limited to 'drivers/video/fbdev')
-rw-r--r--drivers/video/fbdev/acornfb.c57
-rw-r--r--drivers/video/fbdev/acornfb.h9
2 files changed, 16 insertions, 50 deletions
diff --git a/drivers/video/fbdev/acornfb.c b/drivers/video/fbdev/acornfb.c
index f0600f6ca254..30781679c90a 100644
--- a/drivers/video/fbdev/acornfb.c
+++ b/drivers/video/fbdev/acornfb.c
@@ -1,7 +1,5 @@
// SPDX-License-Identifier: GPL-2.0-only
/*
- * linux/drivers/video/acornfb.c
- *
* Copyright (C) 1998-2001 Russell King
*
* Frame buffer code for Acorn platforms
@@ -94,7 +92,6 @@ static struct vidc_timing current_vidc;
extern unsigned int vram_size; /* set by setup.c */
-#ifdef HAS_VIDC20
#include <mach/acornfb.h>
#define MAX_SIZE (2*1024*1024)
@@ -306,7 +303,6 @@ acornfb_setcolreg(u_int regno, u_int red, u_int green, u_int blue,
return 0;
}
-#endif
/*
* Before selecting the timing parameters, adjust
@@ -390,7 +386,6 @@ acornfb_adjust_timing(struct fb_info *info, struct fb_var_screeninfo *var, u_int
/* hsync_len must be even */
var->hsync_len = (var->hsync_len + 1) & ~1;
-#if defined(HAS_VIDC20)
/* left_margin must be even */
if (var->left_margin & 1) {
var->left_margin += 1;
@@ -400,7 +395,6 @@ acornfb_adjust_timing(struct fb_info *info, struct fb_var_screeninfo *var, u_int
/* right_margin must be even */
if (var->right_margin & 1)
var->right_margin += 1;
-#endif
if (var->vsync_len < 1)
var->vsync_len = 1;
@@ -436,11 +430,7 @@ acornfb_update_dma(struct fb_info *info, struct fb_var_screeninfo *var)
{
u_int off = var->yoffset * info->fix.line_length;
-#if defined(HAS_MEMC)
- memc_write(VDMA_INIT, off >> 2);
-#elif defined(HAS_IOMD)
iomd_writel(info->fix.smem_start + off, IOMD_VIDINIT);
-#endif
}
static int
@@ -469,7 +459,6 @@ acornfb_check_var(struct fb_var_screeninfo *var, struct fb_info *info)
var->transp.length = 0;
break;
-#ifdef HAS_VIDC20
case 16:
var->red.offset = 0;
var->red.length = 5;
@@ -491,7 +480,6 @@ acornfb_check_var(struct fb_var_screeninfo *var, struct fb_info *info)
var->transp.offset = 24;
var->transp.length = 4;
break;
-#endif
default:
return -EINVAL;
}
@@ -519,6 +507,9 @@ acornfb_check_var(struct fb_var_screeninfo *var, struct fb_info *info)
static int acornfb_set_par(struct fb_info *info)
{
+ unsigned long start, size;
+ u_int control;
+
switch (info->var.bits_per_pixel) {
case 1:
current_par.palette_size = 2;
@@ -536,7 +527,6 @@ static int acornfb_set_par(struct fb_info *info)
current_par.palette_size = VIDC_PALETTE_SIZE;
info->fix.visual = FB_VISUAL_PSEUDOCOLOR;
break;
-#ifdef HAS_VIDC20
case 16:
current_par.palette_size = 32;
info->fix.visual = FB_VISUAL_DIRECTCOLOR;
@@ -545,41 +535,26 @@ static int acornfb_set_par(struct fb_info *info)
current_par.palette_size = VIDC_PALETTE_SIZE;
info->fix.visual = FB_VISUAL_DIRECTCOLOR;
break;
-#endif
default:
BUG();
}
info->fix.line_length = (info->var.xres * info->var.bits_per_pixel) / 8;
-#if defined(HAS_MEMC)
- {
- unsigned long size = info->fix.smem_len - VDMA_XFERSIZE;
+ start = info->fix.smem_start;
+ size = current_par.screen_end;
- memc_write(VDMA_START, 0);
- memc_write(VDMA_END, size >> 2);
+ if (current_par.using_vram) {
+ size -= current_par.vram_half_sam;
+ control = DMA_CR_E | (current_par.vram_half_sam / 256);
+ } else {
+ size -= 16;
+ control = DMA_CR_E | DMA_CR_D | 16;
}
-#elif defined(HAS_IOMD)
- {
- unsigned long start, size;
- u_int control;
-
- start = info->fix.smem_start;
- size = current_par.screen_end;
-
- if (current_par.using_vram) {
- size -= current_par.vram_half_sam;
- control = DMA_CR_E | (current_par.vram_half_sam / 256);
- } else {
- size -= 16;
- control = DMA_CR_E | DMA_CR_D | 16;
- }
- iomd_writel(start, IOMD_VIDSTART);
- iomd_writel(size, IOMD_VIDEND);
- iomd_writel(control, IOMD_VIDCR);
- }
-#endif
+ iomd_writel(start, IOMD_VIDSTART);
+ iomd_writel(size, IOMD_VIDEND);
+ iomd_writel(control, IOMD_VIDCR);
acornfb_update_dma(info, &info->var);
acornfb_set_timing(info);
@@ -709,10 +684,8 @@ static void acornfb_init_fbinfo(void)
*/
memset(&fb_info.var, 0, sizeof(fb_info.var));
-#if defined(HAS_VIDC20)
fb_info.var.red.length = 8;
fb_info.var.transp.length = 4;
-#endif
fb_info.var.green = fb_info.var.red;
fb_info.var.blue = fb_info.var.red;
fb_info.var.nonstd = 0;
@@ -991,7 +964,6 @@ static int acornfb_probe(struct platform_device *dev)
size = PAGE_ALIGN(size);
-#if defined(HAS_VIDC20)
if (!current_par.using_vram) {
dma_addr_t handle;
void *base;
@@ -1011,7 +983,6 @@ static int acornfb_probe(struct platform_device *dev)
fb_info.screen_base = base;
fb_info.fix.smem_start = handle;
}
-#endif
fb_info.fix.smem_len = size;
current_par.palette_size = VIDC_PALETTE_SIZE;
diff --git a/drivers/video/fbdev/acornfb.h b/drivers/video/fbdev/acornfb.h
index f8df4ecb4fd7..c5d0fa04adc8 100644
--- a/drivers/video/fbdev/acornfb.h
+++ b/drivers/video/fbdev/acornfb.h
@@ -1,16 +1,14 @@
/* SPDX-License-Identifier: GPL-2.0-only */
/*
- * linux/drivers/video/acornfb.h
- *
* Copyright (C) 1998,1999 Russell King
*
* Frame buffer code for Acorn platforms
*/
-#if defined(HAS_VIDC20)
+
#include <asm/hardware/iomd.h>
+
#define VIDC_PALETTE_SIZE 256
#define VIDC_NAME "VIDC20"
-#endif
#define EXTEND8(x) ((x)|(x)<<8)
#define EXTEND4(x) ((x)|(x)<<4|(x)<<8|(x)<<12)
@@ -94,7 +92,6 @@ struct modex_params {
const struct modey_params *modey;
};
-#ifdef HAS_VIDC20
/*
* VIDC20 registers
*/
@@ -162,5 +159,3 @@ struct modex_params {
#define VIDC20_DCTL_VRAM_PXCLK (1 << 18)
#define VIDC20_DCTL_VRAM_PXCLK2 (2 << 18)
#define VIDC20_DCTL_VRAM_PXCLK4 (3 << 18)
-
-#endif