Daniel Mack | 9a4cd7a | 2008-07-05 10:02:53 +0200 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2000 Deep Blue Solutions Ltd |
| 3 | * Copyright (C) 2002 Shane Nay (shane@minirl.com) |
| 4 | * Copyright 2005-2007 Freescale Semiconductor, Inc. All Rights Reserved. |
| 5 | * |
| 6 | * This program is free software; you can redistribute it and/or modify |
| 7 | * it under the terms of the GNU General Public License as published by |
| 8 | * the Free Software Foundation; either version 2 of the License, or |
| 9 | * (at your option) any later version. |
| 10 | * |
| 11 | * This program is distributed in the hope that it will be useful, |
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 14 | * GNU General Public License for more details. |
| 15 | * |
| 16 | * You should have received a copy of the GNU General Public License |
| 17 | * along with this program; if not, write to the Free Software |
| 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
| 19 | */ |
| 20 | |
| 21 | #include <linux/types.h> |
| 22 | #include <linux/init.h> |
| 23 | #include <linux/kernel.h> |
| 24 | #include <linux/memory.h> |
| 25 | |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 26 | #include <mach/hardware.h> |
Daniel Mack | 9a4cd7a | 2008-07-05 10:02:53 +0200 | [diff] [blame] | 27 | #include <asm/mach-types.h> |
| 28 | #include <asm/mach/arch.h> |
Juergen Beisert | 9e8a30d | 2008-07-05 10:02:53 +0200 | [diff] [blame] | 29 | #include <asm/mach/time.h> |
Daniel Mack | 9a4cd7a | 2008-07-05 10:02:53 +0200 | [diff] [blame] | 30 | #include <asm/mach/map.h> |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 31 | #include <mach/common.h> |
Daniel Mack | 9a4cd7a | 2008-07-05 10:02:53 +0200 | [diff] [blame] | 32 | #include <asm/page.h> |
| 33 | #include <asm/setup.h> |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 34 | #include <mach/board-mx31lite.h> |
Daniel Mack | 9a4cd7a | 2008-07-05 10:02:53 +0200 | [diff] [blame] | 35 | |
| 36 | /* |
| 37 | * This file contains the board-specific initialization routines. |
| 38 | */ |
| 39 | |
| 40 | /* |
| 41 | * This structure defines the MX31 memory map. |
| 42 | */ |
| 43 | static struct map_desc mx31lite_io_desc[] __initdata = { |
| 44 | { |
Daniel Mack | 9a4cd7a | 2008-07-05 10:02:53 +0200 | [diff] [blame] | 45 | .virtual = SPBA0_BASE_ADDR_VIRT, |
| 46 | .pfn = __phys_to_pfn(SPBA0_BASE_ADDR), |
| 47 | .length = SPBA0_SIZE, |
Russell King | 9b727ab | 2008-09-07 12:45:01 +0100 | [diff] [blame] | 48 | .type = MT_DEVICE_NONSHARED |
Daniel Mack | 9a4cd7a | 2008-07-05 10:02:53 +0200 | [diff] [blame] | 49 | }, { |
Daniel Mack | 9a4cd7a | 2008-07-05 10:02:53 +0200 | [diff] [blame] | 50 | .virtual = CS4_BASE_ADDR_VIRT, |
| 51 | .pfn = __phys_to_pfn(CS4_BASE_ADDR), |
| 52 | .length = CS4_SIZE, |
| 53 | .type = MT_DEVICE |
| 54 | } |
| 55 | }; |
| 56 | |
| 57 | /* |
| 58 | * Set up static virtual mappings. |
| 59 | */ |
| 60 | void __init mx31lite_map_io(void) |
| 61 | { |
| 62 | mxc_map_io(); |
| 63 | iotable_init(mx31lite_io_desc, ARRAY_SIZE(mx31lite_io_desc)); |
| 64 | } |
| 65 | |
| 66 | /* |
| 67 | * Board specific initialization. |
| 68 | */ |
| 69 | static void __init mxc_board_init(void) |
| 70 | { |
| 71 | } |
| 72 | |
Juergen Beisert | 9e8a30d | 2008-07-05 10:02:53 +0200 | [diff] [blame] | 73 | static void __init mx31lite_timer_init(void) |
| 74 | { |
Sascha Hauer | 30c730f | 2009-02-16 14:36:49 +0100 | [diff] [blame] | 75 | mx31_clocks_init(26000000); |
Juergen Beisert | 9e8a30d | 2008-07-05 10:02:53 +0200 | [diff] [blame] | 76 | } |
| 77 | |
| 78 | struct sys_timer mx31lite_timer = { |
| 79 | .init = mx31lite_timer_init, |
| 80 | }; |
| 81 | |
Daniel Mack | 9a4cd7a | 2008-07-05 10:02:53 +0200 | [diff] [blame] | 82 | /* |
| 83 | * The following uses standard kernel macros defined in arch.h in order to |
| 84 | * initialize __mach_desc_MX31LITE data structure. |
| 85 | */ |
| 86 | |
| 87 | MACHINE_START(MX31LITE, "LogicPD MX31 LITEKIT") |
| 88 | /* Maintainer: Freescale Semiconductor, Inc. */ |
| 89 | .phys_io = AIPS1_BASE_ADDR, |
| 90 | .io_pg_offst = ((AIPS1_BASE_ADDR_VIRT) >> 18) & 0xfffc, |
| 91 | .boot_params = PHYS_OFFSET + 0x100, |
| 92 | .map_io = mx31lite_map_io, |
| 93 | .init_irq = mxc_init_irq, |
| 94 | .init_machine = mxc_board_init, |
Juergen Beisert | 9e8a30d | 2008-07-05 10:02:53 +0200 | [diff] [blame] | 95 | .timer = &mx31lite_timer, |
Daniel Mack | 9a4cd7a | 2008-07-05 10:02:53 +0200 | [diff] [blame] | 96 | MACHINE_END |