Merge remote-tracking branch 'moduleh/module.h-split'
[linux-2.6/next.git] / arch / arm / mach-omap2 / board-generic.c
blob4431ad364565adca1ed0ff11eca01aeec3923934
1 /*
2 * linux/arch/arm/mach-omap2/board-generic.c
4 * Copyright (C) 2005 Nokia Corporation
5 * Author: Paul Mundt <paul.mundt@nokia.com>
7 * Modified from mach-omap/omap1/board-generic.c
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.
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.
18 #include <linux/gpio.h>
19 #include <linux/kernel.h>
20 #include <linux/init.h>
21 #include <linux/device.h>
23 #include <mach/hardware.h>
24 #include <asm/mach-types.h>
25 #include <asm/mach/arch.h>
26 #include <asm/mach/map.h>
28 #include <plat/usb.h>
29 #include <plat/board.h>
30 #include <plat/common.h>
32 static struct omap_board_config_kernel generic_config[] = {
35 static void __init omap_generic_init_early(void)
37 omap2_init_common_infrastructure();
38 omap2_init_common_devices(NULL, NULL);
41 static void __init omap_generic_init(void)
43 omap_serial_init();
44 omap_board_config = generic_config;
45 omap_board_config_size = ARRAY_SIZE(generic_config);
48 static void __init omap_generic_map_io(void)
50 if (cpu_is_omap242x()) {
51 omap2_set_globals_242x();
52 omap242x_map_common_io();
53 } else if (cpu_is_omap243x()) {
54 omap2_set_globals_243x();
55 omap243x_map_common_io();
56 } else if (cpu_is_omap34xx()) {
57 omap2_set_globals_3xxx();
58 omap34xx_map_common_io();
59 } else if (cpu_is_omap44xx()) {
60 omap2_set_globals_443x();
61 omap44xx_map_common_io();
65 /* XXX This machine entry name should be updated */
66 MACHINE_START(OMAP_GENERIC, "Generic OMAP24xx")
67 /* Maintainer: Paul Mundt <paul.mundt@nokia.com> */
68 .atag_offset = 0x100,
69 .reserve = omap_reserve,
70 .map_io = omap_generic_map_io,
71 .init_early = omap_generic_init_early,
72 .init_irq = omap2_init_irq,
73 .init_machine = omap_generic_init,
74 .timer = &omap2_timer,
75 MACHINE_END