* [PATCH] ARM: riscpc: simplify vram_size calculation
@ 2026-05-10 23:38 Ethan Nelson-Moore
0 siblings, 0 replies; only message in thread
From: Ethan Nelson-Moore @ 2026-05-10 23:38 UTC (permalink / raw)
To: linux-arm-kernel, linux-kernel; +Cc: Russell King, Ethan Nelson-Moore
The code to calculate vram_size in parse_tag_acorn() is unnecessarily
complex and inflexible. Replace it with a simple multiplication.
Signed-off-by: Ethan Nelson-Moore <enelsonmoore@gmail.com>
---
arch/arm/mach-rpc/riscpc.c | 11 +----------
1 file changed, 1 insertion(+), 10 deletions(-)
diff --git a/arch/arm/mach-rpc/riscpc.c b/arch/arm/mach-rpc/riscpc.c
index bdad13226c6d..14d78b7f9493 100644
--- a/arch/arm/mach-rpc/riscpc.c
+++ b/arch/arm/mach-rpc/riscpc.c
@@ -43,17 +43,8 @@ static int __init parse_tag_acorn(const struct tag *tag)
{
memc_ctrl_reg = tag->u.acorn.memc_control_reg;
number_mfm_drives = tag->u.acorn.adfsdrives;
+ vram_size = tag->u.acorn.vram_pages * PAGE_SIZE;
- switch (tag->u.acorn.vram_pages) {
- case 512:
- vram_size += PAGE_SIZE * 256;
- fallthrough; /* ??? */
- case 256:
- vram_size += PAGE_SIZE * 256;
- break;
- default:
- break;
- }
#if 0
if (vram_size) {
desc->video_start = 0x02000000;
--
2.43.0
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-05-10 23:39 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-10 23:38 [PATCH] ARM: riscpc: simplify vram_size calculation Ethan Nelson-Moore
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox