2 * linux/arch/arm/mach-iop3xx/iop331-setup.c
4 * Author: Dave Jiang (dave.jiang@intel.com)
5 * Copyright (C) 2004 Intel Corporation.
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 IOP331_UART_XTAL 33334000
37 * Standard IO mapping for all IOP331 based systems
39 static struct map_desc iop331_std_desc[] __initdata = {
40 /* virtual physical length type */
42 /* mem mapped registers */
43 { IOP331_VIRT_MEM_BASE, IOP331_PHYS_MEM_BASE, 0x00002000, MT_DEVICE },
46 { 0xfe000000, 0x90000000, 0x00020000, MT_DEVICE }
49 static struct uart_port iop331_serial_ports[] = {
51 .membase = (char*)(IQ80331_UART0_VIRT),
52 .mapbase = (IQ80331_UART0_PHYS),
53 .irq = IRQ_IOP331_UART0,
54 .flags = UPF_SKIP_TEST,
57 .uartclk = IOP331_UART_XTAL,
62 .membase = (char*)(IQ80331_UART1_VIRT),
63 .mapbase = (IQ80331_UART1_PHYS),
64 .irq = IRQ_IOP331_UART1,
65 .flags = UPF_SKIP_TEST,
68 .uartclk = IOP331_UART_XTAL,
75 void __init iop331_map_io(void)
77 iotable_init(iop331_std_desc, ARRAY_SIZE(iop331_std_desc));
78 early_serial_setup(&iop331_serial_ports[0]);
79 early_serial_setup(&iop331_serial_ports[1]);
82 #ifdef CONFIG_ARCH_IQ80331
83 extern void iop331_init_irq(void);
84 extern void iop331_init_time(void);
85 extern void iq80331_map_io(void);
88 #if defined(CONFIG_ARCH_IQ80331)
89 MACHINE_START(IQ80331, "Intel IQ80331")
90 MAINTAINER("Intel Corp.")
91 BOOT_MEM(PHYS_OFFSET, 0xfefff000, 0xfffff000) // virtual, physical
92 //BOOT_MEM(PHYS_OFFSET, IQ80331_UART0_VIRT, IQ80331_UART0_PHYS)
94 INITIRQ(iop331_init_irq)
95 INITTIME(iop331_init_time)
99 #error No machine descriptor defined for this IOP3XX implementation