2 * linux/arch/arm/mach-rpc/riscpc.c
4 * Copyright (C) 1998-2001 Russell King
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
10 * Architecture specific fixups.
12 #include <linux/kernel.h>
13 #include <linux/tty.h>
14 #include <linux/delay.h>
16 #include <linux/init.h>
17 #include <linux/sched.h>
18 #include <linux/interrupt.h>
22 #include <asm/mach-types.h>
23 #include <asm/hardware.h>
25 #include <asm/domain.h>
26 #include <asm/setup.h>
28 #include <asm/mach/map.h>
29 #include <asm/mach/arch.h>
30 #include <asm/mach/time.h>
32 extern void rpc_init_irq(void);
34 extern unsigned int vram_size;
38 unsigned int memc_ctrl_reg;
39 unsigned int number_mfm_drives;
41 static int __init parse_tag_acorn(const struct tag *tag)
43 memc_ctrl_reg = tag->u.acorn.memc_control_reg;
44 number_mfm_drives = tag->u.acorn.adfsdrives;
46 switch (tag->u.acorn.vram_pages) {
48 vram_size += PAGE_SIZE * 256;
50 vram_size += PAGE_SIZE * 256;
56 desc->video_start = 0x02000000;
57 desc->video_end = 0x02000000 + vram_size;
63 __tagtable(ATAG_ACORN, parse_tag_acorn);
67 static struct map_desc rpc_io_desc[] __initdata = {
68 { SCREEN_BASE, SCREEN_START, 2*1048576, MT_DEVICE }, /* VRAM */
69 { IO_BASE, IO_START, IO_SIZE , MT_DEVICE }, /* IO space */
70 { EASI_BASE, EASI_START, EASI_SIZE, MT_DEVICE } /* EASI space */
73 void __init rpc_map_io(void)
75 iotable_init(rpc_io_desc, ARRAY_SIZE(rpc_io_desc));
83 * RiscPC can't handle half-word loads and stores
85 elf_hwcap &= ~HWCAP_HALF;
89 rpc_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
96 static struct irqaction rpc_timer_irq = {
97 .name = "RiscPC Timer Tick",
98 .flags = SA_INTERRUPT,
99 .handler = rpc_timer_interrupt
103 * Set up timer interrupt.
105 void __init rpc_init_time(void)
107 extern void ioctime_init(void);
110 setup_irq(IRQ_TIMER, &rpc_timer_irq);
113 MACHINE_START(RISCPC, "Acorn-RiscPC")
114 MAINTAINER("Russell King")
115 BOOT_MEM(0x10000000, 0x03000000, 0xe0000000)
116 BOOT_PARAMS(0x10000100)
120 INITIRQ(rpc_init_irq)
121 INITTIME(rpc_init_time)