Fabio Estevam | 9c2c358 | 2011-01-24 16:55:02 -0200 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2011 Freescale Semiconductor, Inc. All Rights Reserved. |
| 3 | * |
| 4 | * Author: Fabio Estevam <fabio.estevam@freescale.com> |
| 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 | |
| 17 | #include <asm/mach-types.h> |
| 18 | #include <asm/mach/arch.h> |
| 19 | #include <asm/mach/time.h> |
Fabio Estevam | 9c2c358 | 2011-01-24 16:55:02 -0200 | [diff] [blame] | 20 | |
Shawn Guo | 50f2de6 | 2012-09-14 14:14:45 +0800 | [diff] [blame] | 21 | #include "hardware.h" |
Shawn Guo | e337247 | 2012-09-13 21:01:00 +0800 | [diff] [blame] | 22 | #include "common.h" |
Fabio Estevam | 9c2c358 | 2011-01-24 16:55:02 -0200 | [diff] [blame] | 23 | #include "devices-imx27.h" |
Shawn Guo | 267dd34 | 2012-09-13 13:26:00 +0800 | [diff] [blame] | 24 | #include "iomux-mx27.h" |
Fabio Estevam | 9c2c358 | 2011-01-24 16:55:02 -0200 | [diff] [blame] | 25 | |
| 26 | static const int mx27ipcam_pins[] __initconst = { |
| 27 | /* UART1 */ |
| 28 | PE12_PF_UART1_TXD, |
| 29 | PE13_PF_UART1_RXD, |
| 30 | /* FEC */ |
| 31 | PD0_AIN_FEC_TXD0, |
| 32 | PD1_AIN_FEC_TXD1, |
| 33 | PD2_AIN_FEC_TXD2, |
| 34 | PD3_AIN_FEC_TXD3, |
| 35 | PD4_AOUT_FEC_RX_ER, |
| 36 | PD5_AOUT_FEC_RXD1, |
| 37 | PD6_AOUT_FEC_RXD2, |
| 38 | PD7_AOUT_FEC_RXD3, |
| 39 | PD8_AF_FEC_MDIO, |
| 40 | PD9_AIN_FEC_MDC, |
| 41 | PD10_AOUT_FEC_CRS, |
| 42 | PD11_AOUT_FEC_TX_CLK, |
| 43 | PD12_AOUT_FEC_RXD0, |
| 44 | PD13_AOUT_FEC_RX_DV, |
| 45 | PD14_AOUT_FEC_RX_CLK, |
| 46 | PD15_AOUT_FEC_COL, |
| 47 | PD16_AIN_FEC_TX_ER, |
| 48 | PF23_AIN_FEC_TX_EN, |
| 49 | }; |
| 50 | |
| 51 | static void __init mx27ipcam_init(void) |
| 52 | { |
Shawn Guo | b78d8e5 | 2011-06-06 00:07:55 +0800 | [diff] [blame] | 53 | imx27_soc_init(); |
| 54 | |
Fabio Estevam | 9c2c358 | 2011-01-24 16:55:02 -0200 | [diff] [blame] | 55 | mxc_gpio_setup_multiple_pins(mx27ipcam_pins, ARRAY_SIZE(mx27ipcam_pins), |
| 56 | "mx27ipcam"); |
| 57 | |
| 58 | imx27_add_imx_uart0(NULL); |
| 59 | imx27_add_fec(NULL); |
Benoît Thébaudeau | bec31a8 | 2012-07-04 16:35:54 +0200 | [diff] [blame] | 60 | imx27_add_imx2_wdt(); |
Fabio Estevam | 9c2c358 | 2011-01-24 16:55:02 -0200 | [diff] [blame] | 61 | } |
| 62 | |
| 63 | static void __init mx27ipcam_timer_init(void) |
| 64 | { |
| 65 | mx27_clocks_init(25000000); |
| 66 | } |
| 67 | |
Fabio Estevam | 9c2c358 | 2011-01-24 16:55:02 -0200 | [diff] [blame] | 68 | MACHINE_START(IMX27IPCAM, "Freescale IMX27IPCAM") |
| 69 | /* maintainer: Freescale Semiconductor, Inc. */ |
Nicolas Pitre | dc8f190 | 2011-07-05 22:38:12 -0400 | [diff] [blame] | 70 | .atag_offset = 0x100, |
Uwe Kleine-König | 3dac219 | 2011-02-07 16:35:19 +0100 | [diff] [blame] | 71 | .map_io = mx27_map_io, |
| 72 | .init_early = imx27_init_early, |
| 73 | .init_irq = mx27_init_irq, |
Sascha Hauer | ffa2ea3 | 2011-09-20 14:31:24 +0200 | [diff] [blame] | 74 | .handle_irq = imx27_handle_irq, |
Stephen Warren | 6bb27d7 | 2012-11-08 12:40:59 -0700 | [diff] [blame] | 75 | .init_time = mx27ipcam_timer_init, |
Uwe Kleine-König | 3dac219 | 2011-02-07 16:35:19 +0100 | [diff] [blame] | 76 | .init_machine = mx27ipcam_init, |
Russell King | 65ea788 | 2011-11-06 17:12:08 +0000 | [diff] [blame] | 77 | .restart = mxc_restart, |
Fabio Estevam | 9c2c358 | 2011-01-24 16:55:02 -0200 | [diff] [blame] | 78 | MACHINE_END |