15 #include <linux/kernel.h>
17 #include <linux/device.h>
21 #include <video/w100fb.h>
23 #include <asm/setup.h>
34 .lcd_format = 0x00000003,
35 .lcdd_cntl1 = 0x00000000,
36 .lcdd_cntl2 = 0x0003ffff,
37 .genlcd_cntl1 = 0x00fff003,
38 .genlcd_cntl2 = 0x00000003,
39 .genlcd_cntl3 = 0x000102aa,
42 static struct w100_mode himalaya4_lcd_mode = {
49 .crtc_ss = 0x80150014,
50 .crtc_ls = 0xa0fb00f7,
51 .crtc_gs = 0xc0080007,
52 .crtc_vpos_gs = 0x00080007,
53 .crtc_rev = 0x0000000a,
54 .crtc_dclk = 0x81700030,
55 .crtc_gclk = 0x8015010f,
56 .crtc_goe = 0x00000000,
59 .pixclk_divider_rotated = 15,
65 static struct w100_mode himalaya6_lcd_mode = {
72 .crtc_ss = 0x80150014,
73 .crtc_ls = 0xa0fb00f7,
74 .crtc_gs = 0xc0080007,
75 .crtc_vpos_gs = 0x00080007,
76 .crtc_rev = 0x0000000a,
77 .crtc_dclk = 0xa1700030,
78 .crtc_gclk = 0x8015010f,
79 .crtc_goe = 0x00000000,
81 .pixclk_divider = 0xb,
82 .pixclk_divider_rotated = 4,
89 .init_data1 = 0xffff0000,
90 .gpio_dir1 = 0x00000000,
91 .gpio_oe1 = 0x003c0000,
92 .init_data2 = 0x00000000,
93 .gpio_dir2 = 0x00000000,
94 .gpio_oe2 = 0x00000000,
99 .regs = &himalaya_lcd_regs,
100 .gpio = &himalaya_w100_gpio_info,
101 .xtal_freq = 16000000,
104 static struct resource himalaya_fb_resources[] = {
116 .platform_data = &himalaya_fb_info,
118 .num_resources =
ARRAY_SIZE(himalaya_fb_resources),
119 .resource = himalaya_fb_resources,
128 static void __init himalaya_lcd_init(
void)
130 int himalaya_boardid;
132 himalaya_boardid = 0x4;
136 switch (himalaya_boardid) {
138 himalaya_fb_info.
modelist = &himalaya4_lcd_mode;
141 himalaya_fb_info.
modelist = &himalaya6_lcd_mode;
146 himalaya_fb_info.
modelist = &himalaya4_lcd_mode;
150 static void __init himalaya_init(
void)
161 .atag_offset = 0x100,
166 .init_machine = himalaya_init,