2 * linux/arch/arm/mach-iop32x/setup.c
4 * Author: Nicolas Pitre <nico@cam.org>
5 * Copyright (C) 2001 MontaVista Software, Inc.
6 * Copyright (C) 2004 Intel Corporation.
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
14 #include <linux/init.h>
15 #include <linux/major.h>
17 #include <linux/platform_device.h>
18 #include <linux/serial.h>
19 #include <linux/tty.h>
20 #include <linux/serial_core.h>
23 #include <asm/pgtable.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 #include <asm/hardware/iop3xx.h>
34 #define IOP321_UART_XTAL 1843200
36 #ifdef CONFIG_ARCH_IQ80321
37 #define UARTBASE IQ80321_UART
38 #define IRQ_UART IRQ_IQ80321_UART
41 #ifdef CONFIG_ARCH_IQ31244
42 #define UARTBASE IQ31244_UART
43 #define IRQ_UART IRQ_IQ31244_UART
46 static struct uart_port iop321_serial_ports[] = {
48 .membase = (char*)(UARTBASE),
49 .mapbase = (UARTBASE),
51 .flags = UPF_SKIP_TEST,
54 .uartclk = IOP321_UART_XTAL,
61 void __init iop32x_init(void)
63 platform_device_register(&iop3xx_i2c0_device);
64 platform_device_register(&iop3xx_i2c1_device);
65 early_serial_setup(&iop321_serial_ports[0]);
68 #ifdef CONFIG_ARCH_IQ80321
69 extern void iq80321_map_io(void);
70 extern struct sys_timer iop321_timer;
71 extern void iop321_init_time(void);
74 #ifdef CONFIG_ARCH_IQ31244
75 extern void iq31244_map_io(void);
76 extern struct sys_timer iop321_timer;
77 extern void iop321_init_time(void);
80 #if defined(CONFIG_ARCH_IQ80321)
81 MACHINE_START(IQ80321, "Intel IQ80321")
82 /* Maintainer: Intel Corporation */
83 .phys_io = IQ80321_UART,
84 .io_pg_offst = ((IQ80321_UART) >> 18) & 0xfffc,
85 .map_io = iq80321_map_io,
86 .init_irq = iop321_init_irq,
87 .timer = &iop321_timer,
88 .boot_params = 0xa0000100,
89 .init_machine = iop32x_init,
91 #elif defined(CONFIG_ARCH_IQ31244)
92 MACHINE_START(IQ31244, "Intel IQ31244")
93 /* Maintainer: Intel Corp. */
94 .phys_io = IQ31244_UART,
95 .io_pg_offst = ((IQ31244_UART) >> 18) & 0xfffc,
96 .map_io = iq31244_map_io,
97 .init_irq = iop321_init_irq,
98 .timer = &iop321_timer,
99 .boot_params = 0xa0000100,
100 .init_machine = iop32x_init,
103 #error No machine descriptor defined for this IOP3XX implementation