summaryrefslogtreecommitdiffstats
path: root/meta/recipes-kernel/linux/linux-mx31-2.6.19.2/mx31lite-spi.patch
blob: 7b0b8bbc52c21610d3efcd4ad9bc043542f6def8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
---
 arch/arm/mach-mx3/mx31lite.c |   13 +++++++++++++
 1 file changed, 13 insertions(+)

Index: linux-2.6.19.2/arch/arm/mach-mx3/mx31lite.c
===================================================================
--- linux-2.6.19.2.orig/arch/arm/mach-mx3/mx31lite.c	2007-10-03 20:12:16.000000000 +0200
+++ linux-2.6.19.2/arch/arm/mach-mx3/mx31lite.c	2007-10-03 20:14:14.000000000 +0200
@@ -29,6 +29,7 @@
 #include <linux/mtd/mtd.h>
 #include <linux/mtd/map.h>
 #include <linux/mtd/partitions.h>
+#include <linux/spi/spi.h>
 
 #include <asm/mach/flash.h>
 #endif
@@ -304,6 +305,16 @@
 }
 #endif
 
+static struct spi_board_info mxc_spi_board_info[] __initdata = {
+   {
+	   .modalias = "pmic_spi",
+	   .irq = IOMUX_TO_IRQ(MX31_PIN_GPIO1_3),
+	   .max_speed_hz = 4000000,
+	   .bus_num = 2,
+	   .chip_select = 0,
+   },
+};
+
 
 /*!
  * Board specific fixup function. It is called by \b setup_arch() in
@@ -426,6 +437,8 @@
 	mxc_init_nand_mtd();
 	mxc_init_eth();
 	mxc_init_fb();
+	spi_register_board_info(mxc_spi_board_info,
+				ARRAY_SIZE(mxc_spi_board_info));
 }
 
 /*