ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-2.6.6.tar.bz2
[linux-2.6.git] / arch / arm / mach-omap / board-generic.c
1 /*
2  * linux/arch/arm/mach-omap/board-generic.c
3  *
4  * Modified from board-innovator1510.c
5  *
6  * Code for generic OMAP board. Should work on many OMAP systems where
7  * the device drivers take care of all the necessary hardware initialization.
8  * Do not put any board specific code to this file; create a new machine
9  * type if you need custom low-level initializations.
10  *
11  * This program is free software; you can redistribute it and/or modify
12  * it under the terms of the GNU General Public License version 2 as
13  * published by the Free Software Foundation.
14  */
15
16 #include <linux/kernel.h>
17 #include <linux/init.h>
18 #include <linux/device.h>
19
20 #include <asm/hardware.h>
21 #include <asm/mach/arch.h>
22 #include <asm/mach/map.h>
23
24 #include <asm/arch/clocks.h>
25 #include <asm/arch/gpio.h>
26 #include <asm/arch/mux.h>
27
28 #include "common.h"
29
30 static void __init omap_generic_init_irq(void)
31 {
32         omap_init_irq();
33 }
34
35 /*
36  * Muxes the serial ports on
37  */
38 static void __init omap_early_serial_init(void)
39 {
40         omap_cfg_reg(UART1_TX);
41         omap_cfg_reg(UART1_RTS);
42
43         omap_cfg_reg(UART2_TX);
44         omap_cfg_reg(UART2_RTS);
45
46         omap_cfg_reg(UART3_TX);
47         omap_cfg_reg(UART3_RX);
48 }
49
50 static void __init omap_generic_init(void)
51 {
52         /*
53          * Make sure the serial ports are muxed on at this point.
54          * You have to mux them off in device drivers later on
55          * if not needed.
56          */
57         if (cpu_is_omap1510()) {
58                 omap_early_serial_init();
59         }
60 }
61
62 static void __init omap_generic_map_io(void)
63 {
64         omap_map_io();
65 }
66
67 MACHINE_START(OMAP_GENERIC, "Generic OMAP-1510/1610")
68         MAINTAINER("Tony Lindgren <tony@atomide.com>")
69         BOOT_MEM(0x10000000, 0xe0000000, 0xe0000000)
70         BOOT_PARAMS(0x10000100)
71         MAPIO(omap_generic_map_io)
72         INITIRQ(omap_generic_init_irq)
73         INIT_MACHINE(omap_generic_init)
74 MACHINE_END