powerpc/cell: Drop cbe-oss-dev mailing list from MAINTAINERS
[linux/fpc-iii.git] / arch / mn10300 / unit-asb2303 / unit-init.c
blob834a76aa551a06d37ceeae41d2b2d65f7b33409b
1 /* ASB2303 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.
12 #include <linux/kernel.h>
13 #include <linux/param.h>
14 #include <linux/init.h>
15 #include <linux/device.h>
17 #include <asm/io.h>
18 #include <asm/setup.h>
19 #include <asm/processor.h>
20 #include <asm/irq.h>
21 #include <asm/intctl-regs.h>
24 * initialise some of the unit hardware before gdbstub is set up
26 asmlinkage void __init unit_init(void)
28 /* set up the external interrupts */
29 SET_XIRQ_TRIGGER(0, XIRQ_TRIGGER_HILEVEL);
30 SET_XIRQ_TRIGGER(2, XIRQ_TRIGGER_LOWLEVEL);
31 SET_XIRQ_TRIGGER(3, XIRQ_TRIGGER_HILEVEL);
32 SET_XIRQ_TRIGGER(4, XIRQ_TRIGGER_LOWLEVEL);
33 SET_XIRQ_TRIGGER(5, XIRQ_TRIGGER_LOWLEVEL);
35 #ifdef CONFIG_EXT_SERIAL_IRQ_LEVEL
36 set_intr_level(XIRQ0, NUM2GxICR_LEVEL(CONFIG_EXT_SERIAL_IRQ_LEVEL));
37 #endif
39 #ifdef CONFIG_ETHERNET_IRQ_LEVEL
40 set_intr_level(XIRQ3, NUM2GxICR_LEVEL(CONFIG_ETHERNET_IRQ_LEVEL));
41 #endif
45 * initialise the rest of the unit hardware after gdbstub is ready
47 void __init unit_setup(void)
52 * initialise the external interrupts used by a unit of this type
54 void __init unit_init_IRQ(void)
56 unsigned int extnum;
58 for (extnum = 0; extnum < NR_XIRQS; extnum++) {
59 switch (GET_XIRQ_TRIGGER(extnum)) {
60 case XIRQ_TRIGGER_HILEVEL:
61 case XIRQ_TRIGGER_LOWLEVEL:
62 mn10300_set_lateack_irq_type(XIRQ2IRQ(extnum));
63 break;
64 default:
65 break;