blob: bb4af05c7f0af4769431d2a9947b68d984bfbc0b [file] [log] [blame]
Tony Lindgren1dbae812005-11-10 14:26:51 +00001/*
Uwe Zeisbergerf30c2262006-10-03 23:01:26 +02002 * linux/arch/arm/mach-omap2/board-generic.c
Tony Lindgren1dbae812005-11-10 14:26:51 +00003 *
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 */
Russell King2f8163b2011-07-26 10:53:52 +010018#include <linux/gpio.h>
Tony Lindgren1dbae812005-11-10 14:26:51 +000019#include <linux/kernel.h>
20#include <linux/init.h>
21#include <linux/device.h>
22
Russell Kinga09e64f2008-08-05 16:14:15 +010023#include <mach/hardware.h>
Tony Lindgren1dbae812005-11-10 14:26:51 +000024#include <asm/mach-types.h>
25#include <asm/mach/arch.h>
26#include <asm/mach/map.h>
27
Tony Lindgrence491cf2009-10-20 09:40:47 -070028#include <plat/usb.h>
29#include <plat/board.h>
30#include <plat/common.h>
Tony Lindgren1dbae812005-11-10 14:26:51 +000031
Paul Walmsleyb3c6df32009-09-03 20:14:02 +030032static struct omap_board_config_kernel generic_config[] = {
33};
34
Russell King - ARM Linux3dc3bad2011-02-14 15:40:20 -080035static void __init omap_generic_init_early(void)
Tony Lindgren1dbae812005-11-10 14:26:51 +000036{
Paul Walmsley48057342010-12-21 15:25:10 -070037 omap2_init_common_infrastructure();
38 omap2_init_common_devices(NULL, NULL);
Tony Lindgren1dbae812005-11-10 14:26:51 +000039}
40
Tony Lindgren1dbae812005-11-10 14:26:51 +000041static void __init omap_generic_init(void)
42{
Tony Lindgren1dbae812005-11-10 14:26:51 +000043 omap_serial_init();
Tony Lindgrene41cccf2011-02-24 14:36:03 -080044 omap_board_config = generic_config;
45 omap_board_config_size = ARRAY_SIZE(generic_config);
Tony Lindgren1dbae812005-11-10 14:26:51 +000046}
47
48static void __init omap_generic_map_io(void)
49{
Paul Walmsley6515e482010-10-08 11:40:17 -060050 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();
62 }
Tony Lindgren1dbae812005-11-10 14:26:51 +000063}
64
Paul Walmsley6515e482010-10-08 11:40:17 -060065/* XXX This machine entry name should be updated */
Tony Lindgren1dbae812005-11-10 14:26:51 +000066MACHINE_START(OMAP_GENERIC, "Generic OMAP24xx")
67 /* Maintainer: Paul Mundt <paul.mundt@nokia.com> */
Tony Lindgren1dbae812005-11-10 14:26:51 +000068 .boot_params = 0x80000100,
Russell King71ee7da2010-05-23 10:18:16 +010069 .reserve = omap_reserve,
Russell King - ARM Linux3dc3bad2011-02-14 15:40:20 -080070 .map_io = omap_generic_map_io,
71 .init_early = omap_generic_init_early,
Tony Lindgren741e3a82011-05-17 03:51:26 -070072 .init_irq = omap2_init_irq,
Tony Lindgren1dbae812005-11-10 14:26:51 +000073 .init_machine = omap_generic_init,
Arnd Bergmann13340b22011-06-30 12:58:01 +000074 .timer = &omap2_timer,
Tony Lindgren1dbae812005-11-10 14:26:51 +000075MACHINE_END