summaryrefslogtreecommitdiffstats
path: root/extras/recipes-kernel/linux/linux-omap-psp-2.6.32/0045-ARM-OMAP-beagle-add-support-for-beagleFPGA-expansion.patch
diff options
context:
space:
mode:
Diffstat (limited to 'extras/recipes-kernel/linux/linux-omap-psp-2.6.32/0045-ARM-OMAP-beagle-add-support-for-beagleFPGA-expansion.patch')
-rw-r--r--extras/recipes-kernel/linux/linux-omap-psp-2.6.32/0045-ARM-OMAP-beagle-add-support-for-beagleFPGA-expansion.patch70
1 files changed, 70 insertions, 0 deletions
diff --git a/extras/recipes-kernel/linux/linux-omap-psp-2.6.32/0045-ARM-OMAP-beagle-add-support-for-beagleFPGA-expansion.patch b/extras/recipes-kernel/linux/linux-omap-psp-2.6.32/0045-ARM-OMAP-beagle-add-support-for-beagleFPGA-expansion.patch
new file mode 100644
index 00000000..2a48a301
--- /dev/null
+++ b/extras/recipes-kernel/linux/linux-omap-psp-2.6.32/0045-ARM-OMAP-beagle-add-support-for-beagleFPGA-expansion.patch
@@ -0,0 +1,70 @@
1From 1ebb6f864a831fc8efebe4a7a9f65d07fa31466a Mon Sep 17 00:00:00 2001
2From: Koen Kooi <koen@dominion.thruhere.net>
3Date: Sat, 15 May 2010 21:47:32 +0200
4Subject: [PATCH 45/45] ARM: OMAP: beagle: add support for beagleFPGA expansionboard: http://members.cox.net/ebrombaugh1/embedded/beagle/beagle_fpga.html
5
6---
7 arch/arm/mach-omap2/board-omap3beagle.c | 26 ++++++++++++++++++++++++++
8 1 files changed, 26 insertions(+), 0 deletions(-)
9
10diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
11index 078e026..b313350 100644
12--- a/arch/arm/mach-omap2/board-omap3beagle.c
13+++ b/arch/arm/mach-omap2/board-omap3beagle.c
14@@ -24,6 +24,7 @@
15 #include <linux/irq.h>
16 #include <linux/input.h>
17 #include <linux/gpio_keys.h>
18+#include <linux/spi/spi.h>
19
20 #include <linux/mtd/mtd.h>
21 #include <linux/mtd/partitions.h>
22@@ -47,6 +48,7 @@
23 #include <plat/timer-gp.h>
24 #include <plat/clock.h>
25 #include <plat/omap-pm.h>
26+#include <plat/mcspi.h>
27
28 #include "mux.h"
29 #include "mmc-twl4030.h"
30@@ -609,6 +611,24 @@ static struct platform_device keys_gpio = {
31 },
32 };
33
34+static struct spi_board_info beaglefpga_mcspi_board_info[] = {
35+ // spi 4.0
36+ {
37+ .modalias = "spidev",
38+ .max_speed_hz = 48000000, //48 Mbps
39+ .bus_num = 4,
40+ .chip_select = 0,
41+ .mode = SPI_MODE_1,
42+ },
43+};
44+
45+static void __init beaglefpga_init_spi(void)
46+{
47+ /* hook the spi ports to the spidev driver */
48+ spi_register_board_info(beaglefpga_mcspi_board_info,
49+ ARRAY_SIZE(beaglefpga_mcspi_board_info));
50+}
51+
52 static void __init omap3_beagle_init_irq(void)
53 {
54 if (cpu_is_omap3630())
55@@ -769,6 +789,12 @@ static void __init omap3_beagle_init(void)
56 gpio_export(162, 1);
57 }
58
59+ if(!strcmp(expansionboard_name, "beaglefpga"))
60+ {
61+ printk(KERN_INFO "Beagle expansionboard: Using McSPI for SPI\n");
62+ beaglefpga_init_spi();
63+ }
64+
65 usb_musb_init();
66 usb_ehci_init(&ehci_pdata);
67 omap3beagle_flash_init();
68--
691.6.6.1
70