diff options
Diffstat (limited to 'arch/arm/mach-mx3')
-rw-r--r-- | arch/arm/mach-mx3/mx31lilly.c | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/arch/arm/mach-mx3/mx31lilly.c b/arch/arm/mach-mx3/mx31lilly.c index de5cf01f1734..f593a629d8b8 100644 --- a/arch/arm/mach-mx3/mx31lilly.c +++ b/arch/arm/mach-mx3/mx31lilly.c | |||
@@ -41,6 +41,7 @@ | |||
41 | #include <mach/common.h> | 41 | #include <mach/common.h> |
42 | #include <mach/iomux-mx3.h> | 42 | #include <mach/iomux-mx3.h> |
43 | #include <mach/board-mx31lilly.h> | 43 | #include <mach/board-mx31lilly.h> |
44 | #include <mach/spi.h> | ||
44 | 45 | ||
45 | #include "devices.h" | 46 | #include "devices.h" |
46 | 47 | ||
@@ -110,6 +111,22 @@ static struct platform_device *devices[] __initdata = { | |||
110 | &physmap_flash_device, | 111 | &physmap_flash_device, |
111 | }; | 112 | }; |
112 | 113 | ||
114 | static int spi_internal_chipselect[] = { | ||
115 | MXC_SPI_CS(0), | ||
116 | MXC_SPI_CS(1), | ||
117 | MXC_SPI_CS(2), | ||
118 | }; | ||
119 | |||
120 | static struct spi_imx_master spi0_pdata = { | ||
121 | .chipselect = spi_internal_chipselect, | ||
122 | .num_chipselect = ARRAY_SIZE(spi_internal_chipselect), | ||
123 | }; | ||
124 | |||
125 | static struct spi_imx_master spi1_pdata = { | ||
126 | .chipselect = spi_internal_chipselect, | ||
127 | .num_chipselect = ARRAY_SIZE(spi_internal_chipselect), | ||
128 | }; | ||
129 | |||
113 | static int mx31lilly_baseboard; | 130 | static int mx31lilly_baseboard; |
114 | core_param(mx31lilly_baseboard, mx31lilly_baseboard, int, 0444); | 131 | core_param(mx31lilly_baseboard, mx31lilly_baseboard, int, 0444); |
115 | 132 | ||
@@ -128,6 +145,26 @@ static void __init mx31lilly_board_init(void) | |||
128 | 145 | ||
129 | mxc_iomux_alloc_pin(MX31_PIN_CS4__CS4, "Ethernet CS"); | 146 | mxc_iomux_alloc_pin(MX31_PIN_CS4__CS4, "Ethernet CS"); |
130 | 147 | ||
148 | /* SPI */ | ||
149 | mxc_iomux_alloc_pin(MX31_PIN_CSPI1_SCLK__SCLK, "SPI1_CLK"); | ||
150 | mxc_iomux_alloc_pin(MX31_PIN_CSPI1_MOSI__MOSI, "SPI1_TX"); | ||
151 | mxc_iomux_alloc_pin(MX31_PIN_CSPI1_MISO__MISO, "SPI1_RX"); | ||
152 | mxc_iomux_alloc_pin(MX31_PIN_CSPI1_SPI_RDY__SPI_RDY, "SPI1_RDY"); | ||
153 | mxc_iomux_alloc_pin(MX31_PIN_CSPI1_SS0__SS0, "SPI1_SS0"); | ||
154 | mxc_iomux_alloc_pin(MX31_PIN_CSPI1_SS1__SS1, "SPI1_SS1"); | ||
155 | mxc_iomux_alloc_pin(MX31_PIN_CSPI1_SS2__SS2, "SPI1_SS2"); | ||
156 | |||
157 | mxc_iomux_alloc_pin(MX31_PIN_CSPI2_SCLK__SCLK, "SPI2_CLK"); | ||
158 | mxc_iomux_alloc_pin(MX31_PIN_CSPI2_MOSI__MOSI, "SPI2_TX"); | ||
159 | mxc_iomux_alloc_pin(MX31_PIN_CSPI2_MISO__MISO, "SPI2_RX"); | ||
160 | mxc_iomux_alloc_pin(MX31_PIN_CSPI2_SPI_RDY__SPI_RDY, "SPI2_RDY"); | ||
161 | mxc_iomux_alloc_pin(MX31_PIN_CSPI2_SS0__SS0, "SPI2_SS0"); | ||
162 | mxc_iomux_alloc_pin(MX31_PIN_CSPI2_SS1__SS1, "SPI2_SS1"); | ||
163 | mxc_iomux_alloc_pin(MX31_PIN_CSPI2_SS2__SS2, "SPI2_SS2"); | ||
164 | |||
165 | mxc_register_device(&mxc_spi_device0, &spi0_pdata); | ||
166 | mxc_register_device(&mxc_spi_device1, &spi1_pdata); | ||
167 | |||
131 | platform_add_devices(devices, ARRAY_SIZE(devices)); | 168 | platform_add_devices(devices, ARRAY_SIZE(devices)); |
132 | } | 169 | } |
133 | 170 | ||