diff options
author | Haavard Skinnemoen <hskinnemoen@atmel.com> | 2007-01-10 14:20:02 -0500 |
---|---|---|
committer | Haavard Skinnemoen <hskinnemoen@atmel.com> | 2007-02-09 09:01:59 -0500 |
commit | 3d60ee1b04320d0695e071828dbadf3564d4568a (patch) | |
tree | e8c7ab2f9318cc751a98da4589857edfe2c79e11 /arch/avr32/boards/atstk1000/atstk1002.c | |
parent | 7f9f4678637f9ee1a999cc0870c4668f32e1a7eb (diff) |
[AVR32] SPI platform code update
Move stuff in spi.c into ATSTK1002 board code and update SPI
platform device definitions according to the new GPIO API.
Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
Diffstat (limited to 'arch/avr32/boards/atstk1000/atstk1002.c')
-rw-r--r-- | arch/avr32/boards/atstk1000/atstk1002.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/arch/avr32/boards/atstk1000/atstk1002.c b/arch/avr32/boards/atstk1000/atstk1002.c index bca815ff11f2..d47e39f0e971 100644 --- a/arch/avr32/boards/atstk1000/atstk1002.c +++ b/arch/avr32/boards/atstk1000/atstk1002.c | |||
@@ -8,15 +8,18 @@ | |||
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> | ||
11 | #include <linux/etherdevice.h> | 12 | #include <linux/etherdevice.h> |
12 | #include <linux/init.h> | 13 | #include <linux/init.h> |
13 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
14 | #include <linux/platform_device.h> | 15 | #include <linux/platform_device.h> |
15 | #include <linux/string.h> | 16 | #include <linux/string.h> |
16 | #include <linux/types.h> | 17 | #include <linux/types.h> |
18 | #include <linux/spi/spi.h> | ||
17 | 19 | ||
18 | #include <asm/io.h> | 20 | #include <asm/io.h> |
19 | #include <asm/setup.h> | 21 | #include <asm/setup.h> |
22 | #include <asm/arch/at32ap7000.h> | ||
20 | #include <asm/arch/board.h> | 23 | #include <asm/arch/board.h> |
21 | #include <asm/arch/init.h> | 24 | #include <asm/arch/init.h> |
22 | #include <asm/arch/portmux.h> | 25 | #include <asm/arch/portmux.h> |
@@ -33,6 +36,16 @@ static struct eth_addr __initdata hw_addr[2]; | |||
33 | static struct eth_platform_data __initdata eth_data[2]; | 36 | static struct eth_platform_data __initdata eth_data[2]; |
34 | extern struct lcdc_platform_data atstk1000_fb0_data; | 37 | extern struct lcdc_platform_data atstk1000_fb0_data; |
35 | 38 | ||
39 | static struct spi_board_info spi_board_info[] __initdata = { | ||
40 | { | ||
41 | .modalias = "ltv350qv", | ||
42 | .controller_data = (void *)GPIO_PIN_PA(4), | ||
43 | .max_speed_hz = 16000000, | ||
44 | .bus_num = 0, | ||
45 | .chip_select = 1, | ||
46 | }, | ||
47 | }; | ||
48 | |||
36 | /* | 49 | /* |
37 | * The next two functions should go away as the boot loader is | 50 | * The next two functions should go away as the boot loader is |
38 | * supposed to initialize the macb address registers with a valid | 51 | * supposed to initialize the macb address registers with a valid |
@@ -136,6 +149,7 @@ static int __init atstk1002_init(void) | |||
136 | 149 | ||
137 | set_hw_addr(at32_add_device_eth(0, ð_data[0])); | 150 | set_hw_addr(at32_add_device_eth(0, ð_data[0])); |
138 | 151 | ||
152 | spi_register_board_info(spi_board_info, ARRAY_SIZE(spi_board_info)); | ||
139 | at32_add_device_spi(0); | 153 | at32_add_device_spi(0); |
140 | at32_add_device_lcdc(0, &atstk1000_fb0_data); | 154 | at32_add_device_lcdc(0, &atstk1000_fb0_data); |
141 | 155 | ||