aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/boards/cat68701
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
commit1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch)
tree0bba044c4ce775e45a88a51686b5d9f90697ea9d /arch/sh/boards/cat68701
Linux-2.6.12-rc2v2.6.12-rc2
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!
Diffstat (limited to 'arch/sh/boards/cat68701')
-rw-r--r--arch/sh/boards/cat68701/Makefile6
-rw-r--r--arch/sh/boards/cat68701/irq.c28
-rw-r--r--arch/sh/boards/cat68701/setup.c86
3 files changed, 120 insertions, 0 deletions
diff --git a/arch/sh/boards/cat68701/Makefile b/arch/sh/boards/cat68701/Makefile
new file mode 100644
index 000000000000..52c1de0a6dfd
--- /dev/null
+++ b/arch/sh/boards/cat68701/Makefile
@@ -0,0 +1,6 @@
1#
2# Makefile for the CAT-68701 specific parts of the kernel
3#
4
5obj-y := setup.o irq.o
6
diff --git a/arch/sh/boards/cat68701/irq.c b/arch/sh/boards/cat68701/irq.c
new file mode 100644
index 000000000000..f9a6d185fb8b
--- /dev/null
+++ b/arch/sh/boards/cat68701/irq.c
@@ -0,0 +1,28 @@
1/*
2 * linux/arch/sh/boards/cat68701/irq.c
3 *
4 * Copyright (C) 2000 Niibe Yutaka
5 * 2001 Yutaro Ebihara
6 *
7 * Setup routines for A-ONE Corp CAT-68701 SH7708 Board
8 *
9 * This file is subject to the terms and conditions of the GNU General Public
10 * License. See the file "COPYING" in the main directory of this archive
11 * for more details.
12 *
13 */
14
15#include <asm/irq.h>
16
17int cat68701_irq_demux(int irq)
18{
19 if(irq==13) return 14;
20 if(irq==7) return 10;
21 return irq;
22}
23
24void init_cat68701_IRQ()
25{
26 make_imask_irq(10);
27 make_imask_irq(14);
28}
diff --git a/arch/sh/boards/cat68701/setup.c b/arch/sh/boards/cat68701/setup.c
new file mode 100644
index 000000000000..ae8a350ade53
--- /dev/null
+++ b/arch/sh/boards/cat68701/setup.c
@@ -0,0 +1,86 @@
1/*
2 * linux/arch/sh/boards/cat68701/setup.c
3 *
4 * Copyright (C) 2000 Niibe Yutaka
5 * 2001 Yutaro Ebihara
6 *
7 * Setup routines for A-ONE Corp CAT-68701 SH7708 Board
8 *
9 * This file is subject to the terms and conditions of the GNU General Public
10 * License. See the file "COPYING" in the main directory of this archive
11 * for more details.
12 *
13 */
14
15#include <asm/io.h>
16#include <asm/machvec.h>
17#include <asm/mach/io.h>
18#include <linux/config.h>
19#include <linux/module.h>
20#include <linux/init.h>
21#include <linux/sched.h>
22
23const char *get_system_type(void)
24{
25 return "CAT-68701";
26}
27
28#ifdef CONFIG_HEARTBEAT
29void heartbeat_cat68701()
30{
31 static unsigned int cnt = 0, period = 0 , bit = 0;
32 cnt += 1;
33 if (cnt < period) {
34 return;
35 }
36 cnt = 0;
37
38 /* Go through the points (roughly!):
39 * f(0)=10, f(1)=16, f(2)=20, f(5)=35,f(inf)->110
40 */
41 period = 110 - ( (300<<FSHIFT)/
42 ((avenrun[0]/5) + (3<<FSHIFT)) );
43
44 if(bit){ bit=0; }else{ bit=1; }
45 outw(bit<<15,0x3fe);
46}
47#endif /* CONFIG_HEARTBEAT */
48
49unsigned long cat68701_isa_port2addr(unsigned long offset)
50{
51 /* CompactFlash (IDE) */
52 if (((offset >= 0x1f0) && (offset <= 0x1f7)) || (offset==0x3f6))
53 return 0xba000000 + offset;
54
55 /* INPUT PORT */
56 if ((offset >= 0x3fc) && (offset <= 0x3fd))
57 return 0xb4007000 + offset;
58
59 /* OUTPUT PORT */
60 if ((offset >= 0x3fe) && (offset <= 0x3ff))
61 return 0xb4007400 + offset;
62
63 return offset + 0xb4000000; /* other I/O (EREA 5)*/
64}
65
66/*
67 * The Machine Vector
68 */
69
70struct sh_machine_vector mv_cat68701 __initmv = {
71 .mv_nr_irqs = 32,
72 .mv_isa_port2addr = cat68701_isa_port2addr,
73 .mv_irq_demux = cat68701_irq_demux,
74
75 .mv_init_irq = init_cat68701_IRQ,
76#ifdef CONFIG_HEARTBEAT
77 .mv_heartbeat = heartbeat_cat68701,
78#endif
79};
80ALIAS_MV(cat68701)
81
82int __init platform_setup(void)
83{
84 /* dummy read erea5 (CS8900A) */
85}
86