Fabio Estevam | 1553a1e | 2008-11-12 15:38:39 +0100 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2008 Freescale Semiconductor, Inc. All Rights Reserved. |
| 3 | * |
| 4 | * This program is free software; you can redistribute it and/or modify |
| 5 | * it under the terms of the GNU General Public License as published by |
| 6 | * the Free Software Foundation; either version 2 of the License, or |
| 7 | * (at your option) any later version. |
| 8 | * |
| 9 | * This program is distributed in the hope that it will be useful, |
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 | * GNU General Public License for more details. |
| 13 | * |
| 14 | * You should have received a copy of the GNU General Public License |
| 15 | * along with this program; if not, write to the Free Software |
| 16 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
| 17 | */ |
| 18 | |
| 19 | #include <linux/types.h> |
| 20 | #include <linux/init.h> |
| 21 | #include <linux/clk.h> |
| 22 | #include <linux/irq.h> |
| 23 | |
| 24 | #include <mach/hardware.h> |
| 25 | #include <asm/mach-types.h> |
| 26 | #include <asm/mach/arch.h> |
| 27 | #include <asm/mach/time.h> |
| 28 | #include <asm/memory.h> |
| 29 | #include <asm/mach/map.h> |
| 30 | #include <mach/common.h> |
| 31 | #include <mach/board-mx31pdk.h> |
| 32 | #include <mach/imx-uart.h> |
| 33 | #include <mach/iomux-mx3.h> |
| 34 | #include "devices.h" |
| 35 | |
| 36 | /*! |
| 37 | * @file mx31pdk.c |
| 38 | * |
| 39 | * @brief This file contains the board-specific initialization routines. |
| 40 | * |
| 41 | * @ingroup System |
| 42 | */ |
| 43 | |
Magnus Lilja | 153fa1d | 2009-05-16 12:43:10 +0200 | [diff] [blame^] | 44 | static int mx31pdk_pins[] = { |
| 45 | /* UART1 */ |
Valentin Longchamp | 63d97667 | 2009-01-28 15:13:53 +0100 | [diff] [blame] | 46 | MX31_PIN_CTS1__CTS1, |
| 47 | MX31_PIN_RTS1__RTS1, |
| 48 | MX31_PIN_TXD1__TXD1, |
| 49 | MX31_PIN_RXD1__RXD1 |
| 50 | }; |
| 51 | |
Magnus Lilja | 153fa1d | 2009-05-16 12:43:10 +0200 | [diff] [blame^] | 52 | static struct imxuart_platform_data uart_pdata = { |
| 53 | .flags = IMXUART_HAVE_RTSCTS, |
| 54 | }; |
Fabio Estevam | 1553a1e | 2008-11-12 15:38:39 +0100 | [diff] [blame] | 55 | |
| 56 | /*! |
Fabio Estevam | 1553a1e | 2008-11-12 15:38:39 +0100 | [diff] [blame] | 57 | * Board specific initialization. |
| 58 | */ |
| 59 | static void __init mxc_board_init(void) |
| 60 | { |
Magnus Lilja | 153fa1d | 2009-05-16 12:43:10 +0200 | [diff] [blame^] | 61 | mxc_iomux_setup_multiple_pins(mx31pdk_pins, ARRAY_SIZE(mx31pdk_pins), |
| 62 | "mx31pdk"); |
| 63 | |
| 64 | mxc_register_device(&mxc_uart_device0, &uart_pdata); |
Fabio Estevam | 1553a1e | 2008-11-12 15:38:39 +0100 | [diff] [blame] | 65 | } |
| 66 | |
| 67 | static void __init mx31pdk_timer_init(void) |
| 68 | { |
Sascha Hauer | 30c730f | 2009-02-16 14:36:49 +0100 | [diff] [blame] | 69 | mx31_clocks_init(26000000); |
Fabio Estevam | 1553a1e | 2008-11-12 15:38:39 +0100 | [diff] [blame] | 70 | } |
| 71 | |
| 72 | static struct sys_timer mx31pdk_timer = { |
| 73 | .init = mx31pdk_timer_init, |
| 74 | }; |
| 75 | |
| 76 | /* |
| 77 | * The following uses standard kernel macros defined in arch.h in order to |
| 78 | * initialize __mach_desc_MX31PDK data structure. |
| 79 | */ |
| 80 | MACHINE_START(MX31_3DS, "Freescale MX31PDK (3DS)") |
| 81 | /* Maintainer: Freescale Semiconductor, Inc. */ |
| 82 | .phys_io = AIPS1_BASE_ADDR, |
| 83 | .io_pg_offst = ((AIPS1_BASE_ADDR_VIRT) >> 18) & 0xfffc, |
| 84 | .boot_params = PHYS_OFFSET + 0x100, |
Sascha Hauer | cd4a05f | 2009-04-02 22:32:10 +0200 | [diff] [blame] | 85 | .map_io = mx31_map_io, |
Fabio Estevam | 1553a1e | 2008-11-12 15:38:39 +0100 | [diff] [blame] | 86 | .init_irq = mxc_init_irq, |
| 87 | .init_machine = mxc_board_init, |
| 88 | .timer = &mx31pdk_timer, |
| 89 | MACHINE_END |