aboutsummaryrefslogtreecommitdiffstats
path: root/arch/avr32/boards
diff options
context:
space:
mode:
authorHaavard Skinnemoen <hskinnemoen@atmel.com>2007-01-10 14:20:02 -0500
committerHaavard Skinnemoen <hskinnemoen@atmel.com>2007-02-09 09:01:59 -0500
commit3d60ee1b04320d0695e071828dbadf3564d4568a (patch)
treee8c7ab2f9318cc751a98da4589857edfe2c79e11 /arch/avr32/boards
parent7f9f4678637f9ee1a999cc0870c4668f32e1a7eb (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')
-rw-r--r--arch/avr32/boards/atstk1000/Makefile2
-rw-r--r--arch/avr32/boards/atstk1000/atstk1002.c14
-rw-r--r--arch/avr32/boards/atstk1000/spi.c27
3 files changed, 15 insertions, 28 deletions
diff --git a/arch/avr32/boards/atstk1000/Makefile b/arch/avr32/boards/atstk1000/Makefile
index df9499480530..8e0992201bb9 100644
--- a/arch/avr32/boards/atstk1000/Makefile
+++ b/arch/avr32/boards/atstk1000/Makefile
@@ -1,2 +1,2 @@
1obj-y += setup.o spi.o flash.o 1obj-y += setup.o flash.o
2obj-$(CONFIG_BOARD_ATSTK1002) += atstk1002.o 2obj-$(CONFIG_BOARD_ATSTK1002) += atstk1002.o
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];
33static struct eth_platform_data __initdata eth_data[2]; 36static struct eth_platform_data __initdata eth_data[2];
34extern struct lcdc_platform_data atstk1000_fb0_data; 37extern struct lcdc_platform_data atstk1000_fb0_data;
35 38
39static 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, &eth_data[0])); 150 set_hw_addr(at32_add_device_eth(0, &eth_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
diff --git a/arch/avr32/boards/atstk1000/spi.c b/arch/avr32/boards/atstk1000/spi.c
deleted file mode 100644
index 567726c82c6e..000000000000
--- a/arch/avr32/boards/atstk1000/spi.c
+++ /dev/null
@@ -1,27 +0,0 @@
1/*
2 * ATSTK1000 SPI devices
3 *
4 * Copyright (C) 2005 Atmel Norway
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10#include <linux/device.h>
11#include <linux/spi/spi.h>
12
13static struct spi_board_info spi_board_info[] __initdata = {
14 {
15 .modalias = "ltv350qv",
16 .max_speed_hz = 16000000,
17 .bus_num = 0,
18 .chip_select = 1,
19 },
20};
21
22static int board_init_spi(void)
23{
24 spi_register_board_info(spi_board_info, ARRAY_SIZE(spi_board_info));
25 return 0;
26}
27arch_initcall(board_init_spi);