aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/arm/mach-omap1/clock_data.c4
-rw-r--r--arch/arm/mach-omap1/devices.c35
-rw-r--r--arch/arm/mach-omap1/mux.c8
-rw-r--r--arch/arm/plat-omap/include/plat/mux.h8
-rw-r--r--arch/arm/plat-omap/include/plat/omap7xx.h3
5 files changed, 58 insertions, 0 deletions
diff --git a/arch/arm/mach-omap1/clock_data.c b/arch/arm/mach-omap1/clock_data.c
index ab995a9c606c..6887bf308aac 100644
--- a/arch/arm/mach-omap1/clock_data.c
+++ b/arch/arm/mach-omap1/clock_data.c
@@ -658,6 +658,10 @@ static struct omap_clk omap_clks[] = {
658 CLK("i2c_omap.1", "fck", &i2c_fck, CK_16XX | CK_1510 | CK_310 | CK_7XX), 658 CLK("i2c_omap.1", "fck", &i2c_fck, CK_16XX | CK_1510 | CK_310 | CK_7XX),
659 CLK("i2c_omap.1", "ick", &i2c_ick, CK_16XX), 659 CLK("i2c_omap.1", "ick", &i2c_ick, CK_16XX),
660 CLK("i2c_omap.1", "ick", &dummy_ck, CK_1510 | CK_310 | CK_7XX), 660 CLK("i2c_omap.1", "ick", &dummy_ck, CK_1510 | CK_310 | CK_7XX),
661 CLK("omap1_spi100k.1", "fck", &dummy_ck, CK_7XX),
662 CLK("omap1_spi100k.1", "ick", &dummy_ck, CK_7XX),
663 CLK("omap1_spi100k.2", "fck", &dummy_ck, CK_7XX),
664 CLK("omap1_spi100k.2", "ick", &dummy_ck, CK_7XX),
661 CLK("omap_uwire", "fck", &armxor_ck.clk, CK_16XX | CK_1510 | CK_310), 665 CLK("omap_uwire", "fck", &armxor_ck.clk, CK_16XX | CK_1510 | CK_310),
662 CLK("omap-mcbsp.1", "ick", &dspper_ck, CK_16XX), 666 CLK("omap-mcbsp.1", "ick", &dspper_ck, CK_16XX),
663 CLK("omap-mcbsp.1", "ick", &dummy_ck, CK_1510 | CK_310), 667 CLK("omap-mcbsp.1", "ick", &dummy_ck, CK_1510 | CK_310),
diff --git a/arch/arm/mach-omap1/devices.c b/arch/arm/mach-omap1/devices.c
index 23ded2d49600..a2d07aa75c9e 100644
--- a/arch/arm/mach-omap1/devices.c
+++ b/arch/arm/mach-omap1/devices.c
@@ -14,6 +14,7 @@
14#include <linux/init.h> 14#include <linux/init.h>
15#include <linux/platform_device.h> 15#include <linux/platform_device.h>
16#include <linux/io.h> 16#include <linux/io.h>
17#include <linux/spi/spi.h>
17 18
18#include <mach/hardware.h> 19#include <mach/hardware.h>
19#include <asm/mach/map.h> 20#include <asm/mach/map.h>
@@ -23,6 +24,7 @@
23#include <plat/mux.h> 24#include <plat/mux.h>
24#include <mach/gpio.h> 25#include <mach/gpio.h>
25#include <plat/mmc.h> 26#include <plat/mmc.h>
27#include <plat/omap7xx.h>
26 28
27/*-------------------------------------------------------------------------*/ 29/*-------------------------------------------------------------------------*/
28 30
@@ -196,6 +198,38 @@ void __init omap1_init_mmc(struct omap_mmc_platform_data **mmc_data,
196 198
197/*-------------------------------------------------------------------------*/ 199/*-------------------------------------------------------------------------*/
198 200
201/* OMAP7xx SPI support */
202#if defined(CONFIG_SPI_OMAP_100K) || defined(CONFIG_SPI_OMAP_100K_MODULE)
203
204struct platform_device omap_spi1 = {
205 .name = "omap1_spi100k",
206 .id = 1,
207};
208
209struct platform_device omap_spi2 = {
210 .name = "omap1_spi100k",
211 .id = 2,
212};
213
214static void omap_init_spi100k(void)
215{
216 omap_spi1.dev.platform_data = ioremap(OMAP7XX_SPI1_BASE, 0x7ff);
217 if (omap_spi1.dev.platform_data)
218 platform_device_register(&omap_spi1);
219
220 omap_spi2.dev.platform_data = ioremap(OMAP7XX_SPI2_BASE, 0x7ff);
221 if (omap_spi2.dev.platform_data)
222 platform_device_register(&omap_spi2);
223}
224
225#else
226static inline void omap_init_spi100k(void)
227{
228}
229#endif
230
231/*-------------------------------------------------------------------------*/
232
199#if defined(CONFIG_OMAP_STI) 233#if defined(CONFIG_OMAP_STI)
200 234
201#define OMAP1_STI_BASE 0xfffea000 235#define OMAP1_STI_BASE 0xfffea000
@@ -263,6 +297,7 @@ static int __init omap1_init_devices(void)
263 297
264 omap_init_mbox(); 298 omap_init_mbox();
265 omap_init_rtc(); 299 omap_init_rtc();
300 omap_init_spi100k();
266 omap_init_sti(); 301 omap_init_sti();
267 302
268 return 0; 303 return 0;
diff --git a/arch/arm/mach-omap1/mux.c b/arch/arm/mach-omap1/mux.c
index 07212cc621ae..84341377232d 100644
--- a/arch/arm/mach-omap1/mux.c
+++ b/arch/arm/mach-omap1/mux.c
@@ -62,6 +62,14 @@ MUX_CFG_7XX("MMC_7XX_DAT0", 2, 17, 0, 16, 1, 0)
62/* I2C interface */ 62/* I2C interface */
63MUX_CFG_7XX("I2C_7XX_SCL", 5, 1, 0, 0, 1, 0) 63MUX_CFG_7XX("I2C_7XX_SCL", 5, 1, 0, 0, 1, 0)
64MUX_CFG_7XX("I2C_7XX_SDA", 5, 5, 0, 0, 1, 0) 64MUX_CFG_7XX("I2C_7XX_SDA", 5, 5, 0, 0, 1, 0)
65
66/* SPI pins */
67MUX_CFG_7XX("SPI_7XX_1", 6, 5, 4, 4, 1, 0)
68MUX_CFG_7XX("SPI_7XX_2", 6, 9, 4, 8, 1, 0)
69MUX_CFG_7XX("SPI_7XX_3", 6, 13, 4, 12, 1, 0)
70MUX_CFG_7XX("SPI_7XX_4", 6, 17, 4, 16, 1, 0)
71MUX_CFG_7XX("SPI_7XX_5", 8, 25, 0, 24, 0, 0)
72MUX_CFG_7XX("SPI_7XX_6", 9, 5, 0, 4, 0, 0)
65}; 73};
66#define OMAP7XX_PINS_SZ ARRAY_SIZE(omap7xx_pins) 74#define OMAP7XX_PINS_SZ ARRAY_SIZE(omap7xx_pins)
67#else 75#else
diff --git a/arch/arm/plat-omap/include/plat/mux.h b/arch/arm/plat-omap/include/plat/mux.h
index 8f069cc80350..692c90e89ac3 100644
--- a/arch/arm/plat-omap/include/plat/mux.h
+++ b/arch/arm/plat-omap/include/plat/mux.h
@@ -183,6 +183,14 @@ enum omap7xx_index {
183 /* I2C */ 183 /* I2C */
184 I2C_7XX_SCL, 184 I2C_7XX_SCL,
185 I2C_7XX_SDA, 185 I2C_7XX_SDA,
186
187 /* SPI */
188 SPI_7XX_1,
189 SPI_7XX_2,
190 SPI_7XX_3,
191 SPI_7XX_4,
192 SPI_7XX_5,
193 SPI_7XX_6,
186}; 194};
187 195
188enum omap1xxx_index { 196enum omap1xxx_index {
diff --git a/arch/arm/plat-omap/include/plat/omap7xx.h b/arch/arm/plat-omap/include/plat/omap7xx.h
index 53f52414b0e9..48e4757e1e30 100644
--- a/arch/arm/plat-omap/include/plat/omap7xx.h
+++ b/arch/arm/plat-omap/include/plat/omap7xx.h
@@ -46,6 +46,9 @@
46#define OMAP7XX_DSPREG_SIZE SZ_128K 46#define OMAP7XX_DSPREG_SIZE SZ_128K
47#define OMAP7XX_DSPREG_START 0xE1000000 47#define OMAP7XX_DSPREG_START 0xE1000000
48 48
49#define OMAP7XX_SPI1_BASE 0xfffc0800
50#define OMAP7XX_SPI2_BASE 0xfffc1000
51
49/* 52/*
50 * ---------------------------------------------------------------------------- 53 * ----------------------------------------------------------------------------
51 * OMAP7XX specific configuration registers 54 * OMAP7XX specific configuration registers