blob: 3b34c20d1df41ef5920cdc4e63a9c03cabbd6475 [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 */
18
19#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
Russell Kinga09e64f2008-08-05 16:14:15 +010028#include <mach/gpio.h>
29#include <mach/mux.h>
30#include <mach/usb.h>
31#include <mach/board.h>
32#include <mach/common.h>
Tony Lindgren1dbae812005-11-10 14:26:51 +000033
34static void __init omap_generic_init_irq(void)
35{
Tony Lindgren18f49ea2006-02-08 22:06:47 +000036 omap2_init_common_hw();
Tony Lindgren1dbae812005-11-10 14:26:51 +000037 omap_init_irq();
38}
39
40static struct omap_uart_config generic_uart_config __initdata = {
41 .enabled_uarts = ((1 << 0) | (1 << 1) | (1 << 2)),
42};
43
Tony Lindgren1dbae812005-11-10 14:26:51 +000044static struct omap_board_config_kernel generic_config[] = {
45 { OMAP_TAG_UART, &generic_uart_config },
Tony Lindgren1dbae812005-11-10 14:26:51 +000046};
47
48static void __init omap_generic_init(void)
49{
50 omap_board_config = generic_config;
51 omap_board_config_size = ARRAY_SIZE(generic_config);
52 omap_serial_init();
53}
54
55static void __init omap_generic_map_io(void)
56{
Paul Walmsleyc8d2eb82008-05-07 16:55:13 -070057 omap2_set_globals_242x(); /* should be 242x, 243x, or 343x */
Tony Lindgren18f49ea2006-02-08 22:06:47 +000058 omap2_map_common_io();
Tony Lindgren1dbae812005-11-10 14:26:51 +000059}
60
61MACHINE_START(OMAP_GENERIC, "Generic OMAP24xx")
62 /* Maintainer: Paul Mundt <paul.mundt@nokia.com> */
Tony Lindgren1dbae812005-11-10 14:26:51 +000063 .phys_io = 0x48000000,
64 .io_pg_offst = ((0xd8000000) >> 18) & 0xfffc,
65 .boot_params = 0x80000100,
66 .map_io = omap_generic_map_io,
67 .init_irq = omap_generic_init_irq,
68 .init_machine = omap_generic_init,
69 .timer = &omap_timer,
70MACHINE_END