[S390] kernel: Add z/VM LGR detection
[linux/fpc-iii.git] / arch / mn10300 / unit-asb2305 / unit-init.c
blobe1becd6b757132bd5664e82c5a676250ad660c3a
1 /* ASB2305 Initialisation
3 * Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
4 * Written by David Howells (dhowells@redhat.com)
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public Licence
8 * as published by the Free Software Foundation; either version
9 * 2 of the Licence, or (at your option) any later version.
11 #include <linux/kernel.h>
12 #include <linux/param.h>
13 #include <linux/init.h>
14 #include <linux/pci.h>
15 #include <asm/io.h>
16 #include <asm/setup.h>
17 #include <asm/processor.h>
18 #include <asm/intctl-regs.h>
19 #include <asm/serial-regs.h>
20 #include <unit/serial.h>
23 * initialise some of the unit hardware before gdbstub is set up
25 asmlinkage void __init unit_init(void)
27 #ifndef CONFIG_GDBSTUB_ON_TTYSx
28 /* set the 16550 interrupt line to level 3 if not being used for GDB */
29 #ifdef CONFIG_EXT_SERIAL_IRQ_LEVEL
30 set_intr_level(XIRQ0, NUM2GxICR_LEVEL(CONFIG_EXT_SERIAL_IRQ_LEVEL));
31 #endif
32 #endif /* CONFIG_GDBSTUB_ON_TTYSx */
36 * initialise the rest of the unit hardware after gdbstub is ready
38 void __init unit_setup(void)
40 #ifdef CONFIG_PCI
41 unit_pci_init();
42 #endif
46 * initialise the external interrupts used by a unit of this type
48 void __init unit_init_IRQ(void)
50 unsigned int extnum;
52 for (extnum = 0; extnum < NR_XIRQS; extnum++) {
53 switch (GET_XIRQ_TRIGGER(extnum)) {
54 case XIRQ_TRIGGER_HILEVEL:
55 case XIRQ_TRIGGER_LOWLEVEL:
56 mn10300_set_lateack_irq_type(XIRQ2IRQ(extnum));
57 break;
58 default:
59 break;