aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/boards/titan
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2008-07-29 08:01:19 -0400
committerPaul Mundt <lethal@linux-sh.org>2008-07-29 08:01:19 -0400
commitda2014a2b080e7f3024a4eb6917d47069ad9620b (patch)
treecfde12c6d4b5baa222966b14a676f107992cf786 /arch/sh/boards/titan
parent71b8064e7df5698520d73b4c1566a3dbc98eb9ef (diff)
sh: Shuffle the board directories in to mach groups.
This flattens out the board directories in to individual mach groups, we will use this for getting rid of unneeded directories, simplifying the build system, and becoming more coherent with the refactored arch/sh/include topology. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/boards/titan')
-rw-r--r--arch/sh/boards/titan/Makefile5
-rw-r--r--arch/sh/boards/titan/io.c126
-rw-r--r--arch/sh/boards/titan/setup.c44
3 files changed, 0 insertions, 175 deletions
diff --git a/arch/sh/boards/titan/Makefile b/arch/sh/boards/titan/Makefile
deleted file mode 100644
index 08d753700062..000000000000
--- a/arch/sh/boards/titan/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
1#
2# Makefile for the Nimble Microsystems TITAN specific parts of the kernel
3#
4
5obj-y := setup.o io.o
diff --git a/arch/sh/boards/titan/io.c b/arch/sh/boards/titan/io.c
deleted file mode 100644
index 4730c1dd697d..000000000000
--- a/arch/sh/boards/titan/io.c
+++ /dev/null
@@ -1,126 +0,0 @@
1/*
2 * I/O routines for Titan
3 */
4#include <linux/pci.h>
5#include <asm/machvec.h>
6#include <asm/addrspace.h>
7#include <asm/titan.h>
8#include <asm/io.h>
9
10static inline unsigned int port2adr(unsigned int port)
11{
12 maybebadio((unsigned long)port);
13 return port;
14}
15
16u8 titan_inb(unsigned long port)
17{
18 if (PXSEG(port))
19 return ctrl_inb(port);
20 else if (is_pci_ioaddr(port))
21 return ctrl_inb(pci_ioaddr(port));
22 return ctrl_inw(port2adr(port)) & 0xff;
23}
24
25u8 titan_inb_p(unsigned long port)
26{
27 u8 v;
28
29 if (PXSEG(port))
30 v = ctrl_inb(port);
31 else if (is_pci_ioaddr(port))
32 v = ctrl_inb(pci_ioaddr(port));
33 else
34 v = ctrl_inw(port2adr(port)) & 0xff;
35 ctrl_delay();
36 return v;
37}
38
39u16 titan_inw(unsigned long port)
40{
41 if (PXSEG(port))
42 return ctrl_inw(port);
43 else if (is_pci_ioaddr(port))
44 return ctrl_inw(pci_ioaddr(port));
45 else if (port >= 0x2000)
46 return ctrl_inw(port2adr(port));
47 else
48 maybebadio(port);
49 return 0;
50}
51
52u32 titan_inl(unsigned long port)
53{
54 if (PXSEG(port))
55 return ctrl_inl(port);
56 else if (is_pci_ioaddr(port))
57 return ctrl_inl(pci_ioaddr(port));
58 else if (port >= 0x2000)
59 return ctrl_inw(port2adr(port));
60 else
61 maybebadio(port);
62 return 0;
63}
64
65void titan_outb(u8 value, unsigned long port)
66{
67 if (PXSEG(port))
68 ctrl_outb(value, port);
69 else if (is_pci_ioaddr(port))
70 ctrl_outb(value, pci_ioaddr(port));
71 else
72 ctrl_outw(value, port2adr(port));
73}
74
75void titan_outb_p(u8 value, unsigned long port)
76{
77 if (PXSEG(port))
78 ctrl_outb(value, port);
79 else if (is_pci_ioaddr(port))
80 ctrl_outb(value, pci_ioaddr(port));
81 else
82 ctrl_outw(value, port2adr(port));
83 ctrl_delay();
84}
85
86void titan_outw(u16 value, unsigned long port)
87{
88 if (PXSEG(port))
89 ctrl_outw(value, port);
90 else if (is_pci_ioaddr(port))
91 ctrl_outw(value, pci_ioaddr(port));
92 else if (port >= 0x2000)
93 ctrl_outw(value, port2adr(port));
94 else
95 maybebadio(port);
96}
97
98void titan_outl(u32 value, unsigned long port)
99{
100 if (PXSEG(port))
101 ctrl_outl(value, port);
102 else if (is_pci_ioaddr(port))
103 ctrl_outl(value, pci_ioaddr(port));
104 else
105 maybebadio(port);
106}
107
108void titan_insl(unsigned long port, void *dst, unsigned long count)
109{
110 maybebadio(port);
111}
112
113void titan_outsl(unsigned long port, const void *src, unsigned long count)
114{
115 maybebadio(port);
116}
117
118void __iomem *titan_ioport_map(unsigned long port, unsigned int size)
119{
120 if (PXSEG(port) || is_pci_memaddr(port))
121 return (void __iomem *)port;
122 else if (is_pci_ioaddr(port))
123 return (void __iomem *)pci_ioaddr(port);
124
125 return (void __iomem *)port2adr(port);
126}
diff --git a/arch/sh/boards/titan/setup.c b/arch/sh/boards/titan/setup.c
deleted file mode 100644
index 5de3b2ad71af..000000000000
--- a/arch/sh/boards/titan/setup.c
+++ /dev/null
@@ -1,44 +0,0 @@
1/*
2 * 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.
9 */
10#include <linux/init.h>
11#include <linux/irq.h>
12#include <asm/titan.h>
13#include <asm/io.h>
14
15static void __init init_titan_irq(void)
16{
17 /* enable individual interrupt mode for externals */
18 plat_irq_setup_pins(IRQ_MODE_IRQ);
19}
20
21static struct sh_machine_vector mv_titan __initmv = {
22 .mv_name = "Titan",
23
24 .mv_inb = titan_inb,
25 .mv_inw = titan_inw,
26 .mv_inl = titan_inl,
27 .mv_outb = titan_outb,
28 .mv_outw = titan_outw,
29 .mv_outl = titan_outl,
30
31 .mv_inb_p = titan_inb_p,
32 .mv_inw_p = titan_inw,
33 .mv_inl_p = titan_inl,
34 .mv_outb_p = titan_outb_p,
35 .mv_outw_p = titan_outw,
36 .mv_outl_p = titan_outl,
37
38 .mv_insl = titan_insl,
39 .mv_outsl = titan_outsl,
40
41 .mv_ioport_map = titan_ioport_map,
42
43 .mv_init_irq = init_titan_irq,
44};