2 * linux/arch/arm/mach-omap/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.
19 #include <linux/kernel.h>
20 #include <linux/init.h>
21 #include <linux/device.h>
23 #include <asm/hardware.h>
24 #include <asm/mach-types.h>
25 #include <asm/mach/arch.h>
26 #include <asm/mach/map.h>
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>
34 static int __initdata generic_serial_ports[OMAP_MAX_NR_PORTS] = {1, 1, 1};
36 static void __init omap_generic_init_irq(void)
41 static struct omap_board_config_kernel generic_config[] = {
44 static void __init omap_generic_init(void)
46 const struct omap_uart_config *uart_conf;
49 * Make sure the serial ports are muxed on at this point.
50 * You have to mux them off in device drivers later on
54 uart_conf = omap_get_config(OMAP_TAG_UART, struct omap_uart_config);
55 if (uart_conf != NULL) {
56 unsigned int enabled_ports, i;
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;
65 omap_board_config = generic_config;
66 omap_board_config_size = ARRAY_SIZE(generic_config);
67 omap_serial_init(generic_serial_ports);
70 static void __init omap_generic_map_io(void)
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,