aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-kirkwood/common.c
diff options
context:
space:
mode:
authorLennert Buytenhek <buytenh@wantstofly.org>2008-08-09 09:38:18 -0400
committerLennert Buytenhek <buytenh@marvell.com>2008-08-09 09:38:18 -0400
commit18365d181fe7fee8b52cd12482200d3a4c48d05e (patch)
tree012a7e80cea61239be59e366cbfd1deef3ae83c5 /arch/arm/mach-kirkwood/common.c
parent60296c71f6c5063e3c1f1d2619ca0b60940162e7 (diff)
[ARM] Kirkwood: instantiate the orion_spi driver in the platform code
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Diffstat (limited to 'arch/arm/mach-kirkwood/common.c')
-rw-r--r--arch/arm/mach-kirkwood/common.c32
1 files changed, 32 insertions, 0 deletions
diff --git a/arch/arm/mach-kirkwood/common.c b/arch/arm/mach-kirkwood/common.c
index 693dc32b606b..189f16f3619d 100644
--- a/arch/arm/mach-kirkwood/common.c
+++ b/arch/arm/mach-kirkwood/common.c
@@ -15,6 +15,7 @@
15#include <linux/mbus.h> 15#include <linux/mbus.h>
16#include <linux/mv643xx_eth.h> 16#include <linux/mv643xx_eth.h>
17#include <linux/ata_platform.h> 17#include <linux/ata_platform.h>
18#include <linux/spi/orion_spi.h>
18#include <asm/page.h> 19#include <asm/page.h>
19#include <asm/timex.h> 20#include <asm/timex.h>
20#include <asm/mach/map.h> 21#include <asm/mach/map.h>
@@ -197,6 +198,37 @@ void __init kirkwood_sata_init(struct mv_sata_platform_data *sata_data)
197 198
198 199
199/***************************************************************************** 200/*****************************************************************************
201 * SPI
202 ****************************************************************************/
203static struct orion_spi_info kirkwood_spi_plat_data = {
204 .tclk = KIRKWOOD_TCLK,
205};
206
207static struct resource kirkwood_spi_resources[] = {
208 {
209 .start = SPI_PHYS_BASE,
210 .end = SPI_PHYS_BASE + SZ_512 - 1,
211 .flags = IORESOURCE_MEM,
212 },
213};
214
215static struct platform_device kirkwood_spi = {
216 .name = "orion_spi",
217 .id = 0,
218 .resource = kirkwood_spi_resources,
219 .dev = {
220 .platform_data = &kirkwood_spi_plat_data,
221 },
222 .num_resources = ARRAY_SIZE(kirkwood_spi_resources),
223};
224
225void __init kirkwood_spi_init()
226{
227 platform_device_register(&kirkwood_spi);
228}
229
230
231/*****************************************************************************
200 * UART0 232 * UART0
201 ****************************************************************************/ 233 ****************************************************************************/
202static struct plat_serial8250_port kirkwood_uart0_data[] = { 234static struct plat_serial8250_port kirkwood_uart0_data[] = {