Merge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik...
[linux-2.6] / arch / avr32 / boards / atstk1000 / setup.c
1 /*
2  * ATSTK1000 board-specific setup code.
3  *
4  * Copyright (C) 2005-2006 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 #include <linux/bootmem.h>
11 #include <linux/fb.h>
12 #include <linux/init.h>
13 #include <linux/types.h>
14 #include <linux/linkage.h>
15
16 #include <video/atmel_lcdc.h>
17
18 #include <asm/setup.h>
19 #include <asm/arch/board.h>
20
21 #include "atstk1000.h"
22
23 /* Initialized by bootloader-specific startup code. */
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 };