2 * arch/v850/kernel/me2.c -- V850E/ME2 chip-specific support
4 * Copyright (C) 2003 NEC Corporation
5 * Copyright (C) 2003 Miles Bader <miles@gnu.org>
7 * This file is subject to the terms and conditions of the GNU General
8 * Public License. See the file COPYING in the main directory of this
9 * archive for more details.
11 * Written by Miles Bader <miles@gnu.org>
14 #include <linux/kernel.h>
15 #include <linux/init.h>
17 #include <linux/swap.h>
18 #include <linux/bootmem.h>
19 #include <linux/irq.h>
21 #include <asm/atomic.h>
23 #include <asm/machdep.h>
24 #include <asm/v850e_timer_d.h>
28 void __init mach_sched_init (struct irqaction *timer_action)
30 /* Start hardware timer. */
31 v850e_timer_d_configure (0, HZ);
32 /* Install timer interrupt handler. */
33 setup_irq (IRQ_INTCMD(0), timer_action);
36 static struct v850e_intc_irq_init irq_inits[] = {
37 { "IRQ", 0, NUM_CPU_IRQS, 1, 7 },
38 { "INTP", IRQ_INTP(0), IRQ_INTP_NUM, 1, 5 },
39 { "CMD", IRQ_INTCMD(0), IRQ_INTCMD_NUM, 1, 3 },
40 { "UBTIRE", IRQ_INTUBTIRE(0), IRQ_INTUBTIRE_NUM, 5, 4 },
41 { "UBTIR", IRQ_INTUBTIR(0), IRQ_INTUBTIR_NUM, 5, 4 },
42 { "UBTIT", IRQ_INTUBTIT(0), IRQ_INTUBTIT_NUM, 5, 4 },
43 { "UBTIF", IRQ_INTUBTIF(0), IRQ_INTUBTIF_NUM, 5, 4 },
44 { "UBTITO", IRQ_INTUBTITO(0), IRQ_INTUBTITO_NUM, 5, 4 },
47 #define NUM_IRQ_INITS (ARRAY_SIZE(irq_inits) - 1)
49 static struct hw_interrupt_type hw_itypes[NUM_IRQ_INITS];
51 /* Initialize V850E/ME2 chip interrupts. */
52 void __init me2_init_irqs (void)
54 v850e_intc_init_irq_types (irq_inits, hw_itypes);
57 /* Called before configuring an on-chip UART. */
58 void me2_uart_pre_configure (unsigned chan, unsigned cflags, unsigned baud)
61 /* Specify that the relevent pins on the chip should do
62 serial I/O, not direct I/O. */
64 /* Specify that we're using the UART, not the CSI device. */
66 } else if (chan == 1) {
67 /* Specify that the relevent pins on the chip should do
68 serial I/O, not direct I/O. */
70 /* Specify that we're using the UART, not the CSI device. */