# BRCM_VERSION=3
[bcm963xx.git] / kernel / linux / arch / arm / mach-iop3xx / arch.c
1 /*
2  * linux/arch/arm/mach-iop3xx/arch.c
3  *
4  * Author: Nicolas Pitre <nico@cam.org>
5  * Copyright (C) 2001 MontaVista Software, Inc.
6  *
7  * This program is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License version 2 as
9  * published by the Free Software Foundation.
10  *
11  */
12 #include <linux/config.h>
13 #include <linux/init.h>
14 #include <linux/major.h>
15 #include <linux/fs.h>
16
17 #include <asm/setup.h>
18 #include <asm/system.h>
19 #include <asm/memory.h>
20 #include <asm/hardware.h>
21 #include <asm/mach-types.h>
22 #include <asm/mach/arch.h>
23
24 #ifdef CONFIG_ARCH_IQ80310
25 extern void iq80310_map_io(void);
26 extern void iq80310_init_irq(void);
27 #endif
28
29 #ifdef CONFIG_ARCH_IQ80321
30 extern void iq80321_map_io(void);
31 extern void iop321_init_irq(void);
32 extern void iop321_init_time(void);
33 #endif
34
35 #ifdef CONFIG_ARCH_IQ80310
36 static void __init
37 fixup_iq80310(struct machine_desc *desc, struct tag *tags,
38               char **cmdline, struct meminfo *mi)
39 {
40         system_rev = (*(volatile unsigned int*)0xfe830000) & 0x0f;
41
42         if (system_rev)
43                 system_rev = 0xF;
44 }
45 #endif
46
47 #ifdef CONFIG_ARCH_IQ80321
48 static void __init
49 fixup_iop321(struct machine_desc *desc, struct param_struct *params,
50               char **cmdline, struct meminfo *mi)
51 {
52 }
53 #endif
54
55 #ifdef CONFIG_ARCH_IQ80310
56 MACHINE_START(IQ80310, "Cyclone IQ80310")
57         MAINTAINER("MontaVista Software Inc.")
58         BOOT_MEM(0xa0000000, 0xfe000000, 0xfe000000)
59         FIXUP(fixup_iq80310)
60         MAPIO(iq80310_map_io)
61         INITIRQ(iq80310_init_irq)
62 MACHINE_END
63
64 #elif defined(CONFIG_ARCH_IQ80321)
65 MACHINE_START(IQ80321, "Intel IQ80321")
66         MAINTAINER("MontaVista Software, Inc.")
67         BOOT_MEM(PHYS_OFFSET, IQ80321_UART1, 0xfe800000)
68         FIXUP(fixup_iop321)
69         MAPIO(iq80321_map_io)
70         INITIRQ(iop321_init_irq)
71         INITTIME(iop321_init_time)
72 MACHINE_END
73
74 #else
75 #error No machine descriptor defined for this IOP310 implementation
76 #endif