aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/i8259.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/kernel/i8259.c')
-rw-r--r--arch/x86/kernel/i8259.c43
1 files changed, 43 insertions, 0 deletions
diff --git a/arch/x86/kernel/i8259.c b/arch/x86/kernel/i8259.c
index df89102bef8..b80987ca33e 100644
--- a/arch/x86/kernel/i8259.c
+++ b/arch/x86/kernel/i8259.c
@@ -358,3 +358,46 @@ void init_8259A(int auto_eoi)
358 358
359 spin_unlock_irqrestore(&i8259A_lock, flags); 359 spin_unlock_irqrestore(&i8259A_lock, flags);
360} 360}
361/*
362 * make i8259 a driver so that we can select pic functions at run time. the goal
363 * is to make x86 binary compatible among pc compatible and non-pc compatible
364 * platforms, such as x86 MID.
365 */
366
367static void __init legacy_pic_noop(void) { };
368static void __init legacy_pic_uint_noop(unsigned int unused) { };
369static void __init legacy_pic_int_noop(int unused) { };
370
371static struct irq_chip dummy_pic_chip = {
372 .name = "dummy pic",
373 .mask = legacy_pic_uint_noop,
374 .unmask = legacy_pic_uint_noop,
375 .disable = legacy_pic_uint_noop,
376 .mask_ack = legacy_pic_uint_noop,
377};
378static int legacy_pic_irq_pending_noop(unsigned int irq)
379{
380 return 0;
381}
382
383struct legacy_pic null_legacy_pic = {
384 .nr_legacy_irqs = 0,
385 .chip = &dummy_pic_chip,
386 .mask_all = legacy_pic_noop,
387 .restore_mask = legacy_pic_noop,
388 .init = legacy_pic_int_noop,
389 .irq_pending = legacy_pic_irq_pending_noop,
390 .make_irq = legacy_pic_uint_noop,
391};
392
393struct legacy_pic default_legacy_pic = {
394 .nr_legacy_irqs = NR_IRQS_LEGACY,
395 .chip = &i8259A_chip,
396 .mask_all = mask_8259A,
397 .restore_mask = unmask_8259A,
398 .init = init_8259A,
399 .irq_pending = i8259A_irq_pending,
400 .make_irq = make_8259A_irq,
401};
402
403struct legacy_pic *legacy_pic = &default_legacy_pic;