aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2008-12-19 08:32:15 -0500
committerSascha Hauer <s.hauer@pengutronix.de>2009-08-14 06:40:54 -0400
commitd37ba97d49703be4e71f786cffcee4dfe73fa93c (patch)
tree9d36c68713e99d6abafcdab2be981266b52d15b3
parentf420db843b7756e5d0d052b00472c94154f50c93 (diff)
MX31: add spi controller devices/resources
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r--arch/arm/mach-mx3/devices.c61
-rw-r--r--arch/arm/mach-mx3/devices.h3
2 files changed, 64 insertions, 0 deletions
diff --git a/arch/arm/mach-mx3/devices.c b/arch/arm/mach-mx3/devices.c
index 4e728a291967..cde1b0792421 100644
--- a/arch/arm/mach-mx3/devices.c
+++ b/arch/arm/mach-mx3/devices.c
@@ -455,6 +455,67 @@ struct platform_device mxc_usbh2 = {
455 .num_resources = ARRAY_SIZE(mxc_usbh2_resources), 455 .num_resources = ARRAY_SIZE(mxc_usbh2_resources),
456}; 456};
457 457
458/*
459 * SPI master controller
460 * 3 channels
461 */
462static struct resource imx_spi_0_resources[] = {
463 {
464 .start = CSPI1_BASE_ADDR,
465 .end = CSPI1_BASE_ADDR + SZ_4K - 1,
466 .flags = IORESOURCE_MEM,
467 }, {
468 .start = MXC_INT_CSPI1,
469 .end = MXC_INT_CSPI1,
470 .flags = IORESOURCE_IRQ,
471 },
472};
473
474static struct resource imx_spi_1_resources[] = {
475 {
476 .start = CSPI2_BASE_ADDR,
477 .end = CSPI2_BASE_ADDR + SZ_4K - 1,
478 .flags = IORESOURCE_MEM,
479 }, {
480 .start = MXC_INT_CSPI2,
481 .end = MXC_INT_CSPI2,
482 .flags = IORESOURCE_IRQ,
483 },
484};
485
486static struct resource imx_spi_2_resources[] = {
487 {
488 .start = CSPI3_BASE_ADDR,
489 .end = CSPI3_BASE_ADDR + SZ_4K - 1,
490 .flags = IORESOURCE_MEM,
491 }, {
492 .start = MXC_INT_CSPI3,
493 .end = MXC_INT_CSPI3,
494 .flags = IORESOURCE_IRQ,
495 },
496};
497
498struct platform_device imx_spi_device0 = {
499 .name = "spi_imx",
500 .id = 0,
501 .num_resources = ARRAY_SIZE(imx_spi_0_resources),
502 .resource = imx_spi_0_resources,
503};
504
505struct platform_device imx_spi_device1 = {
506 .name = "spi_imx",
507 .id = 1,
508 .num_resources = ARRAY_SIZE(imx_spi_1_resources),
509 .resource = imx_spi_1_resources,
510};
511
512struct platform_device imx_spi_device2 = {
513 .name = "spi_imx",
514 .id = 2,
515 .num_resources = ARRAY_SIZE(imx_spi_2_resources),
516 .resource = imx_spi_2_resources,
517};
518
458#ifdef CONFIG_ARCH_MX35 519#ifdef CONFIG_ARCH_MX35
459static struct resource mxc_fec_resources[] = { 520static struct resource mxc_fec_resources[] = {
460 { 521 {
diff --git a/arch/arm/mach-mx3/devices.h b/arch/arm/mach-mx3/devices.h
index 816143197558..79f2be45d139 100644
--- a/arch/arm/mach-mx3/devices.h
+++ b/arch/arm/mach-mx3/devices.h
@@ -20,4 +20,7 @@ extern struct platform_device mxc_otg_host;
20extern struct platform_device mxc_usbh1; 20extern struct platform_device mxc_usbh1;
21extern struct platform_device mxc_usbh2; 21extern struct platform_device mxc_usbh2;
22extern struct platform_device mxc_rnga_device; 22extern struct platform_device mxc_rnga_device;
23extern struct platform_device imx_spi_device0;
24extern struct platform_device imx_spi_device1;
25extern struct platform_device imx_spi_device2;
23 26