1 /* MN103E010 Processor 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>
15 * initialise the on-silicon processor peripherals
17 asmlinkage
void __init
processor_init(void)
21 /* set up the exception table first */
22 for (loop
= 0x000; loop
< 0x400; loop
+= 8)
23 __set_intr_stub(loop
, __common_exception
);
25 __set_intr_stub(EXCEP_ITLBMISS
, itlb_miss
);
26 __set_intr_stub(EXCEP_DTLBMISS
, dtlb_miss
);
27 __set_intr_stub(EXCEP_IAERROR
, itlb_aerror
);
28 __set_intr_stub(EXCEP_DAERROR
, dtlb_aerror
);
29 __set_intr_stub(EXCEP_BUSERROR
, raw_bus_error
);
30 __set_intr_stub(EXCEP_DOUBLE_FAULT
, double_fault
);
31 __set_intr_stub(EXCEP_SYSCALL0
, system_call
);
33 __set_intr_stub(EXCEP_NMI
, nmi_handler
);
34 __set_intr_stub(EXCEP_WDT
, nmi_handler
);
35 __set_intr_stub(EXCEP_IRQ_LEVEL0
, irq_handler
);
36 __set_intr_stub(EXCEP_IRQ_LEVEL1
, irq_handler
);
37 __set_intr_stub(EXCEP_IRQ_LEVEL2
, irq_handler
);
38 __set_intr_stub(EXCEP_IRQ_LEVEL3
, irq_handler
);
39 __set_intr_stub(EXCEP_IRQ_LEVEL4
, irq_handler
);
40 __set_intr_stub(EXCEP_IRQ_LEVEL5
, irq_handler
);
41 __set_intr_stub(EXCEP_IRQ_LEVEL6
, irq_handler
);
43 IVAR0
= EXCEP_IRQ_LEVEL0
;
44 IVAR1
= EXCEP_IRQ_LEVEL1
;
45 IVAR2
= EXCEP_IRQ_LEVEL2
;
46 IVAR3
= EXCEP_IRQ_LEVEL3
;
47 IVAR4
= EXCEP_IRQ_LEVEL4
;
48 IVAR5
= EXCEP_IRQ_LEVEL5
;
49 IVAR6
= EXCEP_IRQ_LEVEL6
;
51 mn10300_dcache_flush_inv();
54 /* disable all interrupts and set to priority 6 (lowest) */
55 for (loop
= 0; loop
< NR_IRQS
; loop
++)
56 GxICR(loop
) = GxICR_LEVEL_6
| GxICR_DETECT
;
58 /* clear the timers */