aboutsummaryrefslogtreecommitdiffstats
path: root/arch/avr32/boards
diff options
context:
space:
mode:
authorHaavard Skinnemoen <hskinnemoen@atmel.com>2007-02-16 07:56:11 -0500
committerHaavard Skinnemoen <hskinnemoen@atmel.com>2007-02-16 08:01:40 -0500
commit41d8ca452f523b9245704c7dd8ef290fa7b78e6b (patch)
tree41d84a6d1a1f20e7e74893eb76bf9a2c4de5c709 /arch/avr32/boards
parent23cebe2287474720c2eb0673581056cfb285a69f (diff)
[AVR32] Use per-controller spi_board_info structures
Set up one spi_board_info array per controller and pass this to at32_add_device_spi so that it can set up any GPIO pins for chip selects based on this information. Extracted from a patch by David Brownell and adapted slightly. Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
Diffstat (limited to 'arch/avr32/boards')
-rw-r--r--arch/avr32/boards/atstk1000/atstk1002.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/arch/avr32/boards/atstk1000/atstk1002.c b/arch/avr32/boards/atstk1000/atstk1002.c
index d47e39f0e971..5974768a59e5 100644
--- a/arch/avr32/boards/atstk1000/atstk1002.c
+++ b/arch/avr32/boards/atstk1000/atstk1002.c
@@ -8,7 +8,6 @@
8 * published by the Free Software Foundation. 8 * published by the Free Software Foundation.
9 */ 9 */
10#include <linux/clk.h> 10#include <linux/clk.h>
11#include <linux/device.h>
12#include <linux/etherdevice.h> 11#include <linux/etherdevice.h>
13#include <linux/init.h> 12#include <linux/init.h>
14#include <linux/kernel.h> 13#include <linux/kernel.h>
@@ -36,12 +35,11 @@ static struct eth_addr __initdata hw_addr[2];
36static struct eth_platform_data __initdata eth_data[2]; 35static struct eth_platform_data __initdata eth_data[2];
37extern struct lcdc_platform_data atstk1000_fb0_data; 36extern struct lcdc_platform_data atstk1000_fb0_data;
38 37
39static struct spi_board_info spi_board_info[] __initdata = { 38static struct spi_board_info spi0_board_info[] __initdata = {
40 { 39 {
40 /* QVGA display */
41 .modalias = "ltv350qv", 41 .modalias = "ltv350qv",
42 .controller_data = (void *)GPIO_PIN_PA(4),
43 .max_speed_hz = 16000000, 42 .max_speed_hz = 16000000,
44 .bus_num = 0,
45 .chip_select = 1, 43 .chip_select = 1,
46 }, 44 },
47}; 45};
@@ -149,8 +147,7 @@ static int __init atstk1002_init(void)
149 147
150 set_hw_addr(at32_add_device_eth(0, &eth_data[0])); 148 set_hw_addr(at32_add_device_eth(0, &eth_data[0]));
151 149
152 spi_register_board_info(spi_board_info, ARRAY_SIZE(spi_board_info)); 150 at32_add_device_spi(0, spi0_board_info, ARRAY_SIZE(spi0_board_info));
153 at32_add_device_spi(0);
154 at32_add_device_lcdc(0, &atstk1000_fb0_data); 151 at32_add_device_lcdc(0, &atstk1000_fb0_data);
155 152
156 return 0; 153 return 0;