aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-mx3/mach-mx31_3ds.c
diff options
context:
space:
mode:
authorAlberto Panizzo <maramaopercheseimorto@gmail.com>2010-03-23 14:50:28 -0400
committerSascha Hauer <s.hauer@pengutronix.de>2010-03-25 03:43:03 -0400
commita1ac442443342f778d5230b16efadc4c32d96298 (patch)
tree43bd8c21d0911156df1ce877822e957e82e01ed5 /arch/arm/mach-mx3/mach-mx31_3ds.c
parenta1b67b957ea3b9138ed8239796cb48d8b1bf66b0 (diff)
MXC: mach-mx31_3ds: Add SPI1 device support.
Signed-off-by: Alberto Panizzo <maramaopercheseimorto@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/mach-mx3/mach-mx31_3ds.c')
-rw-r--r--arch/arm/mach-mx3/mach-mx31_3ds.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/arch/arm/mach-mx3/mach-mx31_3ds.c b/arch/arm/mach-mx3/mach-mx31_3ds.c
index bf1f54a31c4f..80179cf9e2f5 100644
--- a/arch/arm/mach-mx3/mach-mx31_3ds.c
+++ b/arch/arm/mach-mx3/mach-mx31_3ds.c
@@ -35,6 +35,7 @@
35#include <mach/imx-uart.h> 35#include <mach/imx-uart.h>
36#include <mach/iomux-mx3.h> 36#include <mach/iomux-mx3.h>
37#include <mach/mxc_nand.h> 37#include <mach/mxc_nand.h>
38#include <mach/spi.h>
38#include "devices.h" 39#include "devices.h"
39 40
40/*! 41/*!
@@ -52,6 +53,24 @@ static int mx31_3ds_pins[] = {
52 MX31_PIN_TXD1__TXD1, 53 MX31_PIN_TXD1__TXD1,
53 MX31_PIN_RXD1__RXD1, 54 MX31_PIN_RXD1__RXD1,
54 IOMUX_MODE(MX31_PIN_GPIO1_1, IOMUX_CONFIG_GPIO), 55 IOMUX_MODE(MX31_PIN_GPIO1_1, IOMUX_CONFIG_GPIO),
56 /* SPI 1 */
57 MX31_PIN_CSPI2_SCLK__SCLK,
58 MX31_PIN_CSPI2_MOSI__MOSI,
59 MX31_PIN_CSPI2_MISO__MISO,
60 MX31_PIN_CSPI2_SPI_RDY__SPI_RDY,
61 MX31_PIN_CSPI2_SS0__SS0,
62 MX31_PIN_CSPI2_SS2__SS2, /*CS for MC13783 */
63};
64
65/* SPI */
66static int spi1_internal_chipselect[] = {
67 MXC_SPI_CS(0),
68 MXC_SPI_CS(2),
69};
70
71static struct spi_imx_master spi1_pdata = {
72 .chipselect = spi1_internal_chipselect,
73 .num_chipselect = ARRAY_SIZE(spi1_internal_chipselect),
55}; 74};
56 75
57/* 76/*
@@ -249,6 +268,7 @@ static void __init mxc_board_init(void)
249 268
250 mxc_register_device(&mxc_uart_device0, &uart_pdata); 269 mxc_register_device(&mxc_uart_device0, &uart_pdata);
251 mxc_register_device(&mxc_nand_device, &imx31_3ds_nand_flash_pdata); 270 mxc_register_device(&mxc_nand_device, &imx31_3ds_nand_flash_pdata);
271 mxc_register_device(&mxc_spi_device1, &spi1_pdata);
252 272
253 if (!mx31_3ds_init_expio()) 273 if (!mx31_3ds_init_expio())
254 platform_device_register(&smsc911x_device); 274 platform_device_register(&smsc911x_device);