20 #include <linux/sched.h>
21 #include <linux/bitops.h>
28 #include <asm/types.h>
29 #include <asm/setup.h>
30 #include <asm/memory.h>
32 #include <mach/hardware.h>
34 #include <asm/sizes.h>
53 static unsigned long lpd270_pin_config[]
__initdata = {
95 static unsigned int lpd270_irq_enabled;
97 static void lpd270_mask_irq(
struct irq_data *
d)
103 lpd270_irq_enabled &= ~(1 << lpd270_irq);
107 static void lpd270_unmask_irq(
struct irq_data *d)
111 lpd270_irq_enabled |= 1 << lpd270_irq;
115 static struct irq_chip lpd270_irq_chip = {
117 .irq_ack = lpd270_mask_irq,
118 .irq_mask = lpd270_mask_irq,
119 .irq_unmask = lpd270_unmask_irq,
122 static void lpd270_irq_handler(
unsigned int irq,
struct irq_desc *
desc)
124 unsigned long pending;
140 static void __init lpd270_init_irq(
void)
151 irq_set_chip_and_handler(irq, &lpd270_irq_chip,
161 static void lpd270_irq_resume(
void)
166 static struct syscore_ops lpd270_irq_syscore_ops = {
167 .
resume = lpd270_irq_resume,
170 static int __init lpd270_irq_device_init(
void)
172 if (machine_is_logicpd_pxa270()) {
183 static struct resource smc91x_resources[] = {
199 .num_resources =
ARRAY_SIZE(smc91x_resources),
200 .resource = smc91x_resources,
203 static struct resource lpd270_flash_resources[] = {
218 .name =
"Bootloader",
225 .offset = 0x00040000,
227 .name =
"Filesystem",
235 .name =
"processor-flash",
236 .map_name =
"cfi_probe",
237 .parts = lpd270_flash0_partitions,
238 .nr_parts =
ARRAY_SIZE(lpd270_flash0_partitions),
240 .name =
"mainboard-flash",
241 .map_name =
"cfi_probe",
249 .name =
"pxa2xx-flash",
252 .platform_data = &lpd270_flash_data[0],
254 .resource = &lpd270_flash_resources[0],
257 .
name =
"pxa2xx-flash",
260 .platform_data = &lpd270_flash_data[1],
262 .resource = &lpd270_flash_resources[1],
271 .pwm_period_ns = 78770,
275 .name =
"pwm-backlight",
278 .platform_data = &lpd270_backlight_data,
290 .right_margin = 0x0a,
292 .upper_margin = 0x08,
293 .lower_margin = 0x14,
298 .modes = &sharp_lq057q3dc02_mode,
312 .right_margin = 0x05,
314 .upper_margin = 0x14,
315 .lower_margin = 0x0a,
320 .modes = &sharp_lq121s1dg31_mode,
334 .right_margin = 0x0a,
336 .upper_margin = 0x03,
337 .lower_margin = 0x03,
342 .modes = &sharp_lq036q1da01_mode,
356 .right_margin = 0x19,
358 .upper_margin = 0x22,
359 .lower_margin = 0x00,
364 .modes = &sharp_lq64d343_mode,
378 .right_margin = 0x19,
380 .upper_margin = 0x22,
381 .lower_margin = 0x00,
386 .modes = &sharp_lq10d368_mode,
400 .right_margin = 0x0a,
402 .upper_margin = 0x05,
403 .lower_margin = 0x14,
408 .modes = &sharp_lq035q7db02_20_mode,
416 static int __init lpd270_set_lcd(
char *
str)
418 if (!
strnicmp(str,
"lq057q3dc02", 11)) {
419 lpd270_lcd_to_use = &sharp_lq057q3dc02;
420 }
else if (!
strnicmp(str,
"lq121s1dg31", 11)) {
421 lpd270_lcd_to_use = &sharp_lq121s1dg31;
422 }
else if (!
strnicmp(str,
"lq036q1da01", 11)) {
423 lpd270_lcd_to_use = &sharp_lq036q1da01;
424 }
else if (!
strnicmp(str,
"lq64d343", 8)) {
425 lpd270_lcd_to_use = &sharp_lq64d343;
426 }
else if (!
strnicmp(str,
"lq10d368", 8)) {
427 lpd270_lcd_to_use = &sharp_lq10d368;
428 }
else if (!
strnicmp(str,
"lq035q7db02-20", 14)) {
429 lpd270_lcd_to_use = &sharp_lq035q7db02_20;
437 __setup(
"lcd=", lpd270_set_lcd);
441 &lpd270_backlight_device,
442 &lpd270_flash_device[0],
443 &lpd270_flash_device[1],
451 static void __init lpd270_init(
void)
460 lpd270_flash_data[1].
width = 4;
473 if (lpd270_lcd_to_use !=
NULL)
480 static struct map_desc lpd270_io_desc[] __initdata = {
489 static void __init lpd270_map_io(
void)
501 .atag_offset = 0x100,
502 .map_io = lpd270_map_io,
504 .init_irq = lpd270_init_irq,
507 .init_machine = lpd270_init,