aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/boards/adx
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sh/boards/adx')
-rw-r--r--arch/sh/boards/adx/Makefile6
-rw-r--r--arch/sh/boards/adx/irq.c31
-rw-r--r--arch/sh/boards/adx/irq_maskreg.c106
-rw-r--r--arch/sh/boards/adx/setup.c56
4 files changed, 0 insertions, 199 deletions
diff --git a/arch/sh/boards/adx/Makefile b/arch/sh/boards/adx/Makefile
deleted file mode 100644
index 5b1c531b3991..000000000000
--- a/arch/sh/boards/adx/Makefile
+++ /dev/null
@@ -1,6 +0,0 @@
1#
2# Makefile for ADX boards
3#
4
5obj-y := setup.o irq.o irq_maskreq.o
6
diff --git a/arch/sh/boards/adx/irq.c b/arch/sh/boards/adx/irq.c
deleted file mode 100644
index c6ca409dff98..000000000000
--- a/arch/sh/boards/adx/irq.c
+++ /dev/null
@@ -1,31 +0,0 @@
1/*
2 * linux/arch/sh/boards/adx/irq.c
3 *
4 * Copyright (C) 2001 A&D Co., Ltd.
5 *
6 * I/O routine and setup routines for A&D ADX Board
7 *
8 * This file is subject to the terms and conditions of the GNU General Public
9 * License. See the file "COPYING" in the main directory of this archive
10 * for more details.
11 *
12 */
13
14#include <asm/irq.h>
15
16void init_adx_IRQ(void)
17{
18 int i;
19
20/* printk("init_adx_IRQ()\n");*/
21 /* setup irq_mask_register */
22 irq_mask_register = (unsigned short *)0xa6000008;
23
24 /* cover all external interrupt area by maskreg_irq_type
25 * (Actually, irq15 doesn't exist)
26 */
27 for (i = 0; i < 16; i++) {
28 make_maskreg_irq(i);
29 disable_irq(i);
30 }
31}
diff --git a/arch/sh/boards/adx/irq_maskreg.c b/arch/sh/boards/adx/irq_maskreg.c
deleted file mode 100644
index 4b2abe5eb165..000000000000
--- a/arch/sh/boards/adx/irq_maskreg.c
+++ /dev/null
@@ -1,106 +0,0 @@
1/*
2 * linux/arch/sh/kernel/irq_maskreg.c
3 *
4 * Copyright (C) 2001 A&D Co., Ltd. <http://www.aandd.co.jp>
5 *
6 * This file may be copied or modified under the terms of the GNU
7 * General Public License. See linux/COPYING for more information.
8 *
9 * Interrupt handling for Simple external interrupt mask register
10 *
11 * This is for the machine which have single 16 bit register
12 * for masking external IRQ individually.
13 * Each bit of the register is for masking each interrupt.
14 */
15
16#include <linux/kernel.h>
17#include <linux/init.h>
18#include <linux/irq.h>
19
20#include <asm/system.h>
21#include <asm/io.h>
22#include <asm/machvec.h>
23
24/* address of external interrupt mask register
25 * address must be set prior to use these (maybe in init_XXX_irq())
26 * XXX : is it better to use .config than specifying it in code? */
27unsigned short *irq_mask_register = 0;
28
29/* forward declaration */
30static unsigned int startup_maskreg_irq(unsigned int irq);
31static void shutdown_maskreg_irq(unsigned int irq);
32static void enable_maskreg_irq(unsigned int irq);
33static void disable_maskreg_irq(unsigned int irq);
34static void mask_and_ack_maskreg(unsigned int);
35static void end_maskreg_irq(unsigned int irq);
36
37/* hw_interrupt_type */
38static struct hw_interrupt_type maskreg_irq_type = {
39 .typename = " Mask Register",
40 .startup = startup_maskreg_irq,
41 .shutdown = shutdown_maskreg_irq,
42 .enable = enable_maskreg_irq,
43 .disable = disable_maskreg_irq,
44 .ack = mask_and_ack_maskreg,
45 .end = end_maskreg_irq
46};
47
48/* actual implementatin */
49static unsigned int startup_maskreg_irq(unsigned int irq)
50{
51 enable_maskreg_irq(irq);
52 return 0; /* never anything pending */
53}
54
55static void shutdown_maskreg_irq(unsigned int irq)
56{
57 disable_maskreg_irq(irq);
58}
59
60static void disable_maskreg_irq(unsigned int irq)
61{
62 if (irq_mask_register) {
63 unsigned long flags;
64 unsigned short val, mask = 0x01 << irq;
65
66 /* Set "irq"th bit */
67 local_irq_save(flags);
68 val = ctrl_inw((unsigned long)irq_mask_register);
69 val |= mask;
70 ctrl_outw(val, (unsigned long)irq_mask_register);
71 local_irq_restore(flags);
72 }
73}
74
75static void enable_maskreg_irq(unsigned int irq)
76{
77 if (irq_mask_register) {
78 unsigned long flags;
79 unsigned short val, mask = ~(0x01 << irq);
80
81 /* Clear "irq"th bit */
82 local_irq_save(flags);
83 val = ctrl_inw((unsigned long)irq_mask_register);
84 val &= mask;
85 ctrl_outw(val, (unsigned long)irq_mask_register);
86 local_irq_restore(flags);
87 }
88}
89
90static void mask_and_ack_maskreg(unsigned int irq)
91{
92 disable_maskreg_irq(irq);
93}
94
95static void end_maskreg_irq(unsigned int irq)
96{
97 if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS)))
98 enable_maskreg_irq(irq);
99}
100
101void make_maskreg_irq(unsigned int irq)
102{
103 disable_irq_nosync(irq);
104 irq_desc[irq].chip = &maskreg_irq_type;
105 disable_maskreg_irq(irq);
106}
diff --git a/arch/sh/boards/adx/setup.c b/arch/sh/boards/adx/setup.c
deleted file mode 100644
index 4938d9592343..000000000000
--- a/arch/sh/boards/adx/setup.c
+++ /dev/null
@@ -1,56 +0,0 @@
1/*
2 * linux/arch/sh/board/adx/setup.c
3 *
4 * Copyright (C) 2001 A&D Co., Ltd.
5 *
6 * I/O routine and setup routines for A&D ADX Board
7 *
8 * This file is subject to the terms and conditions of the GNU General Public
9 * License. See the file "COPYING" in the main directory of this archive
10 * for more details.
11 *
12 */
13
14#include <asm/machvec.h>
15#include <linux/module.h>
16
17extern void init_adx_IRQ(void);
18extern void *cf_io_base;
19
20const char *get_system_type(void)
21{
22 return "A&D ADX";
23}
24
25unsigned long adx_isa_port2addr(unsigned long offset)
26{
27 /* CompactFlash (IDE) */
28 if (((offset >= 0x1f0) && (offset <= 0x1f7)) || (offset == 0x3f6)) {
29 return (unsigned long)cf_io_base + offset;
30 }
31
32 /* eth0 */
33 if ((offset >= 0x300) && (offset <= 0x30f)) {
34 return 0xa5000000 + offset; /* COMM BOARD (AREA1) */
35 }
36
37 return offset + 0xb0000000; /* IOBUS (AREA 4)*/
38}
39
40/*
41 * The Machine Vector
42 */
43
44struct sh_machine_vector mv_adx __initmv = {
45 .mv_nr_irqs = 48,
46 .mv_isa_port2addr = adx_isa_port2addr,
47 .mv_init_irq = init_adx_IRQ,
48};
49ALIAS_MV(adx)
50
51int __init platform_setup(void)
52{
53 /* Nothing to see here .. */
54 return 0;
55}
56