ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-2.6.6.tar.bz2
[linux-2.6.git] / arch / arm / mach-iop3xx / mm.c
1 /*
2  * linux/arch/arm/mach-iop3xx/mm.c
3  *
4  * Low level memory initialization for IOP310 based systems
5  *
6  * Author: Nicolas Pitre <npitre@mvista.com>
7  *
8  * Copyright 2000-2001 MontaVista Software Inc.
9  *
10  * This program is free software; you can redistribute  it and/or modify it
11  * under  the terms of  the GNU General  Public License as published by the
12  * Free Software Foundation;  either version 2 of the  License, or (at your
13  * option) any later version.
14  *
15  */
16 #include <linux/config.h>
17 #include <linux/kernel.h>
18 #include <linux/mm.h>
19 #include <linux/init.h>
20
21 #include <asm/io.h>
22 #include <asm/pgtable.h>
23 #include <asm/page.h>
24
25 #include <asm/mach/map.h>
26 #include <asm/mach-types.h>
27
28 #ifdef CONFIG_IOP310_MU
29 #include "message.h"
30 #endif
31
32 /*
33  * Standard IO mapping for all IOP310 based systems
34  */
35 static struct map_desc iop80310_std_desc[] __initdata = {
36  /* virtual     physical      length       type */
37  // IOP310 Memory Mapped Registers
38  { 0xe8001000,  0x00001000,   0x00001000,  MT_DEVICE },
39  // PCI I/O Space
40  { 0xfe000000,  0x90000000,   0x00020000,  MT_DEVICE }
41 };
42
43 void __init iop310_map_io(void)
44 {
45         iotable_init(iop80310_std_desc, ARRAY_SIZE(iop80310_std_desc));
46 }
47
48 /*
49  * IQ80310 specific IO mappings
50  */
51 #ifdef CONFIG_ARCH_IQ80310
52 static struct map_desc iq80310_io_desc[] __initdata = {
53  /* virtual     physical      length        type */
54  // IQ80310 On-Board Devices
55  { 0xfe800000,  0xfe800000,   0x00100000,   MT_DEVICE }
56 };
57
58 void __init iq80310_map_io(void)
59 {
60 #ifdef CONFIG_IOP310_MU
61         /* acquiring 1MB of memory aligned on 1MB boundary for MU */
62         mu_mem = __alloc_bootmem(0x100000, 0x100000, 0);
63 #endif
64
65         iop310_map_io();
66
67         iotable_init(iq80310_io_desc, ARRAY_SIZE(iq80310_io_desc));
68 }
69 #endif // CONFIG_ARCH_IQ80310
70