This commit was generated by cvs2svn to compensate for changes in r517,
[linux-2.6.git] / arch / arm / mach-iop3xx / iop331-setup.c
1 /*
2  * linux/arch/arm/mach-iop3xx/iop331-setup.c
3  *
4  * Author: Dave Jiang (dave.jiang@intel.com)
5  * Copyright (C) 2004 Intel Corporation.
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/mm.h>
13 #include <linux/init.h>
14 #include <linux/config.h>
15 #include <linux/major.h>
16 #include <linux/fs.h>
17 #include <linux/device.h>
18 #include <linux/serial.h>
19 #include <linux/tty.h>
20 #include <linux/serial_core.h>
21
22 #include <asm/io.h>
23 #include <asm/pgtable.h>
24 #include <asm/page.h>
25 #include <asm/mach/map.h>
26 #include <asm/setup.h>
27 #include <asm/system.h>
28 #include <asm/memory.h>
29 #include <asm/hardware.h>
30 #include <asm/mach-types.h>
31 #include <asm/mach/arch.h>
32
33 #define IOP331_UART_XTAL 33334000
34
35 /*
36  * Standard IO mapping for all IOP331 based systems
37  */
38 static struct map_desc iop331_std_desc[] __initdata = {
39  /* virtual     physical      length      type */
40
41  /* mem mapped registers */
42  { IOP331_VIRT_MEM_BASE,  IOP331_PHYS_MEM_BASE,   0x00002000,  MT_DEVICE },
43
44  /* PCI IO space */
45  { 0xfe000000,  0x90000000,   0x00020000,  MT_DEVICE }
46 };
47
48 static struct uart_port iop331_serial_ports[] = {
49         {
50                 .membase        = (char*)(IQ80331_UART0_VIRT),
51                 .mapbase        = (IQ80331_UART0_PHYS),
52                 .irq            = IRQ_IOP331_UART0,
53                 .flags          = UPF_SKIP_TEST,
54                 .iotype         = UPIO_MEM,
55                 .regshift       = 2,
56                 .uartclk        = IOP331_UART_XTAL,
57                 .line           = 0,
58                 .type           = PORT_XSCALE,
59                 .fifosize       = 32
60         } , {
61                 .membase        = (char*)(IQ80331_UART1_VIRT),
62                 .mapbase        = (IQ80331_UART1_PHYS),
63                 .irq            = IRQ_IOP331_UART1,
64                 .flags          = UPF_SKIP_TEST,
65                 .iotype         = UPIO_MEM,
66                 .regshift       = 2,
67                 .uartclk        = IOP331_UART_XTAL,
68                 .line           = 1,
69                 .type           = PORT_XSCALE,
70                 .fifosize       = 32
71         }
72 };
73
74 void __init iop331_map_io(void)
75 {
76         iotable_init(iop331_std_desc, ARRAY_SIZE(iop331_std_desc));
77         early_serial_setup(&iop331_serial_ports[0]);
78         early_serial_setup(&iop331_serial_ports[1]);
79 }
80
81 #ifdef CONFIG_ARCH_IQ80331
82 extern void iop331_init_irq(void);
83 extern struct sys_timer iop331_timer;
84 extern void iq80331_map_io(void);
85 #endif
86
87 #if defined(CONFIG_ARCH_IQ80331)
88 MACHINE_START(IQ80331, "Intel IQ80331")
89     MAINTAINER("Intel Corp.")
90     BOOT_MEM(PHYS_OFFSET, 0xfefff000, 0xfffff000) // virtual, physical
91     //BOOT_MEM(PHYS_OFFSET, IQ80331_UART0_VIRT, IQ80331_UART0_PHYS)
92     MAPIO(iq80331_map_io)
93     INITIRQ(iop331_init_irq)
94     .timer              = &iop331_timer,
95     BOOT_PARAMS(0x0100)
96 MACHINE_END
97 #else
98 #error No machine descriptor defined for this IOP3XX implementation
99 #endif
100
101