diff options
author | Michael Hennerich <michael.hennerich@analog.com> | 2008-02-08 12:54:09 -0500 |
---|---|---|
committer | Bryan Wu <bryan.wu@analog.com> | 2008-02-08 12:54:09 -0500 |
commit | 6e668936db12550ab5a6a758f236140101e5a644 (patch) | |
tree | 8ec66d17e3816e7007873671c5105a77bdb4a0c4 /arch/blackfin/mach-bf533 | |
parent | 8b01eaff4fdf39d23d53288fd1a3e74fef136145 (diff) |
[Blackfin] arch: Encourage users to use the spidev character driver: Provide platform support
- Enable kernel generic spidev driver for blackfin SPI ADC
- spi_adc driver, document and test sample not synced
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
Diffstat (limited to 'arch/blackfin/mach-bf533')
-rw-r--r-- | arch/blackfin/mach-bf533/boards/ezkit.c | 16 | ||||
-rw-r--r-- | arch/blackfin/mach-bf533/boards/stamp.c | 16 |
2 files changed, 32 insertions, 0 deletions
diff --git a/arch/blackfin/mach-bf533/boards/ezkit.c b/arch/blackfin/mach-bf533/boards/ezkit.c index 4026c2f3ab4e..4a42d624e558 100644 --- a/arch/blackfin/mach-bf533/boards/ezkit.c +++ b/arch/blackfin/mach-bf533/boards/ezkit.c | |||
@@ -134,6 +134,13 @@ static struct bfin5xx_spi_chip ad1836_spi_chip_info = { | |||
134 | }; | 134 | }; |
135 | #endif | 135 | #endif |
136 | 136 | ||
137 | #if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE) | ||
138 | static struct bfin5xx_spi_chip spidev_chip_info = { | ||
139 | .enable_dma = 0, | ||
140 | .bits_per_word = 8, | ||
141 | }; | ||
142 | #endif | ||
143 | |||
137 | static struct spi_board_info bfin_spi_board_info[] __initdata = { | 144 | static struct spi_board_info bfin_spi_board_info[] __initdata = { |
138 | #if defined(CONFIG_MTD_M25P80) || defined(CONFIG_MTD_M25P80_MODULE) | 145 | #if defined(CONFIG_MTD_M25P80) || defined(CONFIG_MTD_M25P80_MODULE) |
139 | { | 146 | { |
@@ -168,6 +175,15 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { | |||
168 | .controller_data = &ad1836_spi_chip_info, | 175 | .controller_data = &ad1836_spi_chip_info, |
169 | }, | 176 | }, |
170 | #endif | 177 | #endif |
178 | #if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE) | ||
179 | { | ||
180 | .modalias = "spidev", | ||
181 | .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ | ||
182 | .bus_num = 0, | ||
183 | .chip_select = 1, | ||
184 | .controller_data = &spidev_chip_info, | ||
185 | }, | ||
186 | #endif | ||
171 | }; | 187 | }; |
172 | 188 | ||
173 | /* SPI (0) */ | 189 | /* SPI (0) */ |
diff --git a/arch/blackfin/mach-bf533/boards/stamp.c b/arch/blackfin/mach-bf533/boards/stamp.c index 41ec72f8a08c..a645f6fd091b 100644 --- a/arch/blackfin/mach-bf533/boards/stamp.c +++ b/arch/blackfin/mach-bf533/boards/stamp.c | |||
@@ -226,6 +226,13 @@ static struct bfin5xx_spi_chip spi_mmc_chip_info = { | |||
226 | }; | 226 | }; |
227 | #endif | 227 | #endif |
228 | 228 | ||
229 | #if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE) | ||
230 | static struct bfin5xx_spi_chip spidev_chip_info = { | ||
231 | .enable_dma = 0, | ||
232 | .bits_per_word = 8, | ||
233 | }; | ||
234 | #endif | ||
235 | |||
229 | static struct spi_board_info bfin_spi_board_info[] __initdata = { | 236 | static struct spi_board_info bfin_spi_board_info[] __initdata = { |
230 | #if defined(CONFIG_MTD_M25P80) || defined(CONFIG_MTD_M25P80_MODULE) | 237 | #if defined(CONFIG_MTD_M25P80) || defined(CONFIG_MTD_M25P80_MODULE) |
231 | { | 238 | { |
@@ -312,6 +319,15 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { | |||
312 | .mode = SPI_MODE_2, | 319 | .mode = SPI_MODE_2, |
313 | }, | 320 | }, |
314 | #endif | 321 | #endif |
322 | #if defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE) | ||
323 | { | ||
324 | .modalias = "spidev", | ||
325 | .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ | ||
326 | .bus_num = 0, | ||
327 | .chip_select = 1, | ||
328 | .controller_data = &spidev_chip_info, | ||
329 | }, | ||
330 | #endif | ||
315 | }; | 331 | }; |
316 | 332 | ||
317 | /* SPI (0) */ | 333 | /* SPI (0) */ |