http://downloads.netgear.com/files/GPL/GPL_Source_V361j_DM111PSP_series_consumer_rele...
[bcm963xx.git] / kernel / linux / 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
27 #ifdef CONFIG_IOP310_MU
28 #include "message.h"
29 #endif
30
31 /*
32  * Standard IO mapping for all IOP310 based systems
33  */
34 static struct map_desc iop80310_std_desc[] __initdata = {
35  /* virtual     physical      length       type */
36  // IOP310 Memory Mapped Registers
37  { 0xe8001000,  0x00001000,   0x00001000,  MT_DEVICE },
38  // PCI I/O Space
39  { 0xfe000000,  0x90000000,   0x00020000,  MT_DEVICE }
40 };
41
42 void __init iop310_map_io(void)
43 {
44         iotable_init(iop80310_std_desc, ARRAY_SIZE(iop80310_std_desc));
45 }
46
47 /*
48  * IQ80310 specific IO mappings
49  */
50 #ifdef CONFIG_ARCH_IQ80310
51 static struct map_desc iq80310_io_desc[] __initdata = {
52  /* virtual     physical      length        type */
53  // IQ80310 On-Board Devices
54  { 0xfe800000,  0xfe800000,   0x00100000,   MT_DEVICE }
55 };
56
57 void __init iq80310_map_io(void)
58 {
59 #ifdef CONFIG_IOP310_MU
60         /* acquiring 1MB of memory aligned on 1MB boundary for MU */
61         mu_mem = __alloc_bootmem(0x100000, 0x100000, 0);
62 #endif
63
64         iop310_map_io();
65
66         iotable_init(iq80310_io_desc, ARRAY_SIZE(iq80310_io_desc));
67 }
68 #endif // CONFIG_ARCH_IQ80310
69