aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-mx5/board-mx51_3ds.c
diff options
context:
space:
mode:
authorJason Wang <jason77.wang@gmail.com>2010-09-02 03:52:04 -0400
committerSascha Hauer <s.hauer@pengutronix.de>2010-10-01 03:32:21 -0400
commit8005cf2eb39786a0a3592fe178603ee1caccc5eb (patch)
treef3d7eba7db568314c50985b91014e7611f032f18 /arch/arm/mach-mx5/board-mx51_3ds.c
parent988916e1a9af1994d510138e7201acf7b425fb46 (diff)
ARM: mx5/mx51_3ds: add SPI NOR flash in the board init stage
A 2M bytes SPI NOR flash(sst25vf016b) is soldered on the mx51_3ds board. So add the corresponding device for it. Signed-off-by: Jason Wang <jason77.wang@gmail.com> Acked-by: Grant Likely <grant.likely@secretlab.ca> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/mach-mx5/board-mx51_3ds.c')
-rw-r--r--arch/arm/mach-mx5/board-mx51_3ds.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/arch/arm/mach-mx5/board-mx51_3ds.c b/arch/arm/mach-mx5/board-mx51_3ds.c
index c9c41282c996..b9d3331ba308 100644
--- a/arch/arm/mach-mx5/board-mx51_3ds.c
+++ b/arch/arm/mach-mx5/board-mx51_3ds.c
@@ -13,6 +13,7 @@
13#include <linux/irq.h> 13#include <linux/irq.h>
14#include <linux/platform_device.h> 14#include <linux/platform_device.h>
15#include <linux/input/matrix_keypad.h> 15#include <linux/input/matrix_keypad.h>
16#include <linux/spi/spi.h>
16 17
17#include <asm/mach-types.h> 18#include <asm/mach-types.h>
18#include <asm/mach/arch.h> 19#include <asm/mach/arch.h>
@@ -145,6 +146,16 @@ static const struct spi_imx_master mx51_3ds_ecspi2_pdata __initconst = {
145 .num_chipselect = ARRAY_SIZE(mx51_3ds_spi2_cs), 146 .num_chipselect = ARRAY_SIZE(mx51_3ds_spi2_cs),
146}; 147};
147 148
149static struct spi_board_info mx51_3ds_spi_nor_device[] = {
150 {
151 .modalias = "m25p80",
152 .max_speed_hz = 25000000, /* max spi clock (SCK) speed in HZ */
153 .bus_num = 1,
154 .chip_select = 1,
155 .mode = SPI_MODE_0,
156 .platform_data = NULL,},
157};
158
148/* 159/*
149 * Board specific initialization. 160 * Board specific initialization.
150 */ 161 */
@@ -155,6 +166,8 @@ static void __init mxc_board_init(void)
155 mxc_init_imx_uart(); 166 mxc_init_imx_uart();
156 167
157 imx51_add_ecspi(1, &mx51_3ds_ecspi2_pdata); 168 imx51_add_ecspi(1, &mx51_3ds_ecspi2_pdata);
169 spi_register_board_info(mx51_3ds_spi_nor_device,
170 ARRAY_SIZE(mx51_3ds_spi_nor_device));
158 171
159 if (mxc_expio_init(MX51_CS5_BASE_ADDR, EXPIO_PARENT_INT)) 172 if (mxc_expio_init(MX51_CS5_BASE_ADDR, EXPIO_PARENT_INT))
160 printk(KERN_WARNING "Init of the debugboard failed, all " 173 printk(KERN_WARNING "Init of the debugboard failed, all "