Tony Lindgren | 1dbae81 | 2005-11-10 14:26:51 +0000 | [diff] [blame] | 1 | /* |
Uwe Zeisberger | f30c226 | 2006-10-03 23:01:26 +0200 | [diff] [blame] | 2 | * linux/arch/arm/mach-omap2/board-generic.c |
Tony Lindgren | 1dbae81 | 2005-11-10 14:26:51 +0000 | [diff] [blame] | 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 | |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 23 | #include <mach/hardware.h> |
Tony Lindgren | 1dbae81 | 2005-11-10 14:26:51 +0000 | [diff] [blame] | 24 | #include <asm/mach-types.h> |
| 25 | #include <asm/mach/arch.h> |
| 26 | #include <asm/mach/map.h> |
| 27 | |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 28 | #include <mach/gpio.h> |
Tony Lindgren | ce491cf | 2009-10-20 09:40:47 -0700 | [diff] [blame] | 29 | #include <plat/mux.h> |
| 30 | #include <plat/usb.h> |
| 31 | #include <plat/board.h> |
| 32 | #include <plat/common.h> |
Tony Lindgren | 1dbae81 | 2005-11-10 14:26:51 +0000 | [diff] [blame] | 33 | |
Paul Walmsley | b3c6df3 | 2009-09-03 20:14:02 +0300 | [diff] [blame] | 34 | static struct omap_board_config_kernel generic_config[] = { |
| 35 | }; |
| 36 | |
Tony Lindgren | 1dbae81 | 2005-11-10 14:26:51 +0000 | [diff] [blame] | 37 | static void __init omap_generic_init_irq(void) |
| 38 | { |
Paul Walmsley | b3c6df3 | 2009-09-03 20:14:02 +0300 | [diff] [blame] | 39 | omap_board_config = generic_config; |
| 40 | omap_board_config_size = ARRAY_SIZE(generic_config); |
Jean Pihet | 58cda88 | 2009-07-24 19:43:25 -0600 | [diff] [blame] | 41 | omap2_init_common_hw(NULL, NULL); |
Tony Lindgren | 1dbae81 | 2005-11-10 14:26:51 +0000 | [diff] [blame] | 42 | omap_init_irq(); |
| 43 | } |
| 44 | |
Tony Lindgren | 1dbae81 | 2005-11-10 14:26:51 +0000 | [diff] [blame] | 45 | static void __init omap_generic_init(void) |
| 46 | { |
Tony Lindgren | 1dbae81 | 2005-11-10 14:26:51 +0000 | [diff] [blame] | 47 | omap_serial_init(); |
| 48 | } |
| 49 | |
| 50 | static void __init omap_generic_map_io(void) |
| 51 | { |
Paul Walmsley | c8d2eb8 | 2008-05-07 16:55:13 -0700 | [diff] [blame] | 52 | omap2_set_globals_242x(); /* should be 242x, 243x, or 343x */ |
Tony Lindgren | 6fbd55d | 2010-02-12 12:26:47 -0800 | [diff] [blame] | 53 | omap242x_map_common_io(); |
Tony Lindgren | 1dbae81 | 2005-11-10 14:26:51 +0000 | [diff] [blame] | 54 | } |
| 55 | |
| 56 | MACHINE_START(OMAP_GENERIC, "Generic OMAP24xx") |
| 57 | /* Maintainer: Paul Mundt <paul.mundt@nokia.com> */ |
Tony Lindgren | 1dbae81 | 2005-11-10 14:26:51 +0000 | [diff] [blame] | 58 | .phys_io = 0x48000000, |
Santosh Shilimkar | b4224b2 | 2009-10-19 17:25:55 -0700 | [diff] [blame] | 59 | .io_pg_offst = ((0xfa000000) >> 18) & 0xfffc, |
Tony Lindgren | 1dbae81 | 2005-11-10 14:26:51 +0000 | [diff] [blame] | 60 | .boot_params = 0x80000100, |
| 61 | .map_io = omap_generic_map_io, |
Russell King | 71ee7da | 2010-05-23 10:18:16 +0100 | [diff] [blame^] | 62 | .reserve = omap_reserve, |
Tony Lindgren | 1dbae81 | 2005-11-10 14:26:51 +0000 | [diff] [blame] | 63 | .init_irq = omap_generic_init_irq, |
| 64 | .init_machine = omap_generic_init, |
| 65 | .timer = &omap_timer, |
| 66 | MACHINE_END |