diff options
Diffstat (limited to 'arch/sh/boards/mach-systemh')
-rw-r--r-- | arch/sh/boards/mach-systemh/Makefile | 13 | ||||
-rw-r--r-- | arch/sh/boards/mach-systemh/io.c | 158 | ||||
-rw-r--r-- | arch/sh/boards/mach-systemh/irq.c | 61 | ||||
-rw-r--r-- | arch/sh/boards/mach-systemh/setup.c | 57 |
4 files changed, 0 insertions, 289 deletions
diff --git a/arch/sh/boards/mach-systemh/Makefile b/arch/sh/boards/mach-systemh/Makefile deleted file mode 100644 index 2cc6a23d9d39..000000000000 --- a/arch/sh/boards/mach-systemh/Makefile +++ /dev/null | |||
@@ -1,13 +0,0 @@ | |||
1 | # | ||
2 | # Makefile for the SystemH specific parts of the kernel | ||
3 | # | ||
4 | |||
5 | obj-y := setup.o irq.o io.o | ||
6 | |||
7 | # XXX: This wants to be consolidated in arch/sh/drivers/pci, and more | ||
8 | # importantly, with the generic sh7751_pcic_init() code. For now, we'll | ||
9 | # just abuse the hell out of kbuild, because we can.. | ||
10 | |||
11 | obj-$(CONFIG_PCI) += pci.o | ||
12 | pci-y := ../../se/7751/pci.o | ||
13 | |||
diff --git a/arch/sh/boards/mach-systemh/io.c b/arch/sh/boards/mach-systemh/io.c deleted file mode 100644 index 15577ff1f715..000000000000 --- a/arch/sh/boards/mach-systemh/io.c +++ /dev/null | |||
@@ -1,158 +0,0 @@ | |||
1 | /* | ||
2 | * linux/arch/sh/boards/renesas/systemh/io.c | ||
3 | * | ||
4 | * Copyright (C) 2001 Ian da Silva, Jeremy Siegel | ||
5 | * Based largely on io_se.c. | ||
6 | * | ||
7 | * I/O routine for Hitachi 7751 Systemh. | ||
8 | */ | ||
9 | #include <linux/kernel.h> | ||
10 | #include <linux/types.h> | ||
11 | #include <linux/pci.h> | ||
12 | #include <mach/systemh7751.h> | ||
13 | #include <asm/addrspace.h> | ||
14 | #include <asm/io.h> | ||
15 | |||
16 | #define ETHER_IOMAP(adr) (0xB3000000 + (adr)) /*map to 16bits access area | ||
17 | of smc lan chip*/ | ||
18 | static inline volatile __u16 * | ||
19 | port2adr(unsigned int port) | ||
20 | { | ||
21 | if (port >= 0x2000) | ||
22 | return (volatile __u16 *) (PA_MRSHPC + (port - 0x2000)); | ||
23 | maybebadio((unsigned long)port); | ||
24 | return (volatile __u16*)port; | ||
25 | } | ||
26 | |||
27 | /* | ||
28 | * General outline: remap really low stuff [eventually] to SuperIO, | ||
29 | * stuff in PCI IO space (at or above window at pci.h:PCIBIOS_MIN_IO) | ||
30 | * is mapped through the PCI IO window. Stuff with high bits (PXSEG) | ||
31 | * should be way beyond the window, and is used w/o translation for | ||
32 | * compatibility. | ||
33 | */ | ||
34 | unsigned char sh7751systemh_inb(unsigned long port) | ||
35 | { | ||
36 | if (PXSEG(port)) | ||
37 | return *(volatile unsigned char *)port; | ||
38 | else if (port <= 0x3F1) | ||
39 | return *(volatile unsigned char *)ETHER_IOMAP(port); | ||
40 | else | ||
41 | return (*port2adr(port))&0xff; | ||
42 | } | ||
43 | |||
44 | unsigned char sh7751systemh_inb_p(unsigned long port) | ||
45 | { | ||
46 | unsigned char v; | ||
47 | |||
48 | if (PXSEG(port)) | ||
49 | v = *(volatile unsigned char *)port; | ||
50 | else if (port <= 0x3F1) | ||
51 | v = *(volatile unsigned char *)ETHER_IOMAP(port); | ||
52 | else | ||
53 | v = (*port2adr(port))&0xff; | ||
54 | ctrl_delay(); | ||
55 | return v; | ||
56 | } | ||
57 | |||
58 | unsigned short sh7751systemh_inw(unsigned long port) | ||
59 | { | ||
60 | if (PXSEG(port)) | ||
61 | return *(volatile unsigned short *)port; | ||
62 | else if (port >= 0x2000) | ||
63 | return *port2adr(port); | ||
64 | else if (port <= 0x3F1) | ||
65 | return *(volatile unsigned int *)ETHER_IOMAP(port); | ||
66 | else | ||
67 | maybebadio(port); | ||
68 | return 0; | ||
69 | } | ||
70 | |||
71 | unsigned int sh7751systemh_inl(unsigned long port) | ||
72 | { | ||
73 | if (PXSEG(port)) | ||
74 | return *(volatile unsigned long *)port; | ||
75 | else if (port >= 0x2000) | ||
76 | return *port2adr(port); | ||
77 | else if (port <= 0x3F1) | ||
78 | return *(volatile unsigned int *)ETHER_IOMAP(port); | ||
79 | else | ||
80 | maybebadio(port); | ||
81 | return 0; | ||
82 | } | ||
83 | |||
84 | void sh7751systemh_outb(unsigned char value, unsigned long port) | ||
85 | { | ||
86 | |||
87 | if (PXSEG(port)) | ||
88 | *(volatile unsigned char *)port = value; | ||
89 | else if (port <= 0x3F1) | ||
90 | *(volatile unsigned char *)ETHER_IOMAP(port) = value; | ||
91 | else | ||
92 | *(port2adr(port)) = value; | ||
93 | } | ||
94 | |||
95 | void sh7751systemh_outb_p(unsigned char value, unsigned long port) | ||
96 | { | ||
97 | if (PXSEG(port)) | ||
98 | *(volatile unsigned char *)port = value; | ||
99 | else if (port <= 0x3F1) | ||
100 | *(volatile unsigned char *)ETHER_IOMAP(port) = value; | ||
101 | else | ||
102 | *(port2adr(port)) = value; | ||
103 | ctrl_delay(); | ||
104 | } | ||
105 | |||
106 | void sh7751systemh_outw(unsigned short value, unsigned long port) | ||
107 | { | ||
108 | if (PXSEG(port)) | ||
109 | *(volatile unsigned short *)port = value; | ||
110 | else if (port >= 0x2000) | ||
111 | *port2adr(port) = value; | ||
112 | else if (port <= 0x3F1) | ||
113 | *(volatile unsigned short *)ETHER_IOMAP(port) = value; | ||
114 | else | ||
115 | maybebadio(port); | ||
116 | } | ||
117 | |||
118 | void sh7751systemh_outl(unsigned int value, unsigned long port) | ||
119 | { | ||
120 | if (PXSEG(port)) | ||
121 | *(volatile unsigned long *)port = value; | ||
122 | else | ||
123 | maybebadio(port); | ||
124 | } | ||
125 | |||
126 | void sh7751systemh_insb(unsigned long port, void *addr, unsigned long count) | ||
127 | { | ||
128 | unsigned char *p = addr; | ||
129 | while (count--) *p++ = sh7751systemh_inb(port); | ||
130 | } | ||
131 | |||
132 | void sh7751systemh_insw(unsigned long port, void *addr, unsigned long count) | ||
133 | { | ||
134 | unsigned short *p = addr; | ||
135 | while (count--) *p++ = sh7751systemh_inw(port); | ||
136 | } | ||
137 | |||
138 | void sh7751systemh_insl(unsigned long port, void *addr, unsigned long count) | ||
139 | { | ||
140 | maybebadio(port); | ||
141 | } | ||
142 | |||
143 | void sh7751systemh_outsb(unsigned long port, const void *addr, unsigned long count) | ||
144 | { | ||
145 | unsigned char *p = (unsigned char*)addr; | ||
146 | while (count--) sh7751systemh_outb(*p++, port); | ||
147 | } | ||
148 | |||
149 | void sh7751systemh_outsw(unsigned long port, const void *addr, unsigned long count) | ||
150 | { | ||
151 | unsigned short *p = (unsigned short*)addr; | ||
152 | while (count--) sh7751systemh_outw(*p++, port); | ||
153 | } | ||
154 | |||
155 | void sh7751systemh_outsl(unsigned long port, const void *addr, unsigned long count) | ||
156 | { | ||
157 | maybebadio(port); | ||
158 | } | ||
diff --git a/arch/sh/boards/mach-systemh/irq.c b/arch/sh/boards/mach-systemh/irq.c deleted file mode 100644 index e5ee13adeff4..000000000000 --- a/arch/sh/boards/mach-systemh/irq.c +++ /dev/null | |||
@@ -1,61 +0,0 @@ | |||
1 | /* | ||
2 | * linux/arch/sh/boards/renesas/systemh/irq.c | ||
3 | * | ||
4 | * Copyright (C) 2000 Kazumoto Kojima | ||
5 | * | ||
6 | * Hitachi SystemH Support. | ||
7 | * | ||
8 | * Modified for 7751 SystemH by | ||
9 | * Jonathan Short. | ||
10 | */ | ||
11 | |||
12 | #include <linux/init.h> | ||
13 | #include <linux/irq.h> | ||
14 | #include <linux/interrupt.h> | ||
15 | #include <linux/io.h> | ||
16 | |||
17 | #include <mach/systemh7751.h> | ||
18 | #include <asm/smc37c93x.h> | ||
19 | |||
20 | /* address of external interrupt mask register | ||
21 | * address must be set prior to use these (maybe in init_XXX_irq()) | ||
22 | * XXX : is it better to use .config than specifying it in code? */ | ||
23 | static unsigned long *systemh_irq_mask_register = (unsigned long *)0xB3F10004; | ||
24 | static unsigned long *systemh_irq_request_register = (unsigned long *)0xB3F10000; | ||
25 | |||
26 | static void disable_systemh_irq(struct irq_data *data) | ||
27 | { | ||
28 | unsigned long val, mask = 0x01 << 1; | ||
29 | |||
30 | /* Clear the "irq"th bit in the mask and set it in the request */ | ||
31 | val = __raw_readl((unsigned long)systemh_irq_mask_register); | ||
32 | val &= ~mask; | ||
33 | __raw_writel(val, (unsigned long)systemh_irq_mask_register); | ||
34 | |||
35 | val = __raw_readl((unsigned long)systemh_irq_request_register); | ||
36 | val |= mask; | ||
37 | __raw_writel(val, (unsigned long)systemh_irq_request_register); | ||
38 | } | ||
39 | |||
40 | static void enable_systemh_irq(struct irq_data *data) | ||
41 | { | ||
42 | unsigned long val, mask = 0x01 << 1; | ||
43 | |||
44 | /* Set "irq"th bit in the mask register */ | ||
45 | val = __raw_readl((unsigned long)systemh_irq_mask_register); | ||
46 | val |= mask; | ||
47 | __raw_writel(val, (unsigned long)systemh_irq_mask_register); | ||
48 | } | ||
49 | |||
50 | static struct irq_chip systemh_irq_type = { | ||
51 | .name = "SystemH Register", | ||
52 | .irq_unmask = enable_systemh_irq, | ||
53 | .irq_mask = disable_systemh_irq, | ||
54 | }; | ||
55 | |||
56 | void make_systemh_irq(unsigned int irq) | ||
57 | { | ||
58 | disable_irq_nosync(irq); | ||
59 | set_irq_chip_and_handler(irq, &systemh_irq_type, handle_level_irq); | ||
60 | disable_systemh_irq(irq_get_irq_data(irq)); | ||
61 | } | ||
diff --git a/arch/sh/boards/mach-systemh/setup.c b/arch/sh/boards/mach-systemh/setup.c deleted file mode 100644 index 219fd800a43f..000000000000 --- a/arch/sh/boards/mach-systemh/setup.c +++ /dev/null | |||
@@ -1,57 +0,0 @@ | |||
1 | /* | ||
2 | * linux/arch/sh/boards/renesas/systemh/setup.c | ||
3 | * | ||
4 | * Copyright (C) 2000 Kazumoto Kojima | ||
5 | * Copyright (C) 2003 Paul Mundt | ||
6 | * | ||
7 | * Hitachi SystemH Support. | ||
8 | * | ||
9 | * Modified for 7751 SystemH by Jonathan Short. | ||
10 | * | ||
11 | * Rewritten for 2.6 by Paul Mundt. | ||
12 | * | ||
13 | * This file is subject to the terms and conditions of the GNU General Public | ||
14 | * License. See the file "COPYING" in the main directory of this archive | ||
15 | * for more details. | ||
16 | */ | ||
17 | #include <linux/init.h> | ||
18 | #include <asm/machvec.h> | ||
19 | #include <mach/systemh7751.h> | ||
20 | |||
21 | extern void make_systemh_irq(unsigned int irq); | ||
22 | |||
23 | /* | ||
24 | * Initialize IRQ setting | ||
25 | */ | ||
26 | static void __init sh7751systemh_init_irq(void) | ||
27 | { | ||
28 | make_systemh_irq(0xb); /* Ethernet interrupt */ | ||
29 | } | ||
30 | |||
31 | static struct sh_machine_vector mv_7751systemh __initmv = { | ||
32 | .mv_name = "7751 SystemH", | ||
33 | .mv_nr_irqs = 72, | ||
34 | |||
35 | .mv_inb = sh7751systemh_inb, | ||
36 | .mv_inw = sh7751systemh_inw, | ||
37 | .mv_inl = sh7751systemh_inl, | ||
38 | .mv_outb = sh7751systemh_outb, | ||
39 | .mv_outw = sh7751systemh_outw, | ||
40 | .mv_outl = sh7751systemh_outl, | ||
41 | |||
42 | .mv_inb_p = sh7751systemh_inb_p, | ||
43 | .mv_inw_p = sh7751systemh_inw, | ||
44 | .mv_inl_p = sh7751systemh_inl, | ||
45 | .mv_outb_p = sh7751systemh_outb_p, | ||
46 | .mv_outw_p = sh7751systemh_outw, | ||
47 | .mv_outl_p = sh7751systemh_outl, | ||
48 | |||
49 | .mv_insb = sh7751systemh_insb, | ||
50 | .mv_insw = sh7751systemh_insw, | ||
51 | .mv_insl = sh7751systemh_insl, | ||
52 | .mv_outsb = sh7751systemh_outsb, | ||
53 | .mv_outsw = sh7751systemh_outsw, | ||
54 | .mv_outsl = sh7751systemh_outsl, | ||
55 | |||
56 | .mv_init_irq = sh7751systemh_init_irq, | ||
57 | }; | ||