diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-21 18:40:55 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-21 18:40:55 -0400 |
commit | 85b375a613085b78531ec86369a51c2f3b922f95 (patch) | |
tree | 716437d598de92bbd7acaf24622e9a7d74fc209a /arch/arm/mach-at91/board-sam9260ek.c | |
parent | ec965350bb98bd291eb34f6ecddfdcfc36da1e6e (diff) | |
parent | cf816ecb533ab96b883dfdc0db174598b5b5c4d2 (diff) |
Merge branch 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm
* 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm: (212 commits)
[ARM] pxa: Phycore pcm-990-specific code for the PXA270 Quick Capture driver
[ARM] pxa: V4L2 soc_camera driver for PXA270
[ARM] pxa: restrict availability of pxa2xx PCMCIA drivers
[ARM] 5005/1: BAST: Fix kset_name initialiser
[ARM] 4967/1: Adds functions to set clkout rate for Samsung S3C2410
[ARM] 4988/1: Add GPIO lib support to the EP93xx
[ARM] Add initial sparsemem support
[ARM] pxa: initialise PXA devices before platform init code
[ARM] 5002/1: tosa: add two more leds
[ARM] 5004/1: Tosa: make several unreferenced structures static.
[ARM] 5003/1: Shut up sparse warnings
[ARM] 4977/2: soc - pxa2xx-ac97 - Add missing clk_enable()
[ARM] 4976/1: zylonite: Configure GPIO for WM9713 IRQ line
[ARM] 4974/1: Drop unused leds-tosa.
[ARM] 4973/1: Tosa: use leds-gpio driver.
[ARM] 4972/1: Tosa: convert scoop GPIOs usage to generic gpio code
[ARM] 4971/1: pxaficp_ir: provide startup and shutdown hooks
[ARM] pxa: lubbock: move mis-placed SPI info
[ARM] 4970/1: tosa: correct gpio used for wake up.
[ARM] 4966/1: magician: add MFP pin configuration
...
Diffstat (limited to 'arch/arm/mach-at91/board-sam9260ek.c')
-rw-r--r-- | arch/arm/mach-at91/board-sam9260ek.c | 83 |
1 files changed, 69 insertions, 14 deletions
diff --git a/arch/arm/mach-at91/board-sam9260ek.c b/arch/arm/mach-at91/board-sam9260ek.c index b343a6c28120..4d1d9c777084 100644 --- a/arch/arm/mach-at91/board-sam9260ek.c +++ b/arch/arm/mach-at91/board-sam9260ek.c | |||
@@ -25,6 +25,8 @@ | |||
25 | #include <linux/module.h> | 25 | #include <linux/module.h> |
26 | #include <linux/platform_device.h> | 26 | #include <linux/platform_device.h> |
27 | #include <linux/spi/spi.h> | 27 | #include <linux/spi/spi.h> |
28 | #include <linux/spi/at73c213.h> | ||
29 | #include <linux/clk.h> | ||
28 | 30 | ||
29 | #include <asm/hardware.h> | 31 | #include <asm/hardware.h> |
30 | #include <asm/setup.h> | 32 | #include <asm/setup.h> |
@@ -37,29 +39,28 @@ | |||
37 | 39 | ||
38 | #include <asm/arch/board.h> | 40 | #include <asm/arch/board.h> |
39 | #include <asm/arch/gpio.h> | 41 | #include <asm/arch/gpio.h> |
40 | #include <asm/arch/at91sam926x_mc.h> | ||
41 | 42 | ||
42 | #include "generic.h" | 43 | #include "generic.h" |
43 | 44 | ||
44 | 45 | ||
45 | /* | ||
46 | * Serial port configuration. | ||
47 | * 0 .. 5 = USART0 .. USART5 | ||
48 | * 6 = DBGU | ||
49 | */ | ||
50 | static struct at91_uart_config __initdata ek_uart_config = { | ||
51 | .console_tty = 0, /* ttyS0 */ | ||
52 | .nr_tty = 3, | ||
53 | .tty_map = { 6, 0, 1, -1, -1, -1, -1 } /* ttyS0, ..., ttyS6 */ | ||
54 | }; | ||
55 | |||
56 | static void __init ek_map_io(void) | 46 | static void __init ek_map_io(void) |
57 | { | 47 | { |
58 | /* Initialize processor: 18.432 MHz crystal */ | 48 | /* Initialize processor: 18.432 MHz crystal */ |
59 | at91sam9260_initialize(18432000); | 49 | at91sam9260_initialize(18432000); |
60 | 50 | ||
61 | /* Setup the serial ports and console */ | 51 | /* DGBU on ttyS0. (Rx & Tx only) */ |
62 | at91_init_serial(&ek_uart_config); | 52 | at91_register_uart(0, 0, 0); |
53 | |||
54 | /* USART0 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */ | ||
55 | at91_register_uart(AT91SAM9260_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS | ||
56 | | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD | ||
57 | | ATMEL_UART_RI); | ||
58 | |||
59 | /* USART1 on ttyS2. (Rx, Tx, RTS, CTS) */ | ||
60 | at91_register_uart(AT91SAM9260_ID_US1, 2, ATMEL_UART_CTS | ATMEL_UART_RTS); | ||
61 | |||
62 | /* set serial console to ttyS0 (ie, DBGU) */ | ||
63 | at91_set_serial_console(0); | ||
63 | } | 64 | } |
64 | 65 | ||
65 | static void __init ek_init_irq(void) | 66 | static void __init ek_init_irq(void) |
@@ -85,6 +86,35 @@ static struct at91_udc_data __initdata ek_udc_data = { | |||
85 | 86 | ||
86 | 87 | ||
87 | /* | 88 | /* |
89 | * Audio | ||
90 | */ | ||
91 | static struct at73c213_board_info at73c213_data = { | ||
92 | .ssc_id = 0, | ||
93 | .shortname = "AT91SAM9260-EK external DAC", | ||
94 | }; | ||
95 | |||
96 | #if defined(CONFIG_SND_AT73C213) || defined(CONFIG_SND_AT73C213_MODULE) | ||
97 | static void __init at73c213_set_clk(struct at73c213_board_info *info) | ||
98 | { | ||
99 | struct clk *pck0; | ||
100 | struct clk *plla; | ||
101 | |||
102 | pck0 = clk_get(NULL, "pck0"); | ||
103 | plla = clk_get(NULL, "plla"); | ||
104 | |||
105 | /* AT73C213 MCK Clock */ | ||
106 | at91_set_B_periph(AT91_PIN_PC1, 0); /* PCK0 */ | ||
107 | |||
108 | clk_set_parent(pck0, plla); | ||
109 | clk_put(plla); | ||
110 | |||
111 | info->dac_clk = pck0; | ||
112 | } | ||
113 | #else | ||
114 | static void __init at73c213_set_clk(struct at73c213_board_info *info) {} | ||
115 | #endif | ||
116 | |||
117 | /* | ||
88 | * SPI devices. | 118 | * SPI devices. |
89 | */ | 119 | */ |
90 | static struct spi_board_info ek_spi_devices[] = { | 120 | static struct spi_board_info ek_spi_devices[] = { |
@@ -110,6 +140,8 @@ static struct spi_board_info ek_spi_devices[] = { | |||
110 | .chip_select = 0, | 140 | .chip_select = 0, |
111 | .max_speed_hz = 10 * 1000 * 1000, | 141 | .max_speed_hz = 10 * 1000 * 1000, |
112 | .bus_num = 1, | 142 | .bus_num = 1, |
143 | .mode = SPI_MODE_1, | ||
144 | .platform_data = &at73c213_data, | ||
113 | }, | 145 | }, |
114 | #endif | 146 | #endif |
115 | }; | 147 | }; |
@@ -172,6 +204,24 @@ static struct at91_mmc_data __initdata ek_mmc_data = { | |||
172 | // .vcc_pin = ... not connected | 204 | // .vcc_pin = ... not connected |
173 | }; | 205 | }; |
174 | 206 | ||
207 | |||
208 | /* | ||
209 | * LEDs | ||
210 | */ | ||
211 | static struct gpio_led ek_leds[] = { | ||
212 | { /* "bottom" led, green, userled1 to be defined */ | ||
213 | .name = "ds5", | ||
214 | .gpio = AT91_PIN_PA6, | ||
215 | .active_low = 1, | ||
216 | .default_trigger = "none", | ||
217 | }, | ||
218 | { /* "power" led, yellow */ | ||
219 | .name = "ds1", | ||
220 | .gpio = AT91_PIN_PA9, | ||
221 | .default_trigger = "heartbeat", | ||
222 | } | ||
223 | }; | ||
224 | |||
175 | static void __init ek_board_init(void) | 225 | static void __init ek_board_init(void) |
176 | { | 226 | { |
177 | /* Serial */ | 227 | /* Serial */ |
@@ -190,6 +240,11 @@ static void __init ek_board_init(void) | |||
190 | at91_add_device_mmc(0, &ek_mmc_data); | 240 | at91_add_device_mmc(0, &ek_mmc_data); |
191 | /* I2C */ | 241 | /* I2C */ |
192 | at91_add_device_i2c(NULL, 0); | 242 | at91_add_device_i2c(NULL, 0); |
243 | /* SSC (to AT73C213) */ | ||
244 | at73c213_set_clk(&at73c213_data); | ||
245 | at91_add_device_ssc(AT91SAM9260_ID_SSC, ATMEL_SSC_TX); | ||
246 | /* LEDs */ | ||
247 | at91_gpio_leds(ek_leds, ARRAY_SIZE(ek_leds)); | ||
193 | } | 248 | } |
194 | 249 | ||
195 | MACHINE_START(AT91SAM9260EK, "Atmel AT91SAM9260-EK") | 250 | MACHINE_START(AT91SAM9260EK, "Atmel AT91SAM9260-EK") |