ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-2.6.6.tar.bz2
[linux-2.6.git] / arch / arm / mach-rpc / riscpc.c
1 /*
2  *  linux/arch/arm/mach-rpc/riscpc.c
3  *
4  *  Copyright (C) 1998-2001 Russell King
5  *
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.
9  *
10  *  Architecture specific fixups.
11  */
12 #include <linux/kernel.h>
13 #include <linux/tty.h>
14 #include <linux/delay.h>
15 #include <linux/pm.h>
16 #include <linux/init.h>
17
18 #include <asm/elf.h>
19 #include <asm/io.h>
20 #include <asm/mach-types.h>
21 #include <asm/hardware.h>
22 #include <asm/page.h>
23 #include <asm/domain.h>
24 #include <asm/setup.h>
25
26 #include <asm/mach/map.h>
27 #include <asm/mach/arch.h>
28
29 extern void rpc_init_irq(void);
30
31 extern unsigned int vram_size;
32
33 #if 0
34
35 unsigned int memc_ctrl_reg;
36 unsigned int number_mfm_drives;
37
38 static int __init parse_tag_acorn(const struct tag *tag)
39 {
40         memc_ctrl_reg = tag->u.acorn.memc_control_reg;
41         number_mfm_drives = tag->u.acorn.adfsdrives;
42
43         switch (tag->u.acorn.vram_pages) {
44         case 512:
45                 vram_size += PAGE_SIZE * 256;
46         case 256:
47                 vram_size += PAGE_SIZE * 256;
48         default:
49                 break;
50         }
51 #if 0
52         if (vram_size) {
53                 desc->video_start = 0x02000000;
54                 desc->video_end   = 0x02000000 + vram_size;
55         }
56 #endif
57         return 0;
58 }
59
60 __tagtable(ATAG_ACORN, parse_tag_acorn);
61
62 #endif
63
64 static struct map_desc rpc_io_desc[] __initdata = {
65  { SCREEN_BASE, SCREEN_START,   2*1048576, MT_DEVICE }, /* VRAM         */
66  { IO_BASE,     IO_START,       IO_SIZE  , MT_DEVICE }, /* IO space             */
67  { EASI_BASE,   EASI_START,     EASI_SIZE, MT_DEVICE }  /* EASI space   */
68 };
69
70 void __init rpc_map_io(void)
71 {
72         iotable_init(rpc_io_desc, ARRAY_SIZE(rpc_io_desc));
73
74         /*
75          * Turn off floppy.
76          */
77         outb(0xc, 0x3f2);
78
79         /*
80          * RiscPC can't handle half-word loads and stores
81          */
82         elf_hwcap &= ~HWCAP_HALF;
83 }
84
85 MACHINE_START(RISCPC, "Acorn-RiscPC")
86         MAINTAINER("Russell King")
87         BOOT_MEM(0x10000000, 0x03000000, 0xe0000000)
88         BOOT_PARAMS(0x10000100)
89         DISABLE_PARPORT(0)
90         DISABLE_PARPORT(1)
91         MAPIO(rpc_map_io)
92         INITIRQ(rpc_init_irq)
93 MACHINE_END