aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2006-10-03 12:14:00 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-10-03 12:14:00 -0400
commit63c422afe3739b68bec0b5c42807d1450c951caf (patch)
tree2cdbcbd4c6fcea69fbe0b164242336c38168f631
parent6f3a28f7d1f0a65a78443c273b6e8ec01becf301 (diff)
parentd14b272bc63f35a8f20b4b1df16c080b8d24f8f1 (diff)
Merge branch 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm
* 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm: [ARM] 3848/1: pxafb: Add option of fixing video modes and spitz QVGA mode support [ARM] 3880/1: remove the last trace of iop31x support [ARM] 3879/1: ep93xx: instantiate platform devices for ep93xx ethernet [ARM] 3809/3: get rid of 4 megabyte kernel image size limit [ARM] Fix XIP_KERNEL build error in arch/arm/mm/mmu.c [ARM] 3874/1: Remove leftover usage of asm/timeofday.h
-rw-r--r--arch/arm/boot/compressed/head.S3
-rw-r--r--arch/arm/kernel/head.S18
-rw-r--r--arch/arm/mach-ep93xx/edb9315a.c30
-rw-r--r--arch/arm/mach-ep93xx/gesbc9312.c27
-rw-r--r--arch/arm/mach-ep93xx/ts72xx.c30
-rw-r--r--arch/arm/mach-pxa/corgi_lcd.c4
-rw-r--r--arch/arm/mach-pxa/generic.c13
-rw-r--r--arch/arm/mach-pxa/idp.c9
-rw-r--r--arch/arm/mach-pxa/lpd270.c42
-rw-r--r--arch/arm/mach-pxa/lubbock.c7
-rw-r--r--arch/arm/mach-pxa/mainstone.c17
-rw-r--r--arch/arm/mach-pxa/poodle.c12
-rw-r--r--arch/arm/mach-pxa/spitz.c51
-rw-r--r--arch/arm/mach-pxa/trizeps4.c7
-rw-r--r--arch/arm/mm/mmu.c2
-rw-r--r--arch/arm/oprofile/op_model_xscale.c3
-rw-r--r--drivers/video/pxafb.c106
-rw-r--r--drivers/video/pxafb.h4
-rw-r--r--include/asm-arm/arch-pxa/pxafb.h14
-rw-r--r--include/asm-arm/arch-pxa/spitz.h4
-rw-r--r--include/asm-arm/timeofday.h4
21 files changed, 305 insertions, 102 deletions
diff --git a/arch/arm/boot/compressed/head.S b/arch/arm/boot/compressed/head.S
index e5ab51b9cceb..2568d311be21 100644
--- a/arch/arm/boot/compressed/head.S
+++ b/arch/arm/boot/compressed/head.S
@@ -237,7 +237,8 @@ not_relocated: mov r0, #0
237 */ 237 */
238 cmp r4, r2 238 cmp r4, r2
239 bhs wont_overwrite 239 bhs wont_overwrite
240 add r0, r4, #4096*1024 @ 4MB largest kernel size 240 sub r3, sp, r5 @ > compressed kernel size
241 add r0, r4, r3, lsl #2 @ allow for 4x expansion
241 cmp r0, r5 242 cmp r0, r5
242 bls wont_overwrite 243 bls wont_overwrite
243 244
diff --git a/arch/arm/kernel/head.S b/arch/arm/kernel/head.S
index 5365d4e5949e..ebc3e74a7947 100644
--- a/arch/arm/kernel/head.S
+++ b/arch/arm/kernel/head.S
@@ -234,18 +234,18 @@ __create_page_tables:
234 234
235 /* 235 /*
236 * Now setup the pagetables for our kernel direct 236 * Now setup the pagetables for our kernel direct
237 * mapped region. We round TEXTADDR down to the 237 * mapped region.
238 * nearest megabyte boundary. It is assumed that
239 * the kernel fits within 4 contigous 1MB sections.
240 */ 238 */
241 add r0, r4, #(TEXTADDR & 0xff000000) >> 18 @ start of kernel 239 add r0, r4, #(TEXTADDR & 0xff000000) >> 18 @ start of kernel
242 str r3, [r0, #(TEXTADDR & 0x00f00000) >> 18]! 240 str r3, [r0, #(TEXTADDR & 0x00f00000) >> 18]!
243 add r3, r3, #1 << 20 241
244 str r3, [r0, #4]! @ KERNEL + 1MB 242 ldr r6, =(_end - PAGE_OFFSET - 1) @ r6 = number of sections
245 add r3, r3, #1 << 20 243 mov r6, r6, lsr #20 @ needed for kernel minus 1
246 str r3, [r0, #4]! @ KERNEL + 2MB 244
247 add r3, r3, #1 << 20 2451: add r3, r3, #1 << 20
248 str r3, [r0, #4] @ KERNEL + 3MB 246 str r3, [r0, #4]!
247 subs r6, r6, #1
248 bgt 1b
249 249
250 /* 250 /*
251 * Then map first 1MB of ram in case it contains our boot params. 251 * Then map first 1MB of ram in case it contains our boot params.
diff --git a/arch/arm/mach-ep93xx/edb9315a.c b/arch/arm/mach-ep93xx/edb9315a.c
index bfefdaa8f794..fa958e9d6ddd 100644
--- a/arch/arm/mach-ep93xx/edb9315a.c
+++ b/arch/arm/mach-ep93xx/edb9315a.c
@@ -44,10 +44,40 @@ static struct platform_device edb9315a_flash = {
44 .resource = &edb9315a_flash_resource, 44 .resource = &edb9315a_flash_resource,
45}; 45};
46 46
47static struct ep93xx_eth_data edb9315a_eth_data = {
48 .phy_id = 1,
49};
50
51static struct resource edb9315a_eth_resource[] = {
52 {
53 .start = EP93XX_ETHERNET_PHYS_BASE,
54 .end = EP93XX_ETHERNET_PHYS_BASE + 0xffff,
55 .flags = IORESOURCE_MEM,
56 }, {
57 .start = IRQ_EP93XX_ETHERNET,
58 .end = IRQ_EP93XX_ETHERNET,
59 .flags = IORESOURCE_IRQ,
60 }
61};
62
63static struct platform_device edb9315a_eth_device = {
64 .name = "ep93xx-eth",
65 .id = -1,
66 .dev = {
67 .platform_data = &edb9315a_eth_data,
68 },
69 .num_resources = 2,
70 .resource = edb9315a_eth_resource,
71};
72
47static void __init edb9315a_init_machine(void) 73static void __init edb9315a_init_machine(void)
48{ 74{
49 ep93xx_init_devices(); 75 ep93xx_init_devices();
50 platform_device_register(&edb9315a_flash); 76 platform_device_register(&edb9315a_flash);
77
78 memcpy(edb9315a_eth_data.dev_addr,
79 (void *)(EP93XX_ETHERNET_BASE + 0x50), 6);
80 platform_device_register(&edb9315a_eth_device);
51} 81}
52 82
53MACHINE_START(EDB9315A, "Cirrus Logic EDB9315A Evaluation Board") 83MACHINE_START(EDB9315A, "Cirrus Logic EDB9315A Evaluation Board")
diff --git a/arch/arm/mach-ep93xx/gesbc9312.c b/arch/arm/mach-ep93xx/gesbc9312.c
index e760fd4f3655..694590a451c1 100644
--- a/arch/arm/mach-ep93xx/gesbc9312.c
+++ b/arch/arm/mach-ep93xx/gesbc9312.c
@@ -43,10 +43,37 @@ static struct platform_device gesbc9312_flash = {
43 .resource = &gesbc9312_flash_resource, 43 .resource = &gesbc9312_flash_resource,
44}; 44};
45 45
46static struct ep93xx_eth_data gesbc9312_eth_data = {
47 .phy_id = 1,
48};
49
50static struct resource gesbc9312_eth_resource[] = {
51 {
52 .start = EP93XX_ETHERNET_PHYS_BASE,
53 .end = EP93XX_ETHERNET_PHYS_BASE + 0xffff,
54 .flags = IORESOURCE_MEM,
55 }, {
56 .start = IRQ_EP93XX_ETHERNET,
57 .end = IRQ_EP93XX_ETHERNET,
58 .flags = IORESOURCE_IRQ,
59 }
60};
61
62static struct platform_device gesbc9312_eth_device = {
63 .name = "ep93xx-eth",
64 .id = -1,
65 .dev = {
66 .platform_data = &gesbc9312_eth_data,
67 },
68 .num_resources = 2,
69 .resource = gesbc9312_eth_resource,
70};
71
46static void __init gesbc9312_init_machine(void) 72static void __init gesbc9312_init_machine(void)
47{ 73{
48 ep93xx_init_devices(); 74 ep93xx_init_devices();
49 platform_device_register(&gesbc9312_flash); 75 platform_device_register(&gesbc9312_flash);
76 platform_device_register(&gesbc9312_eth_device);
50} 77}
51 78
52MACHINE_START(GESBC9312, "Glomation GESBC-9312-sx") 79MACHINE_START(GESBC9312, "Glomation GESBC-9312-sx")
diff --git a/arch/arm/mach-ep93xx/ts72xx.c b/arch/arm/mach-ep93xx/ts72xx.c
index df315f2e9beb..3a4bf90ba832 100644
--- a/arch/arm/mach-ep93xx/ts72xx.c
+++ b/arch/arm/mach-ep93xx/ts72xx.c
@@ -157,12 +157,42 @@ static struct platform_device ts72xx_rtc_device = {
157 .num_resources = 0, 157 .num_resources = 0,
158}; 158};
159 159
160static struct ep93xx_eth_data ts72xx_eth_data = {
161 .phy_id = 1,
162};
163
164static struct resource ts72xx_eth_resource[] = {
165 {
166 .start = EP93XX_ETHERNET_PHYS_BASE,
167 .end = EP93XX_ETHERNET_PHYS_BASE + 0xffff,
168 .flags = IORESOURCE_MEM,
169 }, {
170 .start = IRQ_EP93XX_ETHERNET,
171 .end = IRQ_EP93XX_ETHERNET,
172 .flags = IORESOURCE_IRQ,
173 }
174};
175
176static struct platform_device ts72xx_eth_device = {
177 .name = "ep93xx-eth",
178 .id = -1,
179 .dev = {
180 .platform_data = &ts72xx_eth_data,
181 },
182 .num_resources = 2,
183 .resource = ts72xx_eth_resource,
184};
185
160static void __init ts72xx_init_machine(void) 186static void __init ts72xx_init_machine(void)
161{ 187{
162 ep93xx_init_devices(); 188 ep93xx_init_devices();
163 if (board_is_ts7200()) 189 if (board_is_ts7200())
164 platform_device_register(&ts72xx_flash); 190 platform_device_register(&ts72xx_flash);
165 platform_device_register(&ts72xx_rtc_device); 191 platform_device_register(&ts72xx_rtc_device);
192
193 memcpy(ts72xx_eth_data.dev_addr,
194 (void *)(EP93XX_ETHERNET_BASE + 0x50), 6);
195 platform_device_register(&ts72xx_eth_device);
166} 196}
167 197
168MACHINE_START(TS72XX, "Technologic Systems TS-72xx SBC") 198MACHINE_START(TS72XX, "Technologic Systems TS-72xx SBC")
diff --git a/arch/arm/mach-pxa/corgi_lcd.c b/arch/arm/mach-pxa/corgi_lcd.c
index 6dbcaf114ad7..d7815491b752 100644
--- a/arch/arm/mach-pxa/corgi_lcd.c
+++ b/arch/arm/mach-pxa/corgi_lcd.c
@@ -431,10 +431,10 @@ struct platform_device corgifb_device = {
431 431
432#include <asm/arch/pxafb.h> 432#include <asm/arch/pxafb.h>
433 433
434void spitz_lcd_power(int on) 434void spitz_lcd_power(int on, struct fb_var_screeninfo *var)
435{ 435{
436 if (on) 436 if (on)
437 lcdtg_hw_init(480); 437 lcdtg_hw_init(var->xres);
438 else 438 else
439 lcdtg_suspend(); 439 lcdtg_suspend();
440} 440}
diff --git a/arch/arm/mach-pxa/generic.c b/arch/arm/mach-pxa/generic.c
index 5efa84749f37..45fb2c3bcf82 100644
--- a/arch/arm/mach-pxa/generic.c
+++ b/arch/arm/mach-pxa/generic.c
@@ -204,13 +204,6 @@ static struct platform_device udc_device = {
204 } 204 }
205}; 205};
206 206
207static struct pxafb_mach_info pxa_fb_info;
208
209void __init set_pxa_fb_info(struct pxafb_mach_info *hard_pxa_fb_info)
210{
211 memcpy(&pxa_fb_info,hard_pxa_fb_info,sizeof(struct pxafb_mach_info));
212}
213
214static struct resource pxafb_resources[] = { 207static struct resource pxafb_resources[] = {
215 [0] = { 208 [0] = {
216 .start = 0x44000000, 209 .start = 0x44000000,
@@ -230,7 +223,6 @@ static struct platform_device pxafb_device = {
230 .name = "pxa2xx-fb", 223 .name = "pxa2xx-fb",
231 .id = -1, 224 .id = -1,
232 .dev = { 225 .dev = {
233 .platform_data = &pxa_fb_info,
234 .dma_mask = &fb_dma_mask, 226 .dma_mask = &fb_dma_mask,
235 .coherent_dma_mask = 0xffffffff, 227 .coherent_dma_mask = 0xffffffff,
236 }, 228 },
@@ -238,6 +230,11 @@ static struct platform_device pxafb_device = {
238 .resource = pxafb_resources, 230 .resource = pxafb_resources,
239}; 231};
240 232
233void __init set_pxa_fb_info(struct pxafb_mach_info *info)
234{
235 pxafb_device.dev.platform_data = info;
236}
237
241void __init set_pxa_fb_parent(struct device *parent_dev) 238void __init set_pxa_fb_parent(struct device *parent_dev)
242{ 239{
243 pxafb_device.dev.parent = parent_dev; 240 pxafb_device.dev.parent = parent_dev;
diff --git a/arch/arm/mach-pxa/idp.c b/arch/arm/mach-pxa/idp.c
index 6914d22bc20f..3e4b0ab71c66 100644
--- a/arch/arm/mach-pxa/idp.c
+++ b/arch/arm/mach-pxa/idp.c
@@ -82,7 +82,7 @@ static void idp_vlcd(int on)
82 } 82 }
83} 83}
84 84
85static void idp_lcd_power(int on) 85static void idp_lcd_power(int on, struct fb_var_screeninfo *var)
86{ 86{
87 if (on) { 87 if (on) {
88 IDP_CPLD_LCD |= (1<<0); 88 IDP_CPLD_LCD |= (1<<0);
@@ -99,7 +99,7 @@ static void idp_lcd_power(int on)
99 idp_vlcd(on); 99 idp_vlcd(on);
100} 100}
101 101
102static struct pxafb_mach_info sharp_lm8v31 __initdata = { 102static struct pxafb_mode_info sharp_lm8v31_mode = {
103 .pixclock = 270000, 103 .pixclock = 270000,
104 .xres = 640, 104 .xres = 640,
105 .yres = 480, 105 .yres = 480,
@@ -112,6 +112,11 @@ static struct pxafb_mach_info sharp_lm8v31 __initdata = {
112 .lower_margin = 0, 112 .lower_margin = 0,
113 .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, 113 .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
114 .cmap_greyscale = 0, 114 .cmap_greyscale = 0,
115};
116
117static struct pxafb_mach_info sharp_lm8v31 = {
118 .modes = &sharp_lm8v31_mode,
119 .num_modes = 1,
115 .cmap_inverse = 0, 120 .cmap_inverse = 0,
116 .cmap_static = 0, 121 .cmap_static = 0,
117 .lccr0 = LCCR0_SDS, 122 .lccr0 = LCCR0_SDS,
diff --git a/arch/arm/mach-pxa/lpd270.c b/arch/arm/mach-pxa/lpd270.c
index 12479ae26db2..eff2a91b2565 100644
--- a/arch/arm/mach-pxa/lpd270.c
+++ b/arch/arm/mach-pxa/lpd270.c
@@ -248,7 +248,7 @@ static void lpd270_backlight_power(int on)
248} 248}
249 249
250/* 5.7" TFT QVGA (LoLo display number 1) */ 250/* 5.7" TFT QVGA (LoLo display number 1) */
251static struct pxafb_mach_info sharp_lq057q3dc02 __initdata = { 251static struct pxafb_mode_info sharp_lq057q3dc02_mode = {
252 .pixclock = 150000, 252 .pixclock = 150000,
253 .xres = 320, 253 .xres = 320,
254 .yres = 240, 254 .yres = 240,
@@ -260,13 +260,18 @@ static struct pxafb_mach_info sharp_lq057q3dc02 __initdata = {
260 .upper_margin = 0x08, 260 .upper_margin = 0x08,
261 .lower_margin = 0x14, 261 .lower_margin = 0x14,
262 .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, 262 .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
263};
264
265static struct pxafb_mach_info sharp_lq057q3dc02 = {
266 .modes = &sharp_lq057q3dc02_mode,
267 .num_modes = 1,
263 .lccr0 = 0x07800080, 268 .lccr0 = 0x07800080,
264 .lccr3 = 0x00400000, 269 .lccr3 = 0x00400000,
265 .pxafb_backlight_power = lpd270_backlight_power, 270 .pxafb_backlight_power = lpd270_backlight_power,
266}; 271};
267 272
268/* 12.1" TFT SVGA (LoLo display number 2) */ 273/* 12.1" TFT SVGA (LoLo display number 2) */
269static struct pxafb_mach_info sharp_lq121s1dg31 __initdata = { 274static struct pxafb_mode_info sharp_lq121s1dg31_mode = {
270 .pixclock = 50000, 275 .pixclock = 50000,
271 .xres = 800, 276 .xres = 800,
272 .yres = 600, 277 .yres = 600,
@@ -278,13 +283,18 @@ static struct pxafb_mach_info sharp_lq121s1dg31 __initdata = {
278 .upper_margin = 0x14, 283 .upper_margin = 0x14,
279 .lower_margin = 0x0a, 284 .lower_margin = 0x0a,
280 .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, 285 .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
286};
287
288static struct pxafb_mach_info sharp_lq121s1dg31 = {
289 .modes = &sharp_lq121s1dg31_mode,
290 .num_modes = 1,
281 .lccr0 = 0x07800080, 291 .lccr0 = 0x07800080,
282 .lccr3 = 0x00400000, 292 .lccr3 = 0x00400000,
283 .pxafb_backlight_power = lpd270_backlight_power, 293 .pxafb_backlight_power = lpd270_backlight_power,
284}; 294};
285 295
286/* 3.6" TFT QVGA (LoLo display number 3) */ 296/* 3.6" TFT QVGA (LoLo display number 3) */
287static struct pxafb_mach_info sharp_lq036q1da01 __initdata = { 297static struct pxafb_mode_info sharp_lq036q1da01_mode = {
288 .pixclock = 150000, 298 .pixclock = 150000,
289 .xres = 320, 299 .xres = 320,
290 .yres = 240, 300 .yres = 240,
@@ -296,13 +306,18 @@ static struct pxafb_mach_info sharp_lq036q1da01 __initdata = {
296 .upper_margin = 0x03, 306 .upper_margin = 0x03,
297 .lower_margin = 0x03, 307 .lower_margin = 0x03,
298 .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, 308 .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
309};
310
311static struct pxafb_mach_info sharp_lq036q1da01 = {
312 .modes = &sharp_lq036q1da01_mode,
313 .num_modes = 1,
299 .lccr0 = 0x07800080, 314 .lccr0 = 0x07800080,
300 .lccr3 = 0x00400000, 315 .lccr3 = 0x00400000,
301 .pxafb_backlight_power = lpd270_backlight_power, 316 .pxafb_backlight_power = lpd270_backlight_power,
302}; 317};
303 318
304/* 6.4" TFT VGA (LoLo display number 5) */ 319/* 6.4" TFT VGA (LoLo display number 5) */
305static struct pxafb_mach_info sharp_lq64d343 __initdata = { 320static struct pxafb_mode_info sharp_lq64d343_mode = {
306 .pixclock = 25000, 321 .pixclock = 25000,
307 .xres = 640, 322 .xres = 640,
308 .yres = 480, 323 .yres = 480,
@@ -314,13 +329,18 @@ static struct pxafb_mach_info sharp_lq64d343 __initdata = {
314 .upper_margin = 0x22, 329 .upper_margin = 0x22,
315 .lower_margin = 0x00, 330 .lower_margin = 0x00,
316 .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, 331 .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
332};
333
334static struct pxafb_mach_info sharp_lq64d343 = {
335 .modes = &sharp_lq64d343_mode,
336 .num_modes = 1,
317 .lccr0 = 0x07800080, 337 .lccr0 = 0x07800080,
318 .lccr3 = 0x00400000, 338 .lccr3 = 0x00400000,
319 .pxafb_backlight_power = lpd270_backlight_power, 339 .pxafb_backlight_power = lpd270_backlight_power,
320}; 340};
321 341
322/* 10.4" TFT VGA (LoLo display number 7) */ 342/* 10.4" TFT VGA (LoLo display number 7) */
323static struct pxafb_mach_info sharp_lq10d368 __initdata = { 343static struct pxafb_mode_info sharp_lq10d368_mode = {
324 .pixclock = 25000, 344 .pixclock = 25000,
325 .xres = 640, 345 .xres = 640,
326 .yres = 480, 346 .yres = 480,
@@ -332,13 +352,18 @@ static struct pxafb_mach_info sharp_lq10d368 __initdata = {
332 .upper_margin = 0x22, 352 .upper_margin = 0x22,
333 .lower_margin = 0x00, 353 .lower_margin = 0x00,
334 .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, 354 .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
355};
356
357static struct pxafb_mach_info sharp_lq10d368 = {
358 .modes = &sharp_lq10d368_mode,
359 .num_modes = 1,
335 .lccr0 = 0x07800080, 360 .lccr0 = 0x07800080,
336 .lccr3 = 0x00400000, 361 .lccr3 = 0x00400000,
337 .pxafb_backlight_power = lpd270_backlight_power, 362 .pxafb_backlight_power = lpd270_backlight_power,
338}; 363};
339 364
340/* 3.5" TFT QVGA (LoLo display number 8) */ 365/* 3.5" TFT QVGA (LoLo display number 8) */
341static struct pxafb_mach_info sharp_lq035q7db02_20 __initdata = { 366static struct pxafb_mode_info sharp_lq035q7db02_20_mode = {
342 .pixclock = 150000, 367 .pixclock = 150000,
343 .xres = 240, 368 .xres = 240,
344 .yres = 320, 369 .yres = 320,
@@ -350,6 +375,11 @@ static struct pxafb_mach_info sharp_lq035q7db02_20 __initdata = {
350 .upper_margin = 0x05, 375 .upper_margin = 0x05,
351 .lower_margin = 0x14, 376 .lower_margin = 0x14,
352 .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, 377 .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
378};
379
380static struct pxafb_mach_info sharp_lq035q7db02_20 = {
381 .modes = &sharp_lq035q7db02_20_mode,
382 .num_modes = 1,
353 .lccr0 = 0x07800080, 383 .lccr0 = 0x07800080,
354 .lccr3 = 0x00400000, 384 .lccr3 = 0x00400000,
355 .pxafb_backlight_power = lpd270_backlight_power, 385 .pxafb_backlight_power = lpd270_backlight_power,
diff --git a/arch/arm/mach-pxa/lubbock.c b/arch/arm/mach-pxa/lubbock.c
index 83ff5cee64d9..157cf47cbe66 100644
--- a/arch/arm/mach-pxa/lubbock.c
+++ b/arch/arm/mach-pxa/lubbock.c
@@ -352,7 +352,7 @@ static struct platform_device *devices[] __initdata = {
352 &pxa_ssp, 352 &pxa_ssp,
353}; 353};
354 354
355static struct pxafb_mach_info sharp_lm8v31 __initdata = { 355static struct pxafb_mode_info sharp_lm8v31_mode = {
356 .pixclock = 270000, 356 .pixclock = 270000,
357 .xres = 640, 357 .xres = 640,
358 .yres = 480, 358 .yres = 480,
@@ -365,6 +365,11 @@ static struct pxafb_mach_info sharp_lm8v31 __initdata = {
365 .lower_margin = 0, 365 .lower_margin = 0,
366 .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, 366 .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
367 .cmap_greyscale = 0, 367 .cmap_greyscale = 0,
368};
369
370static struct pxafb_mach_info sharp_lm8v31 = {
371 .modes = &sharp_lm8v31_mode,
372 .num_modes = 1,
368 .cmap_inverse = 0, 373 .cmap_inverse = 0,
369 .cmap_static = 0, 374 .cmap_static = 0,
370 .lccr0 = LCCR0_SDS, 375 .lccr0 = LCCR0_SDS,
diff --git a/arch/arm/mach-pxa/mainstone.c b/arch/arm/mach-pxa/mainstone.c
index a7e9b96f258a..7ba0447d6fa3 100644
--- a/arch/arm/mach-pxa/mainstone.c
+++ b/arch/arm/mach-pxa/mainstone.c
@@ -279,7 +279,7 @@ static void mainstone_backlight_power(int on)
279 } 279 }
280} 280}
281 281
282static struct pxafb_mach_info toshiba_ltm04c380k __initdata = { 282static struct pxafb_mode_info toshiba_ltm04c380k_mode = {
283 .pixclock = 50000, 283 .pixclock = 50000,
284 .xres = 640, 284 .xres = 640,
285 .yres = 480, 285 .yres = 480,
@@ -291,12 +291,9 @@ static struct pxafb_mach_info toshiba_ltm04c380k __initdata = {
291 .upper_margin = 0, 291 .upper_margin = 0,
292 .lower_margin = 0, 292 .lower_margin = 0,
293 .sync = FB_SYNC_HOR_HIGH_ACT|FB_SYNC_VERT_HIGH_ACT, 293 .sync = FB_SYNC_HOR_HIGH_ACT|FB_SYNC_VERT_HIGH_ACT,
294 .lccr0 = LCCR0_Act,
295 .lccr3 = LCCR3_PCP,
296 .pxafb_backlight_power = mainstone_backlight_power,
297}; 294};
298 295
299static struct pxafb_mach_info toshiba_ltm035a776c __initdata = { 296static struct pxafb_mode_info toshiba_ltm035a776c_mode = {
300 .pixclock = 110000, 297 .pixclock = 110000,
301 .xres = 240, 298 .xres = 240,
302 .yres = 320, 299 .yres = 320,
@@ -308,6 +305,10 @@ static struct pxafb_mach_info toshiba_ltm035a776c __initdata = {
308 .upper_margin = 1, 305 .upper_margin = 1,
309 .lower_margin = 10, 306 .lower_margin = 10,
310 .sync = FB_SYNC_HOR_HIGH_ACT|FB_SYNC_VERT_HIGH_ACT, 307 .sync = FB_SYNC_HOR_HIGH_ACT|FB_SYNC_VERT_HIGH_ACT,
308};
309
310static struct pxafb_mach_info mainstone_pxafb_info = {
311 .num_modes = 1,
311 .lccr0 = LCCR0_Act, 312 .lccr0 = LCCR0_Act,
312 .lccr3 = LCCR3_PCP, 313 .lccr3 = LCCR3_PCP,
313 .pxafb_backlight_power = mainstone_backlight_power, 314 .pxafb_backlight_power = mainstone_backlight_power,
@@ -448,9 +449,11 @@ static void __init mainstone_init(void)
448 /* reading Mainstone's "Virtual Configuration Register" 449 /* reading Mainstone's "Virtual Configuration Register"
449 might be handy to select LCD type here */ 450 might be handy to select LCD type here */
450 if (0) 451 if (0)
451 set_pxa_fb_info(&toshiba_ltm04c380k); 452 mainstone_pxafb_info.modes = &toshiba_ltm04c380k_mode;
452 else 453 else
453 set_pxa_fb_info(&toshiba_ltm035a776c); 454 mainstone_pxafb_info.modes = &toshiba_ltm035a776c_mode;
455
456 set_pxa_fb_info(&mainstone_pxafb_info);
454 457
455 pxa_set_mci_info(&mainstone_mci_platform_data); 458 pxa_set_mci_info(&mainstone_mci_platform_data);
456 pxa_set_ficp_info(&mainstone_ficp_platform_data); 459 pxa_set_ficp_info(&mainstone_ficp_platform_data);
diff --git a/arch/arm/mach-pxa/poodle.c b/arch/arm/mach-pxa/poodle.c
index 6dbff6d94801..5e8c098ca139 100644
--- a/arch/arm/mach-pxa/poodle.c
+++ b/arch/arm/mach-pxa/poodle.c
@@ -296,27 +296,25 @@ static struct pxa2xx_udc_mach_info udc_info __initdata = {
296 296
297 297
298/* PXAFB device */ 298/* PXAFB device */
299static struct pxafb_mach_info poodle_fb_info __initdata = { 299static struct pxafb_mode_info poodle_fb_mode = {
300 .pixclock = 144700, 300 .pixclock = 144700,
301
302 .xres = 320, 301 .xres = 320,
303 .yres = 240, 302 .yres = 240,
304 .bpp = 16, 303 .bpp = 16,
305
306 .hsync_len = 7, 304 .hsync_len = 7,
307 .left_margin = 11, 305 .left_margin = 11,
308 .right_margin = 30, 306 .right_margin = 30,
309
310 .vsync_len = 2, 307 .vsync_len = 2,
311 .upper_margin = 2, 308 .upper_margin = 2,
312 .lower_margin = 0, 309 .lower_margin = 0,
313 .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, 310 .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
311};
314 312
313static struct pxafb_mach_info poodle_fb_info = {
314 .modes = &poodle_fb_mode,
315 .num_modes = 1,
315 .lccr0 = LCCR0_Act | LCCR0_Sngl | LCCR0_Color, 316 .lccr0 = LCCR0_Act | LCCR0_Sngl | LCCR0_Color,
316 .lccr3 = 0, 317 .lccr3 = 0,
317
318 .pxafb_backlight_power = NULL,
319 .pxafb_lcd_power = NULL,
320}; 318};
321 319
322static struct platform_device *devices[] __initdata = { 320static struct platform_device *devices[] __initdata = {
diff --git a/arch/arm/mach-pxa/spitz.c b/arch/arm/mach-pxa/spitz.c
index 1c32a9310dc2..401cdb850fbc 100644
--- a/arch/arm/mach-pxa/spitz.c
+++ b/arch/arm/mach-pxa/spitz.c
@@ -407,21 +407,42 @@ static struct pxaficp_platform_data spitz_ficp_platform_data = {
407/* 407/*
408 * Spitz PXA Framebuffer 408 * Spitz PXA Framebuffer
409 */ 409 */
410static struct pxafb_mach_info spitz_pxafb_info __initdata = { 410
411 .pixclock = 19231, 411static struct pxafb_mode_info spitz_pxafb_modes[] = {
412 .xres = 480, 412{
413 .yres = 640, 413 .pixclock = 19231,
414 .bpp = 16, 414 .xres = 480,
415 .hsync_len = 40, 415 .yres = 640,
416 .left_margin = 46, 416 .bpp = 16,
417 .right_margin = 125, 417 .hsync_len = 40,
418 .vsync_len = 3, 418 .left_margin = 46,
419 .upper_margin = 1, 419 .right_margin = 125,
420 .lower_margin = 0, 420 .vsync_len = 3,
421 .sync = 0, 421 .upper_margin = 1,
422 .lccr0 = LCCR0_Color | LCCR0_Sngl | LCCR0_Act | LCCR0_LDDALT | LCCR0_OUC | LCCR0_CMDIM | LCCR0_RDSTM, 422 .lower_margin = 0,
423 .lccr3 = LCCR3_PixRsEdg | LCCR3_OutEnH, 423 .sync = 0,
424 .pxafb_lcd_power = spitz_lcd_power, 424},{
425 .pixclock = 134617,
426 .xres = 240,
427 .yres = 320,
428 .bpp = 16,
429 .hsync_len = 20,
430 .left_margin = 20,
431 .right_margin = 46,
432 .vsync_len = 2,
433 .upper_margin = 1,
434 .lower_margin = 0,
435 .sync = 0,
436},
437};
438
439static struct pxafb_mach_info spitz_pxafb_info = {
440 .modes = &spitz_pxafb_modes[0],
441 .num_modes = 2,
442 .fixed_modes = 1,
443 .lccr0 = LCCR0_Color | LCCR0_Sngl | LCCR0_Act | LCCR0_LDDALT | LCCR0_OUC | LCCR0_CMDIM | LCCR0_RDSTM,
444 .lccr3 = LCCR3_PixRsEdg | LCCR3_OutEnH,
445 .pxafb_lcd_power = spitz_lcd_power,
425}; 446};
426 447
427 448
diff --git a/arch/arm/mach-pxa/trizeps4.c b/arch/arm/mach-pxa/trizeps4.c
index 7c3007df1bd6..910571e9a190 100644
--- a/arch/arm/mach-pxa/trizeps4.c
+++ b/arch/arm/mach-pxa/trizeps4.c
@@ -368,7 +368,7 @@ static struct map_desc trizeps4_io_desc[] __initdata = {
368 } 368 }
369}; 369};
370 370
371static struct pxafb_mach_info sharp_lcd __initdata = { 371static struct pxafb_mode_info sharp_lcd_mode = {
372 .pixclock = 78000, 372 .pixclock = 78000,
373 .xres = 640, 373 .xres = 640,
374 .yres = 480, 374 .yres = 480,
@@ -381,6 +381,11 @@ static struct pxafb_mach_info sharp_lcd __initdata = {
381 .lower_margin = 0, 381 .lower_margin = 0,
382 .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT, 382 .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
383 .cmap_greyscale = 0, 383 .cmap_greyscale = 0,
384};
385
386static struct pxafb_mach_info sharp_lcd = {
387 .modes = &sharp_lcd_mode,
388 .num_modes = 1,
384 .cmap_inverse = 0, 389 .cmap_inverse = 0,
385 .cmap_static = 0, 390 .cmap_static = 0,
386 .lccr0 = LCCR0_Color | LCCR0_Pas | LCCR0_Dual, 391 .lccr0 = LCCR0_Color | LCCR0_Pas | LCCR0_Dual,
diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c
index e566cbe4b222..f866bf6b97d4 100644
--- a/arch/arm/mm/mmu.c
+++ b/arch/arm/mm/mmu.c
@@ -27,7 +27,7 @@
27 27
28DEFINE_PER_CPU(struct mmu_gather, mmu_gathers); 28DEFINE_PER_CPU(struct mmu_gather, mmu_gathers);
29 29
30extern void _stext, __data_start, _end; 30extern void _stext, _etext, __data_start, _end;
31extern pgd_t swapper_pg_dir[PTRS_PER_PGD]; 31extern pgd_t swapper_pg_dir[PTRS_PER_PGD];
32 32
33/* 33/*
diff --git a/arch/arm/oprofile/op_model_xscale.c b/arch/arm/oprofile/op_model_xscale.c
index 6576143f2559..726ad2b3b435 100644
--- a/arch/arm/oprofile/op_model_xscale.c
+++ b/arch/arm/oprofile/op_model_xscale.c
@@ -33,9 +33,6 @@
33#define PMU_CNT64 0x008 /* Make CCNT count every 64th cycle */ 33#define PMU_CNT64 0x008 /* Make CCNT count every 64th cycle */
34 34
35/* TODO do runtime detection */ 35/* TODO do runtime detection */
36#ifdef CONFIG_ARCH_IOP310
37#define XSCALE_PMU_IRQ IRQ_XS80200_PMU
38#endif
39#ifdef CONFIG_ARCH_IOP32X 36#ifdef CONFIG_ARCH_IOP32X
40#define XSCALE_PMU_IRQ IRQ_IOP32X_CORE_PMU 37#define XSCALE_PMU_IRQ IRQ_IOP32X_CORE_PMU
41#endif 38#endif
diff --git a/drivers/video/pxafb.c b/drivers/video/pxafb.c
index bbb07106cd54..3bc5da4a57ca 100644
--- a/drivers/video/pxafb.c
+++ b/drivers/video/pxafb.c
@@ -59,7 +59,7 @@
59#define LCCR3_INVALID_CONFIG_MASK (LCCR3_HSP|LCCR3_VSP|LCCR3_PCD|LCCR3_BPP) 59#define LCCR3_INVALID_CONFIG_MASK (LCCR3_HSP|LCCR3_VSP|LCCR3_PCD|LCCR3_BPP)
60 60
61static void (*pxafb_backlight_power)(int); 61static void (*pxafb_backlight_power)(int);
62static void (*pxafb_lcd_power)(int); 62static void (*pxafb_lcd_power)(int, struct fb_var_screeninfo *);
63 63
64static int pxafb_activate_var(struct fb_var_screeninfo *var, struct pxafb_info *); 64static int pxafb_activate_var(struct fb_var_screeninfo *var, struct pxafb_info *);
65static void set_ctrlr_state(struct pxafb_info *fbi, u_int state); 65static void set_ctrlr_state(struct pxafb_info *fbi, u_int state);
@@ -214,6 +214,48 @@ extern unsigned int get_clk_frequency_khz(int info);
214#endif 214#endif
215 215
216/* 216/*
217 * Select the smallest mode that allows the desired resolution to be
218 * displayed. If desired parameters can be rounded up.
219 */
220static struct pxafb_mode_info *pxafb_getmode(struct pxafb_mach_info *mach, struct fb_var_screeninfo *var)
221{
222 struct pxafb_mode_info *mode = NULL;
223 struct pxafb_mode_info *modelist = mach->modes;
224 unsigned int best_x = 0xffffffff, best_y = 0xffffffff;
225 unsigned int i;
226
227 for (i = 0 ; i < mach->num_modes ; i++) {
228 if (modelist[i].xres >= var->xres && modelist[i].yres >= var->yres &&
229 modelist[i].xres < best_x && modelist[i].yres < best_y &&
230 modelist[i].bpp >= var->bits_per_pixel ) {
231 best_x = modelist[i].xres;
232 best_y = modelist[i].yres;
233 mode = &modelist[i];
234 }
235 }
236
237 return mode;
238}
239
240static void pxafb_setmode(struct fb_var_screeninfo *var, struct pxafb_mode_info *mode)
241{
242 var->xres = mode->xres;
243 var->yres = mode->yres;
244 var->bits_per_pixel = mode->bpp;
245 var->pixclock = mode->pixclock;
246 var->hsync_len = mode->hsync_len;
247 var->left_margin = mode->left_margin;
248 var->right_margin = mode->right_margin;
249 var->vsync_len = mode->vsync_len;
250 var->upper_margin = mode->upper_margin;
251 var->lower_margin = mode->lower_margin;
252 var->sync = mode->sync;
253 var->grayscale = mode->cmap_greyscale;
254 var->xres_virtual = var->xres;
255 var->yres_virtual = var->yres;
256}
257
258/*
217 * pxafb_check_var(): 259 * pxafb_check_var():
218 * Get the video params out of 'var'. If a value doesn't fit, round it up, 260 * Get the video params out of 'var'. If a value doesn't fit, round it up,
219 * if it's too big, return -EINVAL. 261 * if it's too big, return -EINVAL.
@@ -225,15 +267,29 @@ extern unsigned int get_clk_frequency_khz(int info);
225static int pxafb_check_var(struct fb_var_screeninfo *var, struct fb_info *info) 267static int pxafb_check_var(struct fb_var_screeninfo *var, struct fb_info *info)
226{ 268{
227 struct pxafb_info *fbi = (struct pxafb_info *)info; 269 struct pxafb_info *fbi = (struct pxafb_info *)info;
270 struct pxafb_mach_info *inf = fbi->dev->platform_data;
228 271
229 if (var->xres < MIN_XRES) 272 if (var->xres < MIN_XRES)
230 var->xres = MIN_XRES; 273 var->xres = MIN_XRES;
231 if (var->yres < MIN_YRES) 274 if (var->yres < MIN_YRES)
232 var->yres = MIN_YRES; 275 var->yres = MIN_YRES;
233 if (var->xres > fbi->max_xres) 276
234 return -EINVAL; 277 if (inf->fixed_modes) {
235 if (var->yres > fbi->max_yres) 278 struct pxafb_mode_info *mode;
236 return -EINVAL; 279
280 mode = pxafb_getmode(inf, var);
281 if (!mode)
282 return -EINVAL;
283 pxafb_setmode(var, mode);
284 } else {
285 if (var->xres > inf->modes->xres)
286 return -EINVAL;
287 if (var->yres > inf->modes->yres)
288 return -EINVAL;
289 if (var->bits_per_pixel > inf->modes->bpp)
290 return -EINVAL;
291 }
292
237 var->xres_virtual = 293 var->xres_virtual =
238 max(var->xres_virtual, var->xres); 294 max(var->xres_virtual, var->xres);
239 var->yres_virtual = 295 var->yres_virtual =
@@ -693,7 +749,7 @@ static inline void __pxafb_lcd_power(struct pxafb_info *fbi, int on)
693 pr_debug("pxafb: LCD power o%s\n", on ? "n" : "ff"); 749 pr_debug("pxafb: LCD power o%s\n", on ? "n" : "ff");
694 750
695 if (pxafb_lcd_power) 751 if (pxafb_lcd_power)
696 pxafb_lcd_power(on); 752 pxafb_lcd_power(on, &fbi->fb.var);
697} 753}
698 754
699static void pxafb_setup_gpio(struct pxafb_info *fbi) 755static void pxafb_setup_gpio(struct pxafb_info *fbi)
@@ -869,9 +925,11 @@ static void set_ctrlr_state(struct pxafb_info *fbi, u_int state)
869 * registers. 925 * registers.
870 */ 926 */
871 if (old_state == C_ENABLE) { 927 if (old_state == C_ENABLE) {
928 __pxafb_lcd_power(fbi, 0);
872 pxafb_disable_controller(fbi); 929 pxafb_disable_controller(fbi);
873 pxafb_setup_gpio(fbi); 930 pxafb_setup_gpio(fbi);
874 pxafb_enable_controller(fbi); 931 pxafb_enable_controller(fbi);
932 __pxafb_lcd_power(fbi, 1);
875 } 933 }
876 break; 934 break;
877 935
@@ -1049,6 +1107,8 @@ static struct pxafb_info * __init pxafb_init_fbinfo(struct device *dev)
1049 struct pxafb_info *fbi; 1107 struct pxafb_info *fbi;
1050 void *addr; 1108 void *addr;
1051 struct pxafb_mach_info *inf = dev->platform_data; 1109 struct pxafb_mach_info *inf = dev->platform_data;
1110 struct pxafb_mode_info *mode = inf->modes;
1111 int i, smemlen;
1052 1112
1053 /* Alloc the pxafb_info and pseudo_palette in one step */ 1113 /* Alloc the pxafb_info and pseudo_palette in one step */
1054 fbi = kmalloc(sizeof(struct pxafb_info) + sizeof(u32) * 16, GFP_KERNEL); 1114 fbi = kmalloc(sizeof(struct pxafb_info) + sizeof(u32) * 16, GFP_KERNEL);
@@ -1082,31 +1142,21 @@ static struct pxafb_info * __init pxafb_init_fbinfo(struct device *dev)
1082 addr = addr + sizeof(struct pxafb_info); 1142 addr = addr + sizeof(struct pxafb_info);
1083 fbi->fb.pseudo_palette = addr; 1143 fbi->fb.pseudo_palette = addr;
1084 1144
1085 fbi->max_xres = inf->xres; 1145 pxafb_setmode(&fbi->fb.var, mode);
1086 fbi->fb.var.xres = inf->xres; 1146
1087 fbi->fb.var.xres_virtual = inf->xres;
1088 fbi->max_yres = inf->yres;
1089 fbi->fb.var.yres = inf->yres;
1090 fbi->fb.var.yres_virtual = inf->yres;
1091 fbi->max_bpp = inf->bpp;
1092 fbi->fb.var.bits_per_pixel = inf->bpp;
1093 fbi->fb.var.pixclock = inf->pixclock;
1094 fbi->fb.var.hsync_len = inf->hsync_len;
1095 fbi->fb.var.left_margin = inf->left_margin;
1096 fbi->fb.var.right_margin = inf->right_margin;
1097 fbi->fb.var.vsync_len = inf->vsync_len;
1098 fbi->fb.var.upper_margin = inf->upper_margin;
1099 fbi->fb.var.lower_margin = inf->lower_margin;
1100 fbi->fb.var.sync = inf->sync;
1101 fbi->fb.var.grayscale = inf->cmap_greyscale;
1102 fbi->cmap_inverse = inf->cmap_inverse; 1147 fbi->cmap_inverse = inf->cmap_inverse;
1103 fbi->cmap_static = inf->cmap_static; 1148 fbi->cmap_static = inf->cmap_static;
1149
1104 fbi->lccr0 = inf->lccr0; 1150 fbi->lccr0 = inf->lccr0;
1105 fbi->lccr3 = inf->lccr3; 1151 fbi->lccr3 = inf->lccr3;
1106 fbi->state = C_STARTUP; 1152 fbi->state = C_STARTUP;
1107 fbi->task_state = (u_char)-1; 1153 fbi->task_state = (u_char)-1;
1108 fbi->fb.fix.smem_len = fbi->max_xres * fbi->max_yres * 1154
1109 fbi->max_bpp / 8; 1155 for (i = 0; i < inf->num_modes; i++) {
1156 smemlen = mode[i].xres * mode[i].yres * mode[i].bpp / 8;
1157 if (smemlen > fbi->fb.fix.smem_len)
1158 fbi->fb.fix.smem_len = smemlen;
1159 }
1110 1160
1111 init_waitqueue_head(&fbi->ctrlr_wait); 1161 init_waitqueue_head(&fbi->ctrlr_wait);
1112 INIT_WORK(&fbi->task, pxafb_task, fbi); 1162 INIT_WORK(&fbi->task, pxafb_task, fbi);
@@ -1307,12 +1357,12 @@ int __init pxafb_probe(struct platform_device *dev)
1307 (inf->lccr0 & LCCR0_SDS) == LCCR0_Dual) 1357 (inf->lccr0 & LCCR0_SDS) == LCCR0_Dual)
1308 dev_warn(&dev->dev, "Dual panel only valid in passive mode\n"); 1358 dev_warn(&dev->dev, "Dual panel only valid in passive mode\n");
1309 if ((inf->lccr0 & LCCR0_PAS) == LCCR0_Pas && 1359 if ((inf->lccr0 & LCCR0_PAS) == LCCR0_Pas &&
1310 (inf->upper_margin || inf->lower_margin)) 1360 (inf->modes->upper_margin || inf->modes->lower_margin))
1311 dev_warn(&dev->dev, "Upper and lower margins must be 0 in passive mode\n"); 1361 dev_warn(&dev->dev, "Upper and lower margins must be 0 in passive mode\n");
1312#endif 1362#endif
1313 1363
1314 dev_dbg(&dev->dev, "got a %dx%dx%d LCD\n",inf->xres, inf->yres, inf->bpp); 1364 dev_dbg(&dev->dev, "got a %dx%dx%d LCD\n",inf->modes->xres, inf->modes->yres, inf->modes->bpp);
1315 if (inf->xres == 0 || inf->yres == 0 || inf->bpp == 0) { 1365 if (inf->modes->xres == 0 || inf->modes->yres == 0 || inf->modes->bpp == 0) {
1316 dev_err(&dev->dev, "Invalid resolution or bit depth\n"); 1366 dev_err(&dev->dev, "Invalid resolution or bit depth\n");
1317 ret = -EINVAL; 1367 ret = -EINVAL;
1318 goto failed; 1368 goto failed;
diff --git a/drivers/video/pxafb.h b/drivers/video/pxafb.h
index 47f41f70db7a..7499a1c4bf79 100644
--- a/drivers/video/pxafb.h
+++ b/drivers/video/pxafb.h
@@ -41,10 +41,6 @@ struct pxafb_info {
41 struct fb_info fb; 41 struct fb_info fb;
42 struct device *dev; 42 struct device *dev;
43 43
44 u_int max_bpp;
45 u_int max_xres;
46 u_int max_yres;
47
48 /* 44 /*
49 * These are the addresses we mapped 45 * These are the addresses we mapped
50 * the framebuffer memory region to. 46 * the framebuffer memory region to.
diff --git a/include/asm-arm/arch-pxa/pxafb.h b/include/asm-arm/arch-pxa/pxafb.h
index aba9b30f4249..81c3928d608c 100644
--- a/include/asm-arm/arch-pxa/pxafb.h
+++ b/include/asm-arm/arch-pxa/pxafb.h
@@ -12,12 +12,14 @@
12 * published by the Free Software Foundation. 12 * published by the Free Software Foundation.
13 */ 13 */
14 14
15#include <linux/fb.h>
16
15/* 17/*
16 * This structure describes the machine which we are running on. 18 * This structure describes the machine which we are running on.
17 * It is set in linux/arch/arm/mach-pxa/machine_name.c and used in the probe routine 19 * It is set in linux/arch/arm/mach-pxa/machine_name.c and used in the probe routine
18 * of linux/drivers/video/pxafb.c 20 * of linux/drivers/video/pxafb.c
19 */ 21 */
20struct pxafb_mach_info { 22struct pxafb_mode_info {
21 u_long pixclock; 23 u_long pixclock;
22 24
23 u_short xres; 25 u_short xres;
@@ -34,6 +36,14 @@ struct pxafb_mach_info {
34 u_char sync; 36 u_char sync;
35 37
36 u_int cmap_greyscale:1, 38 u_int cmap_greyscale:1,
39 unused:31;
40};
41
42struct pxafb_mach_info {
43 struct pxafb_mode_info *modes;
44 unsigned int num_modes;
45
46 u_int fixed_modes:1,
37 cmap_inverse:1, 47 cmap_inverse:1,
38 cmap_static:1, 48 cmap_static:1,
39 unused:29; 49 unused:29;
@@ -62,7 +72,7 @@ struct pxafb_mach_info {
62 u_int lccr3; 72 u_int lccr3;
63 73
64 void (*pxafb_backlight_power)(int); 74 void (*pxafb_backlight_power)(int);
65 void (*pxafb_lcd_power)(int); 75 void (*pxafb_lcd_power)(int, struct fb_var_screeninfo *);
66 76
67}; 77};
68void set_pxa_fb_info(struct pxafb_mach_info *hard_pxa_fb_info); 78void set_pxa_fb_info(struct pxafb_mach_info *hard_pxa_fb_info);
diff --git a/include/asm-arm/arch-pxa/spitz.h b/include/asm-arm/arch-pxa/spitz.h
index 62e1fe4d025f..4953dd324d4d 100644
--- a/include/asm-arm/arch-pxa/spitz.h
+++ b/include/asm-arm/arch-pxa/spitz.h
@@ -15,6 +15,8 @@
15#define __ASM_ARCH_SPITZ_H 1 15#define __ASM_ARCH_SPITZ_H 1
16#endif 16#endif
17 17
18#include <linux/fb.h>
19
18/* Spitz/Akita GPIOs */ 20/* Spitz/Akita GPIOs */
19 21
20#define SPITZ_GPIO_KEY_INT (0) /* Key Interrupt */ 22#define SPITZ_GPIO_KEY_INT (0) /* Key Interrupt */
@@ -155,4 +157,4 @@ extern struct platform_device spitzscoop2_device;
155extern struct platform_device spitzssp_device; 157extern struct platform_device spitzssp_device;
156extern struct sharpsl_charger_machinfo spitz_pm_machinfo; 158extern struct sharpsl_charger_machinfo spitz_pm_machinfo;
157 159
158extern void spitz_lcd_power(int on); 160extern void spitz_lcd_power(int on, struct fb_var_screeninfo *var);
diff --git a/include/asm-arm/timeofday.h b/include/asm-arm/timeofday.h
deleted file mode 100644
index 27254bd5b94f..000000000000
--- a/include/asm-arm/timeofday.h
+++ /dev/null
@@ -1,4 +0,0 @@
1#ifndef _ASM_ARM_TIMEOFDAY_H
2#define _ASM_ARM_TIMEOFDAY_H
3#include <asm-generic/timeofday.h>
4#endif