]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blob - arch/arm/mach-omap2/board-generic.c
8b8e9fc8b346a730f1339ea2fd0e5e7cef451c1e
[linux-2.6-omap-h63xx.git] / arch / arm / mach-omap2 / board-generic.c
1 /*
2  * linux/arch/arm/mach-omap/omap2/board-generic.c
3  *
4  * Copyright (C) 2005 Nokia Corporation
5  * Author: Paul Mundt <paul.mundt@nokia.com>
6  *
7  * Modified from mach-omap/omap1/board-generic.c
8  *
9  * Code for generic OMAP2 board. Should work on many OMAP2 systems where
10  * the bootloader passes the board-specific data to the kernel.
11  * Do not put any board specific code to this file; create a new machine
12  * type if you need custom low-level initializations.
13  *
14  * This program is free software; you can redistribute it and/or modify
15  * it under the terms of the GNU General Public License version 2 as
16  * published by the Free Software Foundation.
17  */
18
19 #include <linux/kernel.h>
20 #include <linux/init.h>
21 #include <linux/device.h>
22
23 #include <asm/hardware.h>
24 #include <asm/mach-types.h>
25 #include <asm/mach/arch.h>
26 #include <asm/mach/map.h>
27
28 #include <asm/arch/gpio.h>
29 #include <asm/arch/mux.h>
30 #include <asm/arch/usb.h>
31 #include <asm/arch/board.h>
32 #include <asm/arch/common.h>
33
34 static int __initdata generic_serial_ports[OMAP_MAX_NR_PORTS] = {1, 1, 1};
35
36 static void __init omap_generic_init_irq(void)
37 {
38         omap_init_irq();
39 }
40
41 static struct omap_board_config_kernel generic_config[] = {
42 };
43
44 static void __init omap_generic_init(void)
45 {
46         const struct omap_uart_config *uart_conf;
47
48         /*
49          * Make sure the serial ports are muxed on at this point.
50          * You have to mux them off in device drivers later on
51          * if not needed.
52          */
53
54         uart_conf = omap_get_config(OMAP_TAG_UART, struct omap_uart_config);
55         if (uart_conf != NULL) {
56                 unsigned int enabled_ports, i;
57
58                 enabled_ports = uart_conf->enabled_uarts;
59                 for (i = 0; i < 3; i++) {
60                         if (!(enabled_ports & (1 << i)))
61                                 generic_serial_ports[i] = 0;
62                 }
63         }
64
65         omap_board_config = generic_config;
66         omap_board_config_size = ARRAY_SIZE(generic_config);
67         omap_serial_init(generic_serial_ports);
68 }
69
70 static void __init omap_generic_map_io(void)
71 {
72         omap_map_common_io();
73 }
74
75 MACHINE_START(OMAP_GENERIC, "Generic OMAP24xx")
76         /* Maintainer: Paul Mundt <paul.mundt@nokia.com> */
77         .phys_ram       = 0x80000000,
78         .phys_io        = 0x48000000,
79         .io_pg_offst    = ((0xd8000000) >> 18) & 0xfffc,
80         .boot_params    = 0x80000100,
81         .map_io         = omap_generic_map_io,
82         .init_irq       = omap_generic_init_irq,
83         .init_machine   = omap_generic_init,
84         .timer          = &omap_timer,
85 MACHINE_END