This commit was manufactured by cvs2svn to create branch 'vserver'.
[linux-2.6.git] / arch / arm / mach-omap / omap-generic.c
1 /*
2  * linux/arch/arm/mach-omap/generic.c
3  *
4  * Modified from innovator.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         if (!machine_is_omap_generic())
53                 return;
54
55         /*
56          * Make sure the serial ports are muxed on at this point.
57          * You have to mux them off in device drivers later on
58          * if not needed.
59          */
60         if (cpu_is_omap1510()) {
61                 omap_early_serial_init();
62         }
63 }
64
65 static void __init omap_generic_map_io(void)
66 {
67         omap_map_io();
68 }
69
70 MACHINE_START(OMAP_GENERIC, "Generic OMAP-1510/1610")
71         MAINTAINER("Tony Lindgren <tony@atomide.com>")
72         BOOT_MEM(0x10000000, 0xe0000000, 0xe0000000)
73         BOOT_PARAMS(0x10000100)
74         MAPIO(omap_generic_map_io)
75         INITIRQ(omap_generic_init_irq)
76         INIT_MACHINE(omap_generic_init)
77 MACHINE_END