diff options
Diffstat (limited to 'arch/avr32/boards')
-rw-r--r-- | arch/avr32/boards/atstk1000/atstk1000.h | 15 | ||||
-rw-r--r-- | arch/avr32/boards/atstk1000/atstk1002.c | 10 | ||||
-rw-r--r-- | arch/avr32/boards/atstk1000/setup.c | 45 |
3 files changed, 64 insertions, 6 deletions
diff --git a/arch/avr32/boards/atstk1000/atstk1000.h b/arch/avr32/boards/atstk1000/atstk1000.h new file mode 100644 index 000000000000..9a49ed036b72 --- /dev/null +++ b/arch/avr32/boards/atstk1000/atstk1000.h | |||
@@ -0,0 +1,15 @@ | |||
1 | /* | ||
2 | * ATSTK1000 setup code: Daughterboard interface | ||
3 | * | ||
4 | * Copyright (C) 2007 Atmel Corporation | ||
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 | #ifndef __ARCH_AVR32_BOARDS_ATSTK1000_ATSTK1000_H | ||
11 | #define __ARCH_AVR32_BOARDS_ATSTK1000_ATSTK1000_H | ||
12 | |||
13 | extern struct atmel_lcdfb_info atstk1000_lcdc_data; | ||
14 | |||
15 | #endif /* __ARCH_AVR32_BOARDS_ATSTK1000_ATSTK1000_H */ | ||
diff --git a/arch/avr32/boards/atstk1000/atstk1002.c b/arch/avr32/boards/atstk1000/atstk1002.c index abe6ca203fa7..fe1dbe2e28f4 100644 --- a/arch/avr32/boards/atstk1000/atstk1002.c +++ b/arch/avr32/boards/atstk1000/atstk1002.c | |||
@@ -16,6 +16,8 @@ | |||
16 | #include <linux/types.h> | 16 | #include <linux/types.h> |
17 | #include <linux/spi/spi.h> | 17 | #include <linux/spi/spi.h> |
18 | 18 | ||
19 | #include <video/atmel_lcdc.h> | ||
20 | |||
19 | #include <asm/io.h> | 21 | #include <asm/io.h> |
20 | #include <asm/setup.h> | 22 | #include <asm/setup.h> |
21 | #include <asm/arch/at32ap7000.h> | 23 | #include <asm/arch/at32ap7000.h> |
@@ -23,6 +25,7 @@ | |||
23 | #include <asm/arch/init.h> | 25 | #include <asm/arch/init.h> |
24 | #include <asm/arch/portmux.h> | 26 | #include <asm/arch/portmux.h> |
25 | 27 | ||
28 | #include "atstk1000.h" | ||
26 | 29 | ||
27 | #define SW2_DEFAULT /* MMCI and UART_A available */ | 30 | #define SW2_DEFAULT /* MMCI and UART_A available */ |
28 | 31 | ||
@@ -31,9 +34,7 @@ struct eth_addr { | |||
31 | }; | 34 | }; |
32 | 35 | ||
33 | static struct eth_addr __initdata hw_addr[2]; | 36 | static struct eth_addr __initdata hw_addr[2]; |
34 | |||
35 | static struct eth_platform_data __initdata eth_data[2]; | 37 | static struct eth_platform_data __initdata eth_data[2]; |
36 | static struct lcdc_platform_data atstk1000_fb0_data; | ||
37 | 38 | ||
38 | static struct spi_board_info spi0_board_info[] __initdata = { | 39 | static struct spi_board_info spi0_board_info[] __initdata = { |
39 | { | 40 | { |
@@ -148,9 +149,8 @@ static int __init atstk1002_init(void) | |||
148 | set_hw_addr(at32_add_device_eth(0, ð_data[0])); | 149 | set_hw_addr(at32_add_device_eth(0, ð_data[0])); |
149 | 150 | ||
150 | at32_add_device_spi(0, spi0_board_info, ARRAY_SIZE(spi0_board_info)); | 151 | at32_add_device_spi(0, spi0_board_info, ARRAY_SIZE(spi0_board_info)); |
151 | atstk1000_fb0_data.fbmem_start = fbmem_start; | 152 | at32_add_device_lcdc(0, &atstk1000_lcdc_data, |
152 | atstk1000_fb0_data.fbmem_size = fbmem_size; | 153 | fbmem_start, fbmem_size); |
153 | at32_add_device_lcdc(0, &atstk1000_fb0_data); | ||
154 | 154 | ||
155 | return 0; | 155 | return 0; |
156 | } | 156 | } |
diff --git a/arch/avr32/boards/atstk1000/setup.c b/arch/avr32/boards/atstk1000/setup.c index 2bc4b88d7edb..c9af409ada9a 100644 --- a/arch/avr32/boards/atstk1000/setup.c +++ b/arch/avr32/boards/atstk1000/setup.c | |||
@@ -8,13 +8,56 @@ | |||
8 | * published by the Free Software Foundation. | 8 | * published by the Free Software Foundation. |
9 | */ | 9 | */ |
10 | #include <linux/bootmem.h> | 10 | #include <linux/bootmem.h> |
11 | #include <linux/fb.h> | ||
11 | #include <linux/init.h> | 12 | #include <linux/init.h> |
12 | #include <linux/types.h> | 13 | #include <linux/types.h> |
13 | #include <linux/linkage.h> | 14 | #include <linux/linkage.h> |
14 | 15 | ||
15 | #include <asm/setup.h> | 16 | #include <video/atmel_lcdc.h> |
16 | 17 | ||
18 | #include <asm/setup.h> | ||
17 | #include <asm/arch/board.h> | 19 | #include <asm/arch/board.h> |
18 | 20 | ||
21 | #include "atstk1000.h" | ||
22 | |||
19 | /* Initialized by bootloader-specific startup code. */ | 23 | /* Initialized by bootloader-specific startup code. */ |
20 | struct tag *bootloader_tags __initdata; | 24 | struct tag *bootloader_tags __initdata; |
25 | |||
26 | static struct fb_videomode __initdata ltv350qv_modes[] = { | ||
27 | { | ||
28 | .name = "320x240 @ 75", | ||
29 | .refresh = 75, | ||
30 | .xres = 320, .yres = 240, | ||
31 | .pixclock = KHZ2PICOS(6891), | ||
32 | |||
33 | .left_margin = 17, .right_margin = 33, | ||
34 | .upper_margin = 10, .lower_margin = 10, | ||
35 | .hsync_len = 16, .vsync_len = 1, | ||
36 | |||
37 | .sync = 0, | ||
38 | .vmode = FB_VMODE_NONINTERLACED, | ||
39 | }, | ||
40 | }; | ||
41 | |||
42 | static struct fb_monspecs __initdata atstk1000_default_monspecs = { | ||
43 | .manufacturer = "SNG", | ||
44 | .monitor = "LTV350QV", | ||
45 | .modedb = ltv350qv_modes, | ||
46 | .modedb_len = ARRAY_SIZE(ltv350qv_modes), | ||
47 | .hfmin = 14820, | ||
48 | .hfmax = 22230, | ||
49 | .vfmin = 60, | ||
50 | .vfmax = 90, | ||
51 | .dclkmax = 30000000, | ||
52 | }; | ||
53 | |||
54 | struct atmel_lcdfb_info __initdata atstk1000_lcdc_data = { | ||
55 | .default_bpp = 24, | ||
56 | .default_dmacon = ATMEL_LCDC_DMAEN | ATMEL_LCDC_DMA2DEN, | ||
57 | .default_lcdcon2 = (ATMEL_LCDC_DISTYPE_TFT | ||
58 | | ATMEL_LCDC_INVCLK | ||
59 | | ATMEL_LCDC_CLKMOD_ALWAYSACTIVE | ||
60 | | ATMEL_LCDC_MEMOR_BIG), | ||
61 | .default_monspecs = &atstk1000_default_monspecs, | ||
62 | .guard_time = 2, | ||
63 | }; | ||