blob: 630f62f69a367e4b3c050ff31e45992403f648fc [file] [log] [blame]
Jamie Lenehana09749d2006-09-27 15:05:39 +09001/*
Jamie Lenehanea0f8fe2006-12-06 12:05:02 +09002 * arch/sh/boards/titan/setup.c - Setup for Titan
3 *
4 * Copyright (C) 2006 Jamie Lenehan
5 *
6 * This file is subject to the terms and conditions of the GNU General Public
7 * License. See the file "COPYING" in the main directory of this archive
8 * for more details.
Jamie Lenehana09749d2006-09-27 15:05:39 +09009 */
Jamie Lenehana09749d2006-09-27 15:05:39 +090010#include <linux/init.h>
Jamie Lenehanea0f8fe2006-12-06 12:05:02 +090011#include <linux/irq.h>
Jamie Lenehana09749d2006-09-27 15:05:39 +090012#include <asm/titan.h>
13#include <asm/io.h>
14
Jamie Lenehanbd71ab82006-10-31 12:35:02 +090015static struct ipr_data titan_ipr_map[] = {
Jamie Lenehanea0f8fe2006-12-06 12:05:02 +090016 /* IRQ, IPR idx, shift, prio */
17 { TITAN_IRQ_WAN, 3, 12, 8 }, /* eth0 (WAN) */
18 { TITAN_IRQ_LAN, 3, 8, 8 }, /* eth1 (LAN) */
19 { TITAN_IRQ_MPCIA, 3, 4, 8 }, /* mPCI A (top) */
20 { TITAN_IRQ_USB, 3, 0, 8 }, /* mPCI B (bottom), USB */
Jamie Lenehanbd71ab82006-10-31 12:35:02 +090021};
22
Jamie Lenehana09749d2006-09-27 15:05:39 +090023static void __init init_titan_irq(void)
24{
25 /* enable individual interrupt mode for externals */
Jamie Lenehanea0f8fe2006-12-06 12:05:02 +090026 ipr_irq_enable_irlm();
27 /* register ipr irqs */
Jamie Lenehanbd71ab82006-10-31 12:35:02 +090028 make_ipr_irq(titan_ipr_map, ARRAY_SIZE(titan_ipr_map));
Jamie Lenehana09749d2006-09-27 15:05:39 +090029}
30
Paul Mundt82f81f42007-05-15 15:19:34 +090031static struct sh_machine_vector mv_titan __initmv = {
Paul Mundt2c7834a2006-09-27 18:17:31 +090032 .mv_name = "Titan",
Jamie Lenehana09749d2006-09-27 15:05:39 +090033
34 .mv_inb = titan_inb,
35 .mv_inw = titan_inw,
36 .mv_inl = titan_inl,
37 .mv_outb = titan_outb,
38 .mv_outw = titan_outw,
39 .mv_outl = titan_outl,
40
41 .mv_inb_p = titan_inb_p,
42 .mv_inw_p = titan_inw,
43 .mv_inl_p = titan_inl,
44 .mv_outb_p = titan_outb_p,
45 .mv_outw_p = titan_outw,
46 .mv_outl_p = titan_outl,
47
48 .mv_insl = titan_insl,
49 .mv_outsl = titan_outsl,
50
Jamie Lenehana09749d2006-09-27 15:05:39 +090051 .mv_ioport_map = titan_ioport_map,
52
53 .mv_init_irq = init_titan_irq,
Jamie Lenehana09749d2006-09-27 15:05:39 +090054};