aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-mx3/mach-mx31_3ds.c
diff options
context:
space:
mode:
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>2010-06-30 06:16:24 -0400
committerUwe Kleine-König <u.kleine-koenig@pengutronix.de>2010-07-26 08:27:25 -0400
commit2dcf78c0eeae3bd07082821557014f25f02ca2e9 (patch)
tree8ca5c4c7f35c9a9ab07fcd9732124c905e609aa1 /arch/arm/mach-mx3/mach-mx31_3ds.c
parent6b6322676add0fa2713d0ec89a28390fd4d907f5 (diff)
parent5109a4597f7e758b8d20694392d0361a0b4c43b1 (diff)
Merge branch 'imx/for-2.6.36' of git://git.pengutronix.de/git/ukl/linux-2.6 into HEAD
There are some more conflicts than detected by git, namely support for the newly added cpuimx machines needed to be converted to dynamic device registration. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Conflicts: arch/arm/mach-imx/Makefile arch/arm/mach-imx/devices.c arch/arm/mach-imx/devices.h arch/arm/mach-imx/eukrea_mbimx27-baseboard.c arch/arm/mach-mx2/Kconfig arch/arm/mach-mx25/Makefile arch/arm/mach-mx25/devices.c arch/arm/plat-mxc/include/mach/mx25.h arch/arm/plat-mxc/include/mach/mxc_nand.h
Diffstat (limited to 'arch/arm/mach-mx3/mach-mx31_3ds.c')
-rw-r--r--arch/arm/mach-mx3/mach-mx31_3ds.c64
1 files changed, 44 insertions, 20 deletions
diff --git a/arch/arm/mach-mx3/mach-mx31_3ds.c b/arch/arm/mach-mx3/mach-mx31_3ds.c
index 7e8d09ab9e6c..d4d9e7a1f735 100644
--- a/arch/arm/mach-mx3/mach-mx31_3ds.c
+++ b/arch/arm/mach-mx3/mach-mx31_3ds.c
@@ -10,10 +10,6 @@
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details. 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 */ 13 */
18 14
19#include <linux/delay.h> 15#include <linux/delay.h>
@@ -37,19 +33,46 @@
37#include <asm/memory.h> 33#include <asm/memory.h>
38#include <asm/mach/map.h> 34#include <asm/mach/map.h>
39#include <mach/common.h> 35#include <mach/common.h>
40#include <mach/board-mx31_3ds.h>
41#include <mach/imx-uart.h>
42#include <mach/iomux-mx3.h> 36#include <mach/iomux-mx3.h>
43#include <mach/mxc_nand.h> 37
44#include <mach/spi.h> 38#include "devices-imx31.h"
45#include "devices.h" 39#include "devices.h"
46 40
47/*! 41/* Definitions for components on the Debug board */
48 * @file mx31_3ds.c 42
49 * 43/* Base address of CPLD controller on the Debug board */
50 * @brief This file contains the board-specific initialization routines. 44#define DEBUG_BASE_ADDRESS CS5_IO_ADDRESS(MX3x_CS5_BASE_ADDR)
51 * 45
52 * @ingroup System 46/* LAN9217 ethernet base address */
47#define LAN9217_BASE_ADDR MX3x_CS5_BASE_ADDR
48
49/* CPLD config and interrupt base address */
50#define CPLD_ADDR (DEBUG_BASE_ADDRESS + 0x20000)
51
52/* status, interrupt */
53#define CPLD_INT_STATUS_REG (CPLD_ADDR + 0x10)
54#define CPLD_INT_MASK_REG (CPLD_ADDR + 0x38)
55#define CPLD_INT_RESET_REG (CPLD_ADDR + 0x20)
56/* magic word for debug CPLD */
57#define CPLD_MAGIC_NUMBER1_REG (CPLD_ADDR + 0x40)
58#define CPLD_MAGIC_NUMBER2_REG (CPLD_ADDR + 0x48)
59/* CPLD code version */
60#define CPLD_CODE_VER_REG (CPLD_ADDR + 0x50)
61/* magic word for debug CPLD */
62#define CPLD_MAGIC_NUMBER3_REG (CPLD_ADDR + 0x58)
63
64/* CPLD IRQ line for external uart, external ethernet etc */
65#define EXPIO_PARENT_INT IOMUX_TO_IRQ(MX31_PIN_GPIO1_1)
66
67#define MXC_EXP_IO_BASE (MXC_BOARD_IRQ_START)
68#define MXC_IRQ_TO_EXPIO(irq) ((irq) - MXC_EXP_IO_BASE)
69
70#define EXPIO_INT_ENET (MXC_EXP_IO_BASE + 0)
71
72#define MXC_MAX_EXP_IO_LINES 16
73
74/*
75 * This file contains the board-specific initialization routines.
53 */ 76 */
54 77
55static int mx31_3ds_pins[] = { 78static int mx31_3ds_pins[] = {
@@ -145,7 +168,7 @@ static int spi1_internal_chipselect[] = {
145 MXC_SPI_CS(2), 168 MXC_SPI_CS(2),
146}; 169};
147 170
148static struct spi_imx_master spi1_pdata = { 171static const struct spi_imx_master spi1_pdata __initconst = {
149 .chipselect = spi1_internal_chipselect, 172 .chipselect = spi1_internal_chipselect,
150 .num_chipselect = ARRAY_SIZE(spi1_internal_chipselect), 173 .num_chipselect = ARRAY_SIZE(spi1_internal_chipselect),
151}; 174};
@@ -165,7 +188,8 @@ static struct spi_board_info mx31_3ds_spi_devs[] __initdata = {
165/* 188/*
166 * NAND Flash 189 * NAND Flash
167 */ 190 */
168static struct mxc_nand_platform_data imx31_3ds_nand_flash_pdata = { 191static const struct mxc_nand_platform_data
192mx31_3ds_nand_board_info __initconst = {
169 .width = 1, 193 .width = 1,
170 .hw_ecc = 1, 194 .hw_ecc = 1,
171#ifdef MACH_MX31_3DS_MXC_NAND_USE_BBT 195#ifdef MACH_MX31_3DS_MXC_NAND_USE_BBT
@@ -225,7 +249,7 @@ static struct fsl_usb2_platform_data usbotg_pdata = {
225 .phy_mode = FSL_USB2_PHY_ULPI, 249 .phy_mode = FSL_USB2_PHY_ULPI,
226}; 250};
227 251
228static struct imxuart_platform_data uart_pdata = { 252static const struct imxuart_platform_data uart_pdata __initconst = {
229 .flags = IMXUART_HAVE_RTSCTS, 253 .flags = IMXUART_HAVE_RTSCTS,
230}; 254};
231 255
@@ -407,10 +431,10 @@ static void __init mxc_board_init(void)
407 mxc_iomux_setup_multiple_pins(mx31_3ds_pins, ARRAY_SIZE(mx31_3ds_pins), 431 mxc_iomux_setup_multiple_pins(mx31_3ds_pins, ARRAY_SIZE(mx31_3ds_pins),
408 "mx31_3ds"); 432 "mx31_3ds");
409 433
410 mxc_register_device(&mxc_uart_device0, &uart_pdata); 434 imx31_add_imx_uart0(&uart_pdata);
411 mxc_register_device(&mxc_nand_device, &imx31_3ds_nand_flash_pdata); 435 imx31_add_mxc_nand(&mx31_3ds_nand_board_info);
412 436
413 mxc_register_device(&mxc_spi_device1, &spi1_pdata); 437 imx31_add_spi_imx0(&spi1_pdata);
414 spi_register_board_info(mx31_3ds_spi_devs, 438 spi_register_board_info(mx31_3ds_spi_devs,
415 ARRAY_SIZE(mx31_3ds_spi_devs)); 439 ARRAY_SIZE(mx31_3ds_spi_devs));
416 440