2 * linux/arch/arm/mach-iop3xx/iop321-setup.c
4 * Author: Nicolas Pitre <nico@cam.org>
5 * Copyright (C) 2001 MontaVista Software, Inc.
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.
13 #include <linux/init.h>
14 #include <linux/config.h>
15 #include <linux/init.h>
16 #include <linux/major.h>
18 #include <linux/device.h>
19 #include <linux/serial.h>
20 #include <linux/tty.h>
21 #include <linux/serial_core.h>
24 #include <asm/pgtable.h>
26 #include <asm/mach/map.h>
27 #include <asm/setup.h>
28 #include <asm/system.h>
29 #include <asm/memory.h>
30 #include <asm/hardware.h>
31 #include <asm/mach-types.h>
32 #include <asm/mach/arch.h>
34 #define IOP321_UART_XTAL 1843200
37 * Standard IO mapping for all IOP321 based systems
39 static struct map_desc iop321_std_desc[] __initdata = {
40 /* virtual physical length type */
42 /* mem mapped registers */
43 { IOP321_VIRT_MEM_BASE, IOP321_PHY_MEM_BASE, 0x00002000, MT_DEVICE },
46 { 0xfe000000, 0x90000000, 0x00020000, MT_DEVICE }
49 #ifdef CONFIG_ARCH_IQ80321
50 #define UARTBASE IQ80321_UART
51 #define IRQ_UART IRQ_IQ80321_UART
54 #ifdef CONFIG_ARCH_IQ31244
55 #define UARTBASE IQ31244_UART
56 #define IRQ_UART IRQ_IQ31244_UART
59 static struct uart_port iop321_serial_ports[] = {
61 .membase = (char*)(UARTBASE),
62 .mapbase = (UARTBASE),
64 .flags = UPF_SKIP_TEST,
67 .uartclk = IOP321_UART_XTAL,
74 void __init iop321_map_io(void)
76 iotable_init(iop321_std_desc, ARRAY_SIZE(iop321_std_desc));
77 early_serial_setup(&iop321_serial_ports[0]);
80 #ifdef CONFIG_ARCH_IQ80321
81 extern void iq80321_map_io(void);
82 extern struct sys_timer iop321_timer;
83 extern void iop321_init_time(void);
86 #ifdef CONFIG_ARCH_IQ31244
87 extern void iq31244_map_io(void);
88 extern struct sys_timer iop321_timer;
89 extern void iop321_init_time(void);
92 #if defined(CONFIG_ARCH_IQ80321)
93 MACHINE_START(IQ80321, "Intel IQ80321")
94 MAINTAINER("Intel Corporation")
95 BOOT_MEM(PHYS_OFFSET, IQ80321_UART, IQ80321_UART)
97 INITIRQ(iop321_init_irq)
98 .timer = &iop321_timer,
99 BOOT_PARAMS(0xa0000100)
101 #elif defined(CONFIG_ARCH_IQ31244)
102 MACHINE_START(IQ31244, "Intel IQ31244")
103 MAINTAINER("Intel Corp.")
104 BOOT_MEM(PHYS_OFFSET, IQ31244_UART, IQ31244_UART)
105 MAPIO(iq31244_map_io)
106 INITIRQ(iop321_init_irq)
107 .timer = &iop321_timer,
108 BOOT_PARAMS(0xa0000100)
111 #error No machine descriptor defined for this IOP3XX implementation