aboutsummaryrefslogtreecommitdiffstats
path: root/arch/m68knommu/platform/68328
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/m68knommu/platform/68328
Linux-2.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/m68knommu/platform/68328')
-rw-r--r--arch/m68knommu/platform/68328/Makefile21
-rw-r--r--arch/m68knommu/platform/68328/bootlogo.h270
-rw-r--r--arch/m68knommu/platform/68328/bootlogo.pl10
-rw-r--r--arch/m68knommu/platform/68328/config.c125
-rw-r--r--arch/m68knommu/platform/68328/entry.S276
-rw-r--r--arch/m68knommu/platform/68328/head-pilot.S224
-rw-r--r--arch/m68knommu/platform/68328/head-ram.S171
-rw-r--r--arch/m68knommu/platform/68328/head-rom.S109
-rw-r--r--arch/m68knommu/platform/68328/ints.c285
9 files changed, 1491 insertions, 0 deletions
diff --git a/arch/m68knommu/platform/68328/Makefile b/arch/m68knommu/platform/68328/Makefile
new file mode 100644
index 00000000000..1b3b719e447
--- /dev/null
+++ b/arch/m68knommu/platform/68328/Makefile
@@ -0,0 +1,21 @@
1#
2# Makefile for arch/m68knommu/platform/68328.
3#
4
5head-y = head-$(MODEL).o
6head-$(CONFIG_PILOT) = head-pilot.o
7head-$(CONFIG_DRAGEN2) = head-de2.o
8
9obj-y += entry.o ints.o timers.o
10obj-$(CONFIG_M68328) += config.o
11
12extra-y := head.o
13extra-$(CONFIG_M68328) += bootlogo.rh head.o
14
15$(obj)/bootlogo.rh: $(src)/bootlogo.h
16 perl $(src)/bootlogo.pl < $(src)/bootlogo.h > $(obj)/bootlogo.rh
17
18$(obj)/head.o: $(obj)/$(head-y)
19 ln -sf $(head-y) $(obj)/head.o
20
21clean-files := $(obj)/bootlogo.rh $(obj)/head.o $(head-y)
diff --git a/arch/m68knommu/platform/68328/bootlogo.h b/arch/m68knommu/platform/68328/bootlogo.h
new file mode 100644
index 00000000000..67bc2c17386
--- /dev/null
+++ b/arch/m68knommu/platform/68328/bootlogo.h
@@ -0,0 +1,270 @@
1#define bootlogo_width 160
2#define bootlogo_height 160
3static unsigned char bootlogo_bits[] = {
4 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x55, 0x01, 0x00, 0x00, 0x00,
5 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
6 0x00, 0x00, 0x40, 0x55, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
7 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x55,
8 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
9 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xac, 0x00, 0x00, 0x00, 0x00, 0x00,
10 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
11 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
12 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00,
13 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
14 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00,
15 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
16 0x00, 0x10, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
17 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x01, 0x00,
18 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
19 0x00, 0x00, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
20 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
21 0x00, 0x82, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
22 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x20, 0x00, 0x00,
23 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
24 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
25 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
26 0x80, 0x08, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00,
27 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x08, 0x00, 0x00,
28 0x00, 0xff, 0x80, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
29 0x00, 0x00, 0x00, 0x00, 0x20, 0x04, 0x00, 0x00, 0x00, 0xf8, 0x80, 0x0f,
30 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31 0x50, 0x04, 0x00, 0x00, 0x00, 0x78, 0x80, 0x0f, 0x00, 0x00, 0x00, 0x00,
32 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x03, 0x00, 0x00,
33 0x00, 0x78, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
34 0x00, 0x00, 0x00, 0x00, 0x90, 0x00, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00,
35 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x40,
36 0xa8, 0x02, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
37 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x70, 0x28, 0x01, 0x00, 0x00,
38 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
39 0x00, 0x20, 0x00, 0x00, 0xaa, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00,
40 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x70,
41 0x54, 0x01, 0x00, 0x00, 0x00, 0x3e, 0x80, 0x01, 0x3a, 0x78, 0x80, 0x0e,
42 0x50, 0xc0, 0x03, 0x0e, 0x00, 0x20, 0x00, 0x00, 0xaa, 0x00, 0x00, 0x00,
43 0x00, 0x3e, 0xf0, 0x83, 0x1f, 0xfc, 0xe0, 0x0f, 0x78, 0xf8, 0x87, 0x1f,
44 0x00, 0x18, 0x00, 0x30, 0xaa, 0x00, 0x00, 0x00, 0x00, 0x1e, 0xf8, 0xc3,
45 0x1f, 0xfc, 0xe0, 0x0f, 0x78, 0xf8, 0x87, 0x0f, 0x00, 0x20, 0x00, 0x10,
46 0x55, 0x00, 0x00, 0x00, 0x00, 0x1e, 0xc0, 0x03, 0x9f, 0xf3, 0x80, 0x0f,
47 0x78, 0x80, 0xc7, 0x0e, 0x00, 0x18, 0x00, 0x20, 0xaa, 0x00, 0x00, 0x00,
48 0x00, 0x1e, 0xe0, 0x03, 0x9f, 0xf1, 0x80, 0x07, 0x78, 0x80, 0x67, 0x00,
49 0x00, 0x24, 0x00, 0x18, 0x55, 0x00, 0x00, 0x00, 0x00, 0x0f, 0xe0, 0x01,
50 0x5e, 0xf0, 0x80, 0x07, 0x3c, 0x00, 0x2f, 0x00, 0x00, 0x14, 0x00, 0x20,
51 0xaa, 0x00, 0x00, 0x00, 0x00, 0x0f, 0xe0, 0x01, 0x7f, 0xf0, 0x80, 0x07,
52 0x3c, 0x00, 0x3f, 0x00, 0x00, 0x08, 0x00, 0x18, 0x55, 0x00, 0x00, 0x00,
53 0x00, 0x0f, 0xe0, 0x00, 0x3f, 0xf0, 0xc0, 0x03, 0x1e, 0x00, 0x1f, 0x00,
54 0x00, 0x14, 0x00, 0x28, 0xaa, 0x00, 0x00, 0x00, 0x80, 0x0f, 0xf0, 0x00,
55 0x1f, 0xf0, 0xc0, 0x03, 0x1f, 0x00, 0x1f, 0x00, 0x00, 0x04, 0x00, 0x0c,
56 0x54, 0x00, 0x00, 0x00, 0x80, 0x07, 0x78, 0x00, 0x1f, 0x78, 0xc0, 0x03,
57 0x1f, 0x00, 0x1e, 0x00, 0x00, 0x0a, 0x00, 0x12, 0xa8, 0x00, 0x00, 0x00,
58 0x80, 0x07, 0x78, 0x00, 0x1f, 0x78, 0xe0, 0x03, 0x1f, 0x00, 0x1f, 0x00,
59 0x00, 0x04, 0x00, 0x0a, 0x54, 0x00, 0x00, 0x00, 0x80, 0x07, 0x78, 0x80,
60 0x0f, 0x78, 0xe0, 0x03, 0x1f, 0x00, 0x1e, 0x00, 0x00, 0x0a, 0x00, 0x08,
61 0x50, 0x01, 0x00, 0x00, 0x84, 0x03, 0x78, 0x80, 0x07, 0x3c, 0xe0, 0xc1,
62 0x0f, 0x00, 0x1f, 0x00, 0x00, 0x04, 0x00, 0x06, 0xa8, 0x00, 0x00, 0x00,
63 0xc0, 0x03, 0x78, 0xc0, 0x07, 0x3c, 0xe0, 0xc1, 0x0f, 0x00, 0x1f, 0x00,
64 0x00, 0x0a, 0x00, 0x08, 0x50, 0x01, 0x00, 0x00, 0xc2, 0x01, 0x38, 0xc0,
65 0x07, 0x3c, 0xe0, 0x60, 0x0f, 0x80, 0x1e, 0x00, 0x00, 0x05, 0x00, 0x07,
66 0xa0, 0x00, 0x00, 0x80, 0xe0, 0x01, 0x3c, 0xc0, 0x07, 0x3c, 0xf0, 0xa0,
67 0x07, 0xc0, 0x1c, 0x00, 0x00, 0x0a, 0x80, 0x08, 0xa0, 0x02, 0x00, 0xa0,
68 0xe0, 0x21, 0x1c, 0xc0, 0x03, 0x1c, 0x71, 0x90, 0x47, 0x40, 0x3c, 0x04,
69 0x00, 0x05, 0x80, 0x06, 0xa0, 0x02, 0x00, 0x20, 0xe0, 0x31, 0x1e, 0xc3,
70 0x03, 0x1e, 0x79, 0x98, 0x47, 0x60, 0x38, 0x04, 0x00, 0x15, 0x40, 0x0a,
71 0xa0, 0x0a, 0x00, 0x1a, 0xe0, 0x19, 0x9e, 0xe1, 0x01, 0x9e, 0x78, 0xcc,
72 0xa7, 0x32, 0x78, 0x02, 0x80, 0x2a, 0x40, 0x05, 0x80, 0x2a, 0x00, 0x05,
73 0xe0, 0x0d, 0x9e, 0xe0, 0x01, 0xde, 0x78, 0xc6, 0x97, 0x1b, 0x78, 0x03,
74 0x80, 0x52, 0x30, 0x0a, 0x00, 0x95, 0xd2, 0x0a, 0xe0, 0x0f, 0xfe, 0xe0,
75 0x00, 0x7e, 0xf8, 0x87, 0x9f, 0x0f, 0xf8, 0x01, 0x00, 0xa1, 0x0e, 0x15,
76 0x80, 0x55, 0x55, 0x01, 0xe0, 0x01, 0x3c, 0xf0, 0x00, 0x3c, 0xf0, 0x80,
77 0x8f, 0x0f, 0x70, 0x00, 0x00, 0x81, 0x02, 0x14, 0x00, 0x54, 0x55, 0x00,
78 0xc0, 0x01, 0x3c, 0x00, 0x00, 0x0c, 0x60, 0x00, 0x07, 0x03, 0x70, 0x00,
79 0x80, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00,
80 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00,
81 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
82 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
83 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
84 0x40, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
85 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00,
86 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
87 0x00, 0x00, 0x00, 0x00, 0x40, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
88 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
89 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
90 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00,
91 0x00, 0x00, 0x40, 0x01, 0x00, 0x11, 0x09, 0x00, 0x04, 0x00, 0x01, 0x00,
92 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00,
93 0x00, 0x20, 0x01, 0x00, 0x04, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
94 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x49, 0x32, 0x49, 0x49, 0x91,
95 0x24, 0x86, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
96 0x00, 0x00, 0x20, 0x49, 0x0a, 0x09, 0xc9, 0x92, 0x14, 0x81, 0x00, 0x00,
97 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x49,
98 0x18, 0x01, 0x49, 0x92, 0x0c, 0x43, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
99 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x49, 0x30, 0x01, 0x49, 0x92,
100 0x14, 0x26, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
101 0x00, 0x00, 0x08, 0x69, 0x22, 0x09, 0x49, 0xd2, 0x24, 0x24, 0x00, 0x00,
102 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x51,
103 0x1a, 0x09, 0x49, 0xa2, 0x44, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
104 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x01, 0x00, 0x00, 0x00, 0x00,
105 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
106 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
107 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
108 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
109 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
110 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
111 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
112 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
113 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
114 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
115 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80,
116 0x08, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
117 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x87, 0x08, 0x00, 0x00, 0x00,
118 0xf2, 0xf0, 0xf0, 0xf0, 0xf0, 0x00, 0xf0, 0x00, 0x08, 0x00, 0x00, 0x00,
119 0x00, 0x00, 0x40, 0x88, 0x00, 0x00, 0x00, 0x00, 0x09, 0x09, 0x09, 0x09,
120 0x09, 0x01, 0x10, 0x01, 0x08, 0x00, 0x00, 0x00, 0x00, 0x40, 0x24, 0x80,
121 0x88, 0x86, 0x48, 0x04, 0x09, 0x08, 0x01, 0x01, 0x09, 0x01, 0x10, 0x71,
122 0x88, 0x66, 0x00, 0x00, 0x00, 0x40, 0x24, 0x80, 0x88, 0x89, 0x48, 0x84,
123 0x08, 0x08, 0x01, 0x01, 0x09, 0x01, 0x10, 0x89, 0x88, 0x99, 0x00, 0x00,
124 0x00, 0x40, 0x24, 0x80, 0x88, 0x88, 0x88, 0x82, 0xf8, 0xf0, 0xe0, 0x80,
125 0xf0, 0xf8, 0x13, 0x81, 0x88, 0x88, 0x00, 0x00, 0x00, 0x40, 0x24, 0x80,
126 0x88, 0x88, 0x08, 0x81, 0x08, 0x09, 0x01, 0x41, 0x08, 0x01, 0xf0, 0xf0,
127 0x88, 0x88, 0x00, 0x00, 0x00, 0x40, 0x24, 0x80, 0x88, 0x88, 0x88, 0x42,
128 0x08, 0x09, 0x01, 0x21, 0x08, 0x01, 0x10, 0x88, 0x88, 0x88, 0x00, 0x00,
129 0x00, 0x40, 0x46, 0x88, 0x88, 0x88, 0x4c, 0x44, 0x08, 0x09, 0x09, 0x11,
130 0x08, 0x01, 0x10, 0x88, 0x88, 0x88, 0x00, 0x00, 0x00, 0x80, 0x85, 0x87,
131 0x88, 0x08, 0x4b, 0x24, 0xf0, 0xf0, 0xf0, 0xf8, 0xf1, 0x00, 0x10, 0x70,
132 0x89, 0x88, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20,
133 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
134 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
135 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
136 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
137 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
138 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
139 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
140 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
141 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
142 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x7f, 0x00, 0x00, 0x00,
143 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
144 0x00, 0x00, 0x00, 0xf8, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
145 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc,
146 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
147 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xff, 0x0f, 0x00, 0x00,
148 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00,
149 0x00, 0x00, 0x00, 0xff, 0x3f, 0x0f, 0x00, 0x00, 0x08, 0x02, 0x04, 0x00,
150 0x00, 0x00, 0x08, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff,
151 0xff, 0x1f, 0x00, 0x00, 0x48, 0x62, 0xc4, 0x31, 0x4a, 0x18, 0x3c, 0x03,
152 0x21, 0x45, 0x92, 0x00, 0x00, 0x00, 0x80, 0xff, 0xff, 0x1f, 0x00, 0x00,
153 0x48, 0x92, 0x24, 0x48, 0xb6, 0x24, 0x88, 0x04, 0x21, 0x4b, 0x92, 0x00,
154 0x00, 0x00, 0x80, 0xff, 0xff, 0x3f, 0x00, 0x00, 0xa8, 0xf2, 0x24, 0x48,
155 0x92, 0x3c, 0x88, 0x04, 0x21, 0x49, 0x62, 0x00, 0x00, 0x00, 0x80, 0xff,
156 0xff, 0x3f, 0x00, 0x00, 0x10, 0x11, 0x24, 0x48, 0x92, 0x04, 0x88, 0x04,
157 0x21, 0x49, 0x62, 0x00, 0x00, 0x00, 0x80, 0xff, 0xff, 0x3f, 0x00, 0x00,
158 0x10, 0x11, 0x24, 0x48, 0x92, 0x04, 0x88, 0x04, 0x21, 0x49, 0x93, 0x00,
159 0x00, 0x00, 0x80, 0xff, 0xcf, 0x7e, 0x00, 0x00, 0x10, 0xe1, 0xc4, 0x31,
160 0x92, 0x38, 0x30, 0x03, 0x2f, 0x89, 0x92, 0x00, 0x00, 0x00, 0x80, 0xe3,
161 0x07, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
162 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc1, 0x03, 0x7e, 0x00, 0x00,
163 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
164 0x00, 0x00, 0x80, 0xc9, 0x23, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
165 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x95,
166 0x33, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
167 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xdd, 0xfb, 0x7e, 0x00, 0x00,
168 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
169 0x00, 0x00, 0x80, 0x1d, 0xf8, 0x7e, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00,
170 0x02, 0x00, 0x40, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x9b,
171 0x70, 0x7e, 0x00, 0x00, 0x08, 0x00, 0xe0, 0x00, 0x02, 0x00, 0x47, 0x80,
172 0x08, 0x00, 0x00, 0x08, 0x00, 0x00, 0x80, 0x03, 0x00, 0x7e, 0x00, 0x00,
173 0x3c, 0xa3, 0x20, 0x31, 0x52, 0x02, 0x49, 0xcc, 0x3f, 0xa3, 0x94, 0x08,
174 0x00, 0x00, 0x00, 0x27, 0x02, 0x7e, 0x00, 0x00, 0x88, 0xe4, 0x20, 0x41,
175 0xb2, 0x05, 0x49, 0x90, 0x88, 0xe4, 0x6c, 0x09, 0x00, 0x00, 0x00, 0x01,
176 0x00, 0x7e, 0x00, 0x00, 0x88, 0x24, 0xe0, 0x70, 0x92, 0x04, 0x47, 0x9c,
177 0x88, 0x24, 0x24, 0x09, 0x00, 0x00, 0x00, 0x13, 0x48, 0x7e, 0x00, 0x00,
178 0x88, 0x24, 0x20, 0x48, 0x92, 0x04, 0x41, 0x92, 0x88, 0x24, 0x24, 0x01,
179 0x00, 0x00, 0x00, 0x43, 0x00, 0xfe, 0x00, 0x00, 0x88, 0x24, 0x20, 0x48,
180 0x92, 0x04, 0x41, 0x92, 0x88, 0x24, 0x24, 0x09, 0x00, 0x00, 0x00, 0x07,
181 0x94, 0xce, 0x00, 0x00, 0x08, 0x23, 0x20, 0xb0, 0x92, 0x04, 0x41, 0x2c,
182 0x0b, 0x23, 0x24, 0x09, 0x00, 0x00, 0x00, 0x49, 0x02, 0xce, 0x01, 0x00,
183 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
184 0x00, 0x00, 0x00, 0x11, 0x08, 0xdc, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00,
185 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41,
186 0x01, 0xfc, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
187 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0xf8, 0x07, 0x00,
188 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
189 0x00, 0x00, 0xc0, 0x01, 0x00, 0xf8, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00,
190 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x01,
191 0x00, 0xf0, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
192 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0xf0, 0x1f, 0x00,
193 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
194 0x00, 0x00, 0x70, 0x00, 0x00, 0xe0, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00,
195 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x00,
196 0x00, 0xe0, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
197 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0xe0, 0x7f, 0x00,
198 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
199 0x00, 0x00, 0x3c, 0x00, 0x00, 0xe0, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00,
200 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x00,
201 0x00, 0xc0, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
202 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0xc0, 0xff, 0x01,
203 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
204 0x00, 0x00, 0x1f, 0x00, 0x00, 0x80, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00,
205 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x00,
206 0x00, 0x80, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
207 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x0f, 0x00, 0x00, 0x00, 0xff, 0x07,
208 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
209 0x00, 0x80, 0x07, 0x00, 0x00, 0x00, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00,
210 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x07, 0x00,
211 0x00, 0x00, 0xfe, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00,
212 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x07, 0x00, 0x00, 0x00, 0xfe, 0x0f,
213 0x00, 0x00, 0x80, 0x08, 0x00, 0x00, 0x05, 0x00, 0x00, 0x80, 0x08, 0x00,
214 0x00, 0xc0, 0x03, 0x00, 0x78, 0x00, 0xfe, 0x0f, 0x00, 0x00, 0x40, 0x10,
215 0x12, 0x10, 0x05, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0xe0, 0x03, 0x00,
216 0x84, 0x00, 0xfe, 0x0f, 0x00, 0x00, 0x20, 0x26, 0x0a, 0x10, 0x9d, 0x39,
217 0xa6, 0xb2, 0x0a, 0x00, 0x00, 0xe0, 0x01, 0x00, 0x02, 0x00, 0xfe, 0x0f,
218 0x00, 0x00, 0x20, 0x21, 0x06, 0x28, 0x25, 0x4a, 0xa9, 0x8a, 0x09, 0x00,
219 0x00, 0xe0, 0x01, 0x22, 0x02, 0x00, 0xfc, 0x1f, 0x00, 0x00, 0x20, 0x21,
220 0x0e, 0x38, 0xa5, 0x4b, 0xa9, 0xb2, 0x09, 0x00, 0x00, 0xf0, 0x01, 0x22,
221 0x02, 0x00, 0xfc, 0x1f, 0x00, 0x00, 0x20, 0x21, 0x12, 0x44, 0xa5, 0x4a,
222 0x49, 0xa1, 0x0a, 0x00, 0x00, 0xf8, 0x01, 0x22, 0x02, 0x00, 0xfc, 0x1f,
223 0x00, 0x00, 0x20, 0x26, 0x52, 0x44, 0x9d, 0x4d, 0x46, 0x99, 0x0a, 0x00,
224 0x00, 0xfc, 0x01, 0x22, 0x02, 0x00, 0xfc, 0x1f, 0x00, 0x00, 0x40, 0x10,
225 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x01, 0xb2,
226 0x84, 0x00, 0xfc, 0x1f, 0x00, 0x00, 0x80, 0x08, 0x00, 0x00, 0x00, 0x00,
227 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0x01, 0x6e, 0x78, 0x00, 0xfc, 0x1f,
228 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
229 0x00, 0xfc, 0x01, 0x02, 0x00, 0x00, 0xfc, 0x1f, 0x00, 0x00, 0x00, 0x00,
230 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x88, 0x01, 0x02,
231 0x00, 0x00, 0xfe, 0x1f, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00,
232 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x06, 0x00, 0x00, 0xfc, 0x0f,
233 0x00, 0x00, 0x80, 0x08, 0x00, 0x00, 0x20, 0x01, 0x02, 0x00, 0x00, 0x00,
234 0x00, 0x24, 0x06, 0x00, 0x00, 0x00, 0xfc, 0x07, 0x00, 0x00, 0x40, 0x10,
235 0x1e, 0x20, 0x90, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00,
236 0x00, 0x80, 0xfc, 0x03, 0x00, 0x00, 0x20, 0x26, 0x22, 0x20, 0xf9, 0x89,
237 0x32, 0xe7, 0x08, 0x00, 0x00, 0x92, 0x38, 0x00, 0x00, 0x00, 0xfc, 0x01,
238 0x00, 0x00, 0x20, 0x21, 0x22, 0xa0, 0x92, 0x88, 0x4a, 0x29, 0x15, 0x00,
239 0x00, 0x00, 0x78, 0x00, 0x00, 0x40, 0xfa, 0x04, 0x00, 0x00, 0x20, 0x21,
240 0x22, 0xa0, 0x93, 0x88, 0x4a, 0x29, 0x1d, 0x00, 0x00, 0x11, 0xf2, 0x00,
241 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x20, 0x21, 0x22, 0xa8, 0x90, 0x88,
242 0x4a, 0x29, 0x05, 0x00, 0x48, 0x40, 0xf0, 0x01, 0x00, 0x80, 0x14, 0x04,
243 0x00, 0x00, 0x20, 0x26, 0x9e, 0x10, 0x93, 0x78, 0x32, 0x29, 0x19, 0x00,
244 0x00, 0x09, 0xe0, 0x03, 0x00, 0x00, 0x80, 0x10, 0x00, 0x00, 0x40, 0x10,
245 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0xc5, 0x03,
246 0x00, 0x40, 0x22, 0x00, 0x00, 0x00, 0x80, 0x08, 0x00, 0x00, 0x00, 0x00,
247 0x00, 0x00, 0x00, 0x00, 0x40, 0x04, 0xc0, 0x07, 0x00, 0x20, 0x08, 0x04,
248 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
249 0x08, 0x50, 0x90, 0x03, 0x00, 0xb0, 0x00, 0x41, 0x00, 0x00, 0x00, 0x00,
250 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00,
251 0x00, 0x38, 0x22, 0x08, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
252 0x00, 0x00, 0x00, 0x00, 0x48, 0x04, 0x44, 0x00, 0x00, 0x3c, 0x08, 0x00,
253 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
254 0x00, 0x20, 0x00, 0x00, 0x00, 0xbf, 0x40, 0x42, 0x00, 0x00, 0x00, 0x00,
255 0x00, 0x00, 0x40, 0x02, 0x00, 0x00, 0x00, 0x00, 0x24, 0x80, 0x48, 0x02,
256 0xc0, 0x1f, 0x00, 0x08, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4e, 0x00,
257 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x05, 0xf0, 0x3f, 0x09, 0x00,
258 0x00, 0x10, 0x24, 0x48, 0x10, 0x12, 0x41, 0x52, 0x24, 0x09, 0x46, 0x71,
259 0x90, 0x20, 0x02, 0xfc, 0xff, 0x1f, 0x80, 0x22, 0x00, 0x90, 0x24, 0x49,
260 0x12, 0x92, 0x40, 0xb2, 0x24, 0x09, 0xc9, 0x49, 0x04, 0x80, 0x90, 0xfc,
261 0xff, 0xbf, 0x24, 0x00, 0x00, 0x90, 0x24, 0x49, 0x12, 0x92, 0x40, 0x92,
262 0x24, 0x06, 0x49, 0x48, 0x50, 0x0a, 0x02, 0xfe, 0xff, 0x3f, 0x00, 0x05,
263 0x00, 0x50, 0xa5, 0x4a, 0x15, 0x92, 0x40, 0x92, 0x24, 0x06, 0x49, 0x48,
264 0x80, 0x40, 0x48, 0xfe, 0xff, 0x3f, 0x49, 0x00, 0x00, 0x20, 0x42, 0x84,
265 0x88, 0x1a, 0x41, 0x92, 0x34, 0x49, 0x49, 0x68, 0x00, 0x38, 0x10, 0x07,
266 0x00, 0x60, 0x80, 0x00, 0x00, 0x20, 0x42, 0x84, 0x88, 0x14, 0x4e, 0x92,
267 0x28, 0x49, 0x46, 0x50, 0x00, 0x80, 0x83, 0x01, 0x00, 0xa0, 0x6a, 0x00,
268 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40,
269 0x00, 0x00, 0xfc, 0x00, 0x00, 0xc0, 0x3b, 0x00, 0x00, 0x00, 0x00, 0x00,
270 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, };
diff --git a/arch/m68knommu/platform/68328/bootlogo.pl b/arch/m68knommu/platform/68328/bootlogo.pl
new file mode 100644
index 00000000000..b04ae3f50da
--- /dev/null
+++ b/arch/m68knommu/platform/68328/bootlogo.pl
@@ -0,0 +1,10 @@
1
2$_ = join("", <>);
3
4s/(0x[0-9a-f]{2})/sprintf("0x%.2x",ord(pack("b8",unpack("B8",chr(hex($1))))))/gei;
5
6s/^ / .byte /gm;
7s/[,};]+$//gm;
8s/^static.*//gm;
9
10print $_;
diff --git a/arch/m68knommu/platform/68328/config.c b/arch/m68knommu/platform/68328/config.c
new file mode 100644
index 00000000000..fd7c93f8648
--- /dev/null
+++ b/arch/m68knommu/platform/68328/config.c
@@ -0,0 +1,125 @@
1/*
2 * linux/arch/$(ARCH)/platform/$(PLATFORM)/config.c
3 *
4 * Copyright (C) 1993 Hamish Macdonald
5 * Copyright (C) 1999 D. Jeff Dionne
6 *
7 * This file is subject to the terms and conditions of the GNU General Public
8 * License. See the file COPYING in the main directory of this archive
9 * for more details.
10 *
11 * VZ Support/Fixes Evan Stawnyczy <e@lineo.ca>
12 */
13
14#include <asm/dbg.h>
15#include <stdarg.h>
16#include <linux/config.h>
17#include <linux/types.h>
18#include <linux/kernel.h>
19#include <linux/mm.h>
20#include <linux/tty.h>
21#include <linux/console.h>
22#include <linux/interrupt.h>
23#include <asm/current.h>
24
25#include <asm/setup.h>
26#include <asm/system.h>
27#include <asm/pgtable.h>
28#include <asm/irq.h>
29#include <asm/machdep.h>
30#include <asm/MC68328.h>
31
32
33void BSP_sched_init(irqreturn_t (*timer_routine)(int, void *, struct pt_regs *))
34{
35
36#ifdef CONFIG_XCOPILOT_BUGS
37 /*
38 * The only thing I know is that CLK32 is not available on Xcopilot
39 * I have little idea about what frequency SYSCLK has on Xcopilot.
40 * The values for prescaler and compare registers were simply
41 * taken from the original source
42 */
43
44 /* Restart mode, Enable int, SYSCLK, Enable timer */
45 TCTL2 = TCTL_OM | TCTL_IRQEN | TCTL_CLKSOURCE_SYSCLK | TCTL_TEN;
46 /* Set prescaler */
47 TPRER2 = 2;
48 /* Set compare register */
49 TCMP2 = 0xd7e4;
50#else
51 /* Restart mode, Enable int, 32KHz, Enable timer */
52 TCTL2 = TCTL_OM | TCTL_IRQEN | TCTL_CLKSOURCE_32KHZ | TCTL_TEN;
53 /* Set prescaler (Divide 32KHz by 32)*/
54 TPRER2 = 31;
55 /* Set compare register 32Khz / 32 / 10 = 100 */
56 TCMP2 = 10;
57#endif
58
59 request_irq(TMR2_IRQ_NUM, timer_routine, IRQ_FLG_LOCK, "timer", NULL);
60}
61
62void BSP_tick(void)
63{
64 /* Reset Timer2 */
65 TSTAT2 &= 0;
66}
67
68unsigned long BSP_gettimeoffset (void)
69{
70 return 0;
71}
72
73void BSP_gettod (int *yearp, int *monp, int *dayp,
74 int *hourp, int *minp, int *secp)
75{
76}
77
78int BSP_hwclk(int op, struct hwclk_time *t)
79{
80 if (!op) {
81 /* read */
82 } else {
83 /* write */
84 }
85 return 0;
86}
87
88int BSP_set_clock_mmss (unsigned long nowtime)
89{
90#if 0
91 short real_seconds = nowtime % 60, real_minutes = (nowtime / 60) % 60;
92
93 tod->second1 = real_seconds / 10;
94 tod->second2 = real_seconds % 10;
95 tod->minute1 = real_minutes / 10;
96 tod->minute2 = real_minutes % 10;
97#endif
98 return 0;
99}
100
101void BSP_reset (void)
102{
103 local_irq_disable();
104 asm volatile ("moveal #0x10c00000, %a0;\n\t"
105 "moveb #0, 0xFFFFF300;\n\t"
106 "moveal 0(%a0), %sp;\n\t"
107 "moveal 4(%a0), %a0;\n\t"
108 "jmp (%a0);");
109}
110
111void config_BSP(char *command, int len)
112{
113 printk(KERN_INFO "\n68328 support D. Jeff Dionne <jeff@uclinux.org>\n");
114 printk(KERN_INFO "68328 support Kenneth Albanowski <kjahds@kjshds.com>\n");
115 printk(KERN_INFO "68328/Pilot support Bernhard Kuhn <kuhn@lpr.e-technik.tu-muenchen.de>\n");
116
117 mach_sched_init = BSP_sched_init;
118 mach_tick = BSP_tick;
119 mach_gettimeoffset = BSP_gettimeoffset;
120 mach_gettod = BSP_gettod;
121 mach_hwclk = NULL;
122 mach_set_clock_mmss = NULL;
123 mach_reset = BSP_reset;
124 *command = '\0';
125}
diff --git a/arch/m68knommu/platform/68328/entry.S b/arch/m68knommu/platform/68328/entry.S
new file mode 100644
index 00000000000..0f5d1fe8eb5
--- /dev/null
+++ b/arch/m68knommu/platform/68328/entry.S
@@ -0,0 +1,276 @@
1/*
2 * linux/arch/m68knommu/platform/68328/entry.S
3 *
4 * Copyright (C) 1991, 1992 Linus Torvalds
5 *
6 * This file is subject to the terms and conditions of the GNU General Public
7 * License. See the file README.legal in the main directory of this archive
8 * for more details.
9 *
10 * Linux/m68k support by Hamish Macdonald
11 */
12
13#include <linux/config.h>
14#include <linux/sys.h>
15#include <linux/linkage.h>
16#include <asm/thread_info.h>
17#include <asm/unistd.h>
18#include <asm/errno.h>
19#include <asm/setup.h>
20#include <asm/segment.h>
21#include <asm/traps.h>
22#include <asm/asm-offsets.h>
23#include <asm/entry.h>
24
25.text
26
27.globl system_call
28.globl resume
29.globl ret_from_exception
30.globl ret_from_signal
31.globl sys_call_table
32.globl ret_from_interrupt
33.globl bad_interrupt
34.globl inthandler1
35.globl inthandler2
36.globl inthandler3
37.globl inthandler4
38.globl inthandler5
39.globl inthandler6
40.globl inthandler7
41
42badsys:
43 movel #-ENOSYS,%sp@(PT_D0)
44 jra ret_from_exception
45
46do_trace:
47 movel #-ENOSYS,%sp@(PT_D0) /* needed for strace*/
48 subql #4,%sp
49 SAVE_SWITCH_STACK
50 jbsr syscall_trace
51 RESTORE_SWITCH_STACK
52 addql #4,%sp
53 movel %sp@(PT_ORIG_D0),%d1
54 movel #-ENOSYS,%d0
55 cmpl #NR_syscalls,%d1
56 jcc 1f
57 lsl #2,%d1
58 lea sys_call_table, %a0
59 jbsr %a0@(%d1)
60
611: movel %d0,%sp@(PT_D0) /* save the return value */
62 subql #4,%sp /* dummy return address */
63 SAVE_SWITCH_STACK
64 jbsr syscall_trace
65
66ret_from_signal:
67 RESTORE_SWITCH_STACK
68 addql #4,%sp
69 jra ret_from_exception
70
71ENTRY(system_call)
72 SAVE_ALL
73
74 /* save top of frame*/
75 pea %sp@
76 jbsr set_esp0
77 addql #4,%sp
78
79 movel %sp@(PT_ORIG_D0),%d0
80
81 movel %sp,%d1 /* get thread_info pointer */
82 andl #0xffffe000,%d1
83 movel %d1,%a2
84 btst #TIF_SYSCALL_TRACE,%a2@(TI_FLAGS)
85 jne do_trace
86 cmpl #NR_syscalls,%d0
87 jcc badsys
88 lsl #2,%d0
89 lea sys_call_table,%a0
90 movel %a0@(%d0), %a0
91 jbsr %a0@
92 movel %d0,%sp@(PT_D0) /* save the return value*/
93
94ret_from_exception:
95 btst #5,%sp@(PT_SR) /* check if returning to kernel*/
96 jeq Luser_return /* if so, skip resched, signals*/
97
98Lkernel_return:
99 RESTORE_ALL
100
101Luser_return:
102 /* only allow interrupts when we are really the last one on the*/
103 /* kernel stack, otherwise stack overflow can occur during*/
104 /* heavy interrupt load*/
105 andw #ALLOWINT,%sr
106
107 movel %sp,%d1 /* get thread_info pointer */
108 andl #0xffffe000,%d1
109 movel %d1,%a2
110 move %a2@(TI_FLAGS),%d1 /* thread_info->flags */
111 andl #_TIF_WORK_MASK,%d1
112 jne Lwork_to_do
113 RESTORE_ALL
114
115Lwork_to_do:
116 movel %a2@(TI_FLAGS),%d1 /* thread_info->flags */
117 btst #TIF_NEED_RESCHED,%d1
118 jne reschedule
119
120Lsignal_return:
121 subql #4,%sp /* dummy return address*/
122 SAVE_SWITCH_STACK
123 pea %sp@(SWITCH_STACK_SIZE)
124 clrl %sp@-
125 bsrw do_signal
126 addql #8,%sp
127 RESTORE_SWITCH_STACK
128 addql #4,%sp
129Lreturn:
130 RESTORE_ALL
131
132/*
133 * This is the main interrupt handler, responsible for calling process_int()
134 */
135inthandler1:
136 SAVE_ALL
137 addql #1,local_irq_count /* put exception # in d0*/
138 movew %sp@(PT_VECTOR), %d0
139 and #0x3ff, %d0
140
141 movel %sp,%sp@-
142 movel #65,%sp@- /* put vector # on stack*/
143 jbsr process_int /* process the IRQ*/
1443: addql #8,%sp /* pop parameters off stack*/
145 bra ret_from_interrupt
146
147inthandler2:
148 SAVE_ALL
149 addql #1,local_irq_count /* put exception # in d0*/
150 movew %sp@(PT_VECTOR), %d0
151 and #0x3ff, %d0
152
153 movel %sp,%sp@-
154 movel #66,%sp@- /* put vector # on stack*/
155 jbsr process_int /* process the IRQ*/
1563: addql #8,%sp /* pop parameters off stack*/
157 bra ret_from_interrupt
158
159inthandler3:
160 SAVE_ALL
161 addql #1,local_irq_count /* put exception # in d0*/
162 movew %sp@(PT_VECTOR), %d0
163 and #0x3ff, %d0
164
165 movel %sp,%sp@-
166 movel #67,%sp@- /* put vector # on stack*/
167 jbsr process_int /* process the IRQ*/
1683: addql #8,%sp /* pop parameters off stack*/
169 bra ret_from_interrupt
170
171inthandler4:
172 SAVE_ALL
173 addql #1,local_irq_count /* put exception # in d0*/
174 movew %sp@(PT_VECTOR), %d0
175 and #0x3ff, %d0
176
177 movel %sp,%sp@-
178 movel #68,%sp@- /* put vector # on stack*/
179 jbsr process_int /* process the IRQ*/
1803: addql #8,%sp /* pop parameters off stack*/
181 bra ret_from_interrupt
182
183inthandler5:
184 SAVE_ALL
185 addql #1,local_irq_count /* put exception # in d0*/
186 movew %sp@(PT_VECTOR), %d0
187 and #0x3ff, %d0
188
189 movel %sp,%sp@-
190 movel #69,%sp@- /* put vector # on stack*/
191 jbsr process_int /* process the IRQ*/
1923: addql #8,%sp /* pop parameters off stack*/
193 bra ret_from_interrupt
194
195inthandler6:
196 SAVE_ALL
197 addql #1,local_irq_count /* put exception # in d0*/
198 movew %sp@(PT_VECTOR), %d0
199 and #0x3ff, %d0
200
201 movel %sp,%sp@-
202 movel #70,%sp@- /* put vector # on stack*/
203 jbsr process_int /* process the IRQ*/
2043: addql #8,%sp /* pop parameters off stack*/
205 bra ret_from_interrupt
206
207inthandler7:
208 SAVE_ALL
209 addql #1,local_irq_count /* put exception # in d0*/
210 movew %sp@(PT_VECTOR), %d0
211 and #0x3ff, %d0
212
213 movel %sp,%sp@-
214 movel #71,%sp@- /* put vector # on stack*/
215 jbsr process_int /* process the IRQ*/
2163: addql #8,%sp /* pop parameters off stack*/
217 bra ret_from_interrupt
218
219inthandler:
220 SAVE_ALL
221 addql #1,local_irq_count /* put exception # in d0*/
222 movew %sp@(PT_VECTOR), %d0
223 and #0x3ff, %d0
224
225 movel %sp,%sp@-
226 movel %d0,%sp@- /* put vector # on stack*/
227 jbsr process_int /* process the IRQ*/
2283: addql #8,%sp /* pop parameters off stack*/
229 bra ret_from_interrupt
230
231ret_from_interrupt:
232 subql #1,local_irq_count
233 jeq 1f
2342:
235 RESTORE_ALL
2361:
237 moveb %sp@(PT_SR), %d0
238 and #7, %d0
239 jhi 2b
240
241 /* check if we need to do software interrupts */
242 movel local_irq_count,%d0
243 jeq ret_from_exception
244
245 pea ret_from_exception
246 jra do_softirq
247
248
249/*
250 * Handler for uninitialized and spurious interrupts.
251 */
252ENTRY(bad_interrupt)
253 addql #1,num_spurious
254 rte
255
256/*
257 * Beware - when entering resume, prev (the current task) is
258 * in a0, next (the new task) is in a1,so don't change these
259 * registers until their contents are no longer needed.
260 */
261ENTRY(resume)
262 movel %a0,%d1 /* save prev thread in d1 */
263 movew %sr,%a0@(TASK_THREAD+THREAD_SR) /* save sr */
264 movel %usp,%a2 /* save usp */
265 movel %a2,%a0@(TASK_THREAD+THREAD_USP)
266
267 SAVE_SWITCH_STACK
268 movel %sp,%a0@(TASK_THREAD+THREAD_KSP) /* save kernel stack */
269 movel %a1@(TASK_THREAD+THREAD_KSP),%sp /* restore new thread stack */
270 RESTORE_SWITCH_STACK
271
272 movel %a1@(TASK_THREAD+THREAD_USP),%a0 /* restore user stack */
273 movel %a0,%usp
274 movew %a1@(TASK_THREAD+THREAD_SR),%sr /* restore thread status reg */
275 rts
276
diff --git a/arch/m68knommu/platform/68328/head-pilot.S b/arch/m68knommu/platform/68328/head-pilot.S
new file mode 100644
index 00000000000..c46775fe04b
--- /dev/null
+++ b/arch/m68knommu/platform/68328/head-pilot.S
@@ -0,0 +1,224 @@
1/*
2 * linux/arch/m68knommu/platform/68328/head-rom.S
3 * - A startup file for the MC68328
4 *
5 * Copyright (C) 1998 D. Jeff Dionne <jeff@ryeham.ee.ryerson.ca>,
6 * Kenneth Albanowski <kjahds@kjahds.com>,
7 * The Silver Hammer Group, Ltd.
8 *
9 * (c) 1995, Dionne & Associates
10 * (c) 1995, DKG Display Tech.
11 */
12
13#define ASSEMBLY
14
15#define IMMED #
16#define DBG_PUTC(x) moveb IMMED x, 0xfffff907
17
18#include <linux/config.h>
19
20.global _stext
21.global _start
22
23.global _rambase
24.global __ramvec
25.global _ramvec
26.global _ramstart
27.global _ramend
28
29.global penguin_bits
30
31#ifdef CONFIG_PILOT
32
33#define IMR 0xFFFFF304
34
35 .data
36 .align 16
37
38penguin_bits:
39#include "bootlogo.rh"
40
41#endif
42
43/*****************************************************************************/
44
45.data
46
47/*
48 * Set up the usable of RAM stuff. Size of RAM is determined then
49 * an initial stack set up at the end.
50 */
51.align 4
52_ramvec:
53.long 0
54_rambase:
55.long 0
56_ramstart:
57.long 0
58_ramend:
59.long 0
60
61.text
62
63_start:
64_stext:
65
66
67#ifdef CONFIG_M68328
68
69#ifdef CONFIG_PILOT
70 .byte 0x4e, 0xfa, 0x00, 0x0a /* Jmp +X bytes */
71 .byte 'b', 'o', 'o', 't'
72 .word 10000
73
74 nop
75#endif
76
77 moveq #0, %d0
78 movew %d0, 0xfffff618 /* Watchdog off */
79 movel #0x00011f07, 0xfffff114 /* CS A1 Mask */
80
81 movew #0x0800, 0xfffff906 /* Ignore CTS */
82 movew #0x010b, 0xfffff902 /* BAUD to 9600 */
83
84 movew #0x2410, 0xfffff200 /* PLLCR */
85 movew #0x123, 0xfffff202 /* PLLFSR */
86
87#ifdef CONFIG_PILOT
88 moveb #0, 0xfffffA27 /* LCKCON */
89 movel #_start, 0xfffffA00 /* LSSA */
90 moveb #0xa, 0xfffffA05 /* LVPW */
91 movew #0x9f, 0xFFFFFa08 /* LXMAX */
92 movew #0x9f, 0xFFFFFa0a /* LYMAX */
93 moveb #9, 0xfffffa29 /* LBAR */
94 moveb #0, 0xfffffa25 /* LPXCD */
95 moveb #0x04, 0xFFFFFa20 /* LPICF */
96 moveb #0x58, 0xfffffA27 /* LCKCON */
97 moveb #0x85, 0xfffff429 /* PFDATA */
98 moveb #0xd8, 0xfffffA27 /* LCKCON */
99 moveb #0xc5, 0xfffff429 /* PFDATA */
100 moveb #0xd5, 0xfffff429 /* PFDATA */
101
102 moveal #0x00100000, %a3
103 moveal #0x100ffc00, %a4
104#endif /* CONFIG_PILOT */
105
106#endif /* CONFIG_M68328 */
107
108 movew #0x2700, %sr
109 lea %a4@(-4), %sp
110
111 DBG_PUTC('\r')
112 DBG_PUTC('\n')
113 DBG_PUTC('A')
114
115 moveq #0,%d0
116 movew #16384, %d0 /* PLL settle wait loop */
117L0:
118 subw #1, %d0
119 bne L0
120
121 DBG_PUTC('B')
122
123 /* Copy command line from beginning of RAM (+16) to end of bss */
124 movel #__ramvec, %d7
125 addl #16, %d7
126 moveal %d7, %a0
127 moveal #_ebss, %a1
128 lea %a1@(512), %a2
129
130 DBG_PUTC('C')
131
132 /* Copy %a0 to %a1 until %a1 == %a2 */
133L2:
134 movel %a0@+, %d0
135 movel %d0, %a1@+
136 cmpal %a1, %a2
137 bhi L2
138
139 /* Copy data+init segment from ROM to RAM */
140 moveal #_etext, %a0
141 moveal #_sdata, %a1
142 moveal #__init_end, %a2
143
144 DBG_PUTC('D')
145
146 /* Copy %a0 to %a1 until %a1 == %a2 */
147LD1:
148 movel %a0@+, %d0
149 movel %d0, %a1@+
150 cmpal %a1, %a2
151 bhi LD1
152
153 DBG_PUTC('E')
154
155 moveal #_sbss, %a0
156 moveal #_ebss, %a1
157
158 /* Copy 0 to %a0 until %a0 == %a1 */
159L1:
160 movel #0, %a0@+
161 cmpal %a0, %a1
162 bhi L1
163
164 DBG_PUTC('F')
165
166 /* Copy command line from end of bss to command line */
167 moveal #_ebss, %a0
168 moveal #command_line, %a1
169 lea %a1@(512), %a2
170
171 DBG_PUTC('G')
172
173 /* Copy %a0 to %a1 until %a1 == %a2 */
174L3:
175 movel %a0@+, %d0
176 movel %d0, %a1@+
177 cmpal %a1, %a2
178 bhi L3
179
180 movel #_sdata, %d0
181 movel %d0, _rambase
182 movel #_ebss, %d0
183 movel %d0, _ramstart
184
185 movel %a4, %d0
186 subl #4096, %d0 /* Reserve 4K of stack */
187 moveq #79, %d7
188 movel %d0, _ramend
189
190 movel %a3, %d0
191 movel %d0, rom_length
192
193 pea 0
194 pea env
195 pea %sp@(4)
196 pea 0
197
198 DBG_PUTC('H')
199
200#ifdef CONFIG_PILOT
201 movel #penguin_bits, 0xFFFFFA00
202 moveb #10, 0xFFFFFA05
203 movew #160, 0xFFFFFA08
204 movew #160, 0xFFFFFA0A
205#endif /* CONFIG_PILOT */
206
207 DBG_PUTC('I')
208
209 lea init_thread_union, %a0
210 lea 0x2000(%a0), %sp
211
212 DBG_PUTC('J')
213 DBG_PUTC('\r')
214 DBG_PUTC('\n')
215
216 jsr start_kernel
217_exit:
218
219 jmp _exit
220
221
222 .data
223env:
224 .long 0
diff --git a/arch/m68knommu/platform/68328/head-ram.S b/arch/m68knommu/platform/68328/head-ram.S
new file mode 100644
index 00000000000..6bdc9bce43f
--- /dev/null
+++ b/arch/m68knommu/platform/68328/head-ram.S
@@ -0,0 +1,171 @@
1#include <linux/config.h>
2
3 .global __main
4 .global __ram_start
5 .global __ram_end
6 .global __rom_start
7 .global __rom_end
8
9 .global _rambase
10 .global _ramstart
11
12 .global splash_bits
13 .global _start
14 .global _stext
15
16#define DEBUG
17#define ROM_OFFSET 0x10C00000
18#define STACK_GAURD 0x10
19
20 .text
21
22_start:
23_stext:
24 movew #0x2700, %sr /* Exceptions off! */
25
26#if 0
27 /* Init chip registers. uCsimm specific */
28 moveb #0x00, 0xfffffb0b /* Watchdog off */
29 moveb #0x10, 0xfffff000 /* SCR */
30
31 movew #0x2400, 0xfffff200 /* PLLCR */
32 movew #0x0123, 0xfffff202 /* PLLFSR */
33
34 moveb #0x00, 0xfffff40b /* enable chip select */
35 moveb #0x00, 0xfffff423 /* enable /DWE */
36 moveb #0x08, 0xfffffd0d /* disable hardmap */
37 moveb #0x07, 0xfffffd0e /* level 7 interrupt clear */
38
39 movew #0x8600, 0xfffff100 /* FLASH at 0x10c00000 */
40 movew #0x018b, 0xfffff110 /* 2Meg, enable, 0ws */
41
42 movew #0x8f00, 0xfffffc00 /* DRAM configuration */
43 movew #0x9667, 0xfffffc02 /* DRAM control */
44 movew #0x0000, 0xfffff106 /* DRAM at 0x00000000 */
45 movew #0x068f, 0xfffff116 /* 8Meg, enable, 0ws */
46
47 moveb #0x40, 0xfffff300 /* IVR */
48 movel #0x007FFFFF, %d0 /* IMR */
49 movel %d0, 0xfffff304
50
51 moveb 0xfffff42b, %d0
52 andb #0xe0, %d0
53 moveb %d0, 0xfffff42b
54
55 moveb #0x08, 0xfffff907 /* Ignore CTS */
56 movew #0x010b, 0xfffff902 /* BAUD to 9600 */
57 movew #0xe100, 0xfffff900 /* enable */
58#endif
59
60 movew #16384, %d0 /* PLL settle wait loop */
61L0:
62 subw #1, %d0
63 bne L0
64#ifdef DEBUG
65 moveq #70, %d7 /* 'F' */
66 moveb %d7,0xfffff907 /* No absolute addresses */
67pclp1:
68 movew 0xfffff906, %d7
69 andw #0x2000, %d7
70 beq pclp1
71#endif /* DEBUG */
72
73#ifdef CONFIG_RELOCATE
74 /* Copy me to RAM */
75 moveal #__rom_start, %a0
76 moveal #__ram_start, %a1
77 moveal #_edata, %a2
78
79 /* Copy %a0 to %a1 until %a1 == %a2 */
80LD1:
81 movel %a0@+, %d0
82 movel %d0, %a1@+
83 cmpal %a1, %a2
84 bhi LD1
85
86#ifdef DEBUG
87 moveq #74, %d7 /* 'J' */
88 moveb %d7,0xfffff907 /* No absolute addresses */
89pclp2:
90 movew 0xfffff906, %d7
91 andw #0x2000, %d7
92 beq pclp2
93#endif /* DEBUG */
94 /* jump into the RAM copy */
95 jmp ram_jump
96ram_jump:
97
98#endif /* CONFIG_RELOCATE */
99
100#ifdef DEBUG
101 moveq #82, %d7 /* 'R' */
102 moveb %d7,0xfffff907 /* No absolute addresses */
103pclp3:
104 movew 0xfffff906, %d7
105 andw #0x2000, %d7
106 beq pclp3
107#endif /* DEBUG */
108 moveal #0x007ffff0, %ssp
109 moveal #_sbss, %a0
110 moveal #_ebss, %a1
111
112 /* Copy 0 to %a0 until %a0 >= %a1 */
113L1:
114 movel #0, %a0@+
115 cmpal %a0, %a1
116 bhi L1
117
118#ifdef DEBUG
119 moveq #67, %d7 /* 'C' */
120 jsr putc
121#endif /* DEBUG */
122
123 pea 0
124 pea env
125 pea %sp@(4)
126 pea 0
127
128#ifdef DEBUG
129 moveq #70, %d7 /* 'F' */
130 jsr putc
131#endif /* DEBUG */
132
133lp:
134 jsr start_kernel
135 jmp lp
136_exit:
137
138 jmp _exit
139
140__main:
141 /* nothing */
142 rts
143
144#ifdef DEBUG
145putc:
146 moveb %d7,0xfffff907
147pclp:
148 movew 0xfffff906, %d7
149 andw #0x2000, %d7
150 beq pclp
151 rts
152#endif /* DEBUG */
153
154 .data
155
156/*
157 * Set up the usable of RAM stuff. Size of RAM is determined then
158 * an initial stack set up at the end.
159 */
160.align 4
161_ramvec:
162.long 0
163_rambase:
164.long 0
165_ramstart:
166.long 0
167_ramend:
168.long 0
169
170env:
171 .long 0
diff --git a/arch/m68knommu/platform/68328/head-rom.S b/arch/m68knommu/platform/68328/head-rom.S
new file mode 100644
index 00000000000..2b448a29701
--- /dev/null
+++ b/arch/m68knommu/platform/68328/head-rom.S
@@ -0,0 +1,109 @@
1#include <linux/config.h>
2
3 .global _start
4 .global _stext
5
6 .global _rambase
7 .global _ramvec
8 .global _ramstart
9 .global _ramend
10
11#ifdef CONFIG_INIT_LCD
12 .global splash_bits
13#endif
14
15 .data
16
17/*
18 * Set up the usable of RAM stuff. Size of RAM is determined then
19 * an initial stack set up at the end.
20 */
21.align 4
22_ramvec:
23.long 0
24_rambase:
25.long 0
26_ramstart:
27.long 0
28_ramend:
29.long 0
30
31#ifdef CONFIG_INIT_LCD
32splash_bits:
33#include "bootlogo.rh"
34#endif
35
36 .text
37_start:
38_stext: movew #0x2700,%sr
39#ifdef CONFIG_INIT_LCD
40 movel #splash_bits, 0xfffffA00 /* LSSA */
41 moveb #0x28, 0xfffffA05 /* LVPW */
42 movew #0x280, 0xFFFFFa08 /* LXMAX */
43 movew #0x1df, 0xFFFFFa0a /* LYMAX */
44 moveb #0, 0xfffffa29 /* LBAR */
45 moveb #0, 0xfffffa25 /* LPXCD */
46 moveb #0x08, 0xFFFFFa20 /* LPICF */
47 moveb #0x01, 0xFFFFFA21 /* -ve pol */
48 moveb #0x81, 0xfffffA27 /* LCKCON */
49 movew #0xff00, 0xfffff412 /* LCD pins */
50#endif
51 moveal #__ramend-CONFIG_MEMORY_RESERVE*0x100000 - 0x10, %sp
52 movew #32767, %d0 /* PLL settle wait loop */
531: subq #1, %d0
54 bne 1b
55
56 /* Copy data segment from ROM to RAM */
57 moveal #_etext, %a0
58 moveal #_sdata, %a1
59 moveal #_edata, %a2
60
61 /* Copy %a0 to %a1 until %a1 == %a2 */
621: movel %a0@+, %a1@+
63 cmpal %a1, %a2
64 bhi 1b
65
66 moveal #_sbss, %a0
67 moveal #_ebss, %a1
68 /* Copy 0 to %a0 until %a0 == %a1 */
69
701:
71 clrl %a0@+
72 cmpal %a0, %a1
73 bhi 1b
74
75 movel #_sdata, %d0
76 movel %d0, _rambase
77 movel #_ebss, %d0
78 movel %d0, _ramstart
79 movel #__ramend-CONFIG_MEMORY_RESERVE*0x100000, %d0
80 movel %d0, _ramend
81 movel #__ramvec, %d0
82 movel %d0, _ramvec
83
84/*
85 * load the current task pointer and stack
86 */
87 lea init_thread_union, %a0
88 lea 0x2000(%a0), %sp
89
901: jsr start_kernel
91 bra 1b
92_exit:
93
94 jmp _exit
95
96
97putc:
98 moveb %d7,0xfffff907
991:
100 movew 0xfffff906, %d7
101 andw #0x2000, %d7
102 beq 1b
103 rts
104
105 .data
106env:
107 .long 0
108 .text
109
diff --git a/arch/m68knommu/platform/68328/ints.c b/arch/m68knommu/platform/68328/ints.c
new file mode 100644
index 00000000000..7437217813d
--- /dev/null
+++ b/arch/m68knommu/platform/68328/ints.c
@@ -0,0 +1,285 @@
1/*
2 * linux/arch/m68knommu/platform/68328/ints.c
3 *
4 * This file is subject to the terms and conditions of the GNU General Public
5 * License. See the file COPYING in the main directory of this archive
6 * for more details.
7 *
8 * Copyright 1996 Roman Zippel
9 * Copyright 1999 D. Jeff Dionne <jeff@rt-control.com>
10 */
11
12#include <linux/module.h>
13#include <linux/types.h>
14#include <linux/kernel.h>
15#include <linux/sched.h>
16#include <linux/kernel_stat.h>
17#include <linux/errno.h>
18
19#include <asm/system.h>
20#include <asm/irq.h>
21#include <asm/traps.h>
22#include <asm/io.h>
23#include <asm/machdep.h>
24#include <asm/setup.h>
25
26#if defined(CONFIG_M68328)
27#include <asm/MC68328.h>
28#elif defined(CONFIG_M68EZ328)
29#include <asm/MC68EZ328.h>
30#elif defined(CONFIG_M68VZ328)
31#include <asm/MC68VZ328.h>
32#endif
33
34/* assembler routines */
35asmlinkage void system_call(void);
36asmlinkage void buserr(void);
37asmlinkage void trap(void);
38asmlinkage void trap3(void);
39asmlinkage void trap4(void);
40asmlinkage void trap5(void);
41asmlinkage void trap6(void);
42asmlinkage void trap7(void);
43asmlinkage void trap8(void);
44asmlinkage void trap9(void);
45asmlinkage void trap10(void);
46asmlinkage void trap11(void);
47asmlinkage void trap12(void);
48asmlinkage void trap13(void);
49asmlinkage void trap14(void);
50asmlinkage void trap15(void);
51asmlinkage void trap33(void);
52asmlinkage void trap34(void);
53asmlinkage void trap35(void);
54asmlinkage void trap36(void);
55asmlinkage void trap37(void);
56asmlinkage void trap38(void);
57asmlinkage void trap39(void);
58asmlinkage void trap40(void);
59asmlinkage void trap41(void);
60asmlinkage void trap42(void);
61asmlinkage void trap43(void);
62asmlinkage void trap44(void);
63asmlinkage void trap45(void);
64asmlinkage void trap46(void);
65asmlinkage void trap47(void);
66asmlinkage irqreturn_t bad_interrupt(int, void *, struct pt_regs *);
67asmlinkage irqreturn_t inthandler(void);
68asmlinkage irqreturn_t inthandler1(void);
69asmlinkage irqreturn_t inthandler2(void);
70asmlinkage irqreturn_t inthandler3(void);
71asmlinkage irqreturn_t inthandler4(void);
72asmlinkage irqreturn_t inthandler5(void);
73asmlinkage irqreturn_t inthandler6(void);
74asmlinkage irqreturn_t inthandler7(void);
75
76extern e_vector *_ramvec;
77
78/* The number of spurious interrupts */
79volatile unsigned int num_spurious;
80unsigned int local_irq_count[NR_CPUS];
81
82/* irq node variables for the 32 (potential) on chip sources */
83static irq_node_t int_irq_list[NR_IRQS];
84
85#if !defined(CONFIG_DRAGEN2)
86asm (".global _start, __ramend/n/t"
87 ".section .romvec/n"
88 "e_vectors:\n\t"
89 ".long __ramend-4, _start, buserr, trap, trap, trap, trap, trap\n\t"
90 ".long trap, trap, trap, trap, trap, trap, trap, trap\n\t"
91 ".long trap, trap, trap, trap, trap, trap, trap, trap\n\t"
92 ".long trap, trap, trap, trap\n\t"
93 ".long trap, trap, trap, trap\n\t"
94 /*.long inthandler, inthandler, inthandler, inthandler
95 .long inthandler4, inthandler, inthandler, inthandler */
96 /* TRAP #0-15 */
97 ".long system_call, trap, trap, trap, trap, trap, trap, trap\n\t"
98 ".long trap, trap, trap, trap, trap, trap, trap, trap\n\t"
99 ".long 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0\n\t"
100 ".text\n"
101 "ignore: rte");
102#endif
103
104/*
105 * This function should be called during kernel startup to initialize
106 * the IRQ handling routines.
107 */
108void init_IRQ(void)
109{
110 int i;
111
112 /* set up the vectors */
113 for (i = 72; i < 256; ++i)
114 _ramvec[i] = (e_vector) bad_interrupt;
115
116 _ramvec[32] = system_call;
117
118 _ramvec[65] = (e_vector) inthandler1;
119 _ramvec[66] = (e_vector) inthandler2;
120 _ramvec[67] = (e_vector) inthandler3;
121 _ramvec[68] = (e_vector) inthandler4;
122 _ramvec[69] = (e_vector) inthandler5;
123 _ramvec[70] = (e_vector) inthandler6;
124 _ramvec[71] = (e_vector) inthandler7;
125
126 IVR = 0x40; /* Set DragonBall IVR (interrupt base) to 64 */
127
128 /* initialize handlers */
129 for (i = 0; i < NR_IRQS; i++) {
130 int_irq_list[i].handler = bad_interrupt;
131 int_irq_list[i].flags = IRQ_FLG_STD;
132 int_irq_list[i].dev_id = NULL;
133 int_irq_list[i].devname = NULL;
134 }
135
136 /* turn off all interrupts */
137 IMR = ~0;
138}
139
140int request_irq(
141 unsigned int irq,
142 irqreturn_t (*handler)(int, void *, struct pt_regs *),
143 unsigned long flags,
144 const char *devname,
145 void *dev_id)
146{
147 if (irq >= NR_IRQS) {
148 printk (KERN_ERR "%s: Unknown IRQ %d from %s\n", __FUNCTION__, irq, devname);
149 return -ENXIO;
150 }
151
152 if (!(int_irq_list[irq].flags & IRQ_FLG_STD)) {
153 if (int_irq_list[irq].flags & IRQ_FLG_LOCK) {
154 printk(KERN_ERR "%s: IRQ %d from %s is not replaceable\n",
155 __FUNCTION__, irq, int_irq_list[irq].devname);
156 return -EBUSY;
157 }
158 if (flags & IRQ_FLG_REPLACE) {
159 printk(KERN_ERR "%s: %s can't replace IRQ %d from %s\n",
160 __FUNCTION__, devname, irq, int_irq_list[irq].devname);
161 return -EBUSY;
162 }
163 }
164
165 int_irq_list[irq].handler = handler;
166 int_irq_list[irq].flags = flags;
167 int_irq_list[irq].dev_id = dev_id;
168 int_irq_list[irq].devname = devname;
169
170 IMR &= ~(1<<irq);
171
172 return 0;
173}
174
175EXPORT_SYMBOL(request_irq);
176
177void free_irq(unsigned int irq, void *dev_id)
178{
179 if (irq >= NR_IRQS) {
180 printk (KERN_ERR "%s: Unknown IRQ %d\n", __FUNCTION__, irq);
181 return;
182 }
183
184 if (int_irq_list[irq].dev_id != dev_id)
185 printk(KERN_INFO "%s: removing probably wrong IRQ %d from %s\n",
186 __FUNCTION__, irq, int_irq_list[irq].devname);
187
188 int_irq_list[irq].handler = bad_interrupt;
189 int_irq_list[irq].flags = IRQ_FLG_STD;
190 int_irq_list[irq].dev_id = NULL;
191 int_irq_list[irq].devname = NULL;
192
193 IMR |= 1<<irq;
194}
195
196EXPORT_SYMBOL(free_irq);
197
198int show_interrupts(struct seq_file *p, void *v)
199{
200 int i = *(loff_t *) v;
201
202 if (i < NR_IRQS) {
203 if (int_irq_list[i].devname) {
204 seq_printf(p, "%3d: %10u ", i, kstat_cpu(0).irqs[i]);
205 if (int_irq_list[i].flags & IRQ_FLG_LOCK)
206 seq_printf(p, "L ");
207 else
208 seq_printf(p, " ");
209 seq_printf(p, "%s\n", int_irq_list[i].devname);
210 }
211 }
212 if (i == NR_IRQS)
213 seq_printf(p, " : %10u spurious\n", num_spurious);
214
215 return 0;
216}
217
218/* The 68k family did not have a good way to determine the source
219 * of interrupts until later in the family. The EC000 core does
220 * not provide the vector number on the stack, we vector everything
221 * into one vector and look in the blasted mask register...
222 * This code is designed to be fast, almost constant time, not clean!
223 */
224void process_int(int vec, struct pt_regs *fp)
225{
226 int irq;
227 int mask;
228
229 unsigned long pend = ISR;
230
231 while (pend) {
232 if (pend & 0x0000ffff) {
233 if (pend & 0x000000ff) {
234 if (pend & 0x0000000f) {
235 mask = 0x00000001;
236 irq = 0;
237 } else {
238 mask = 0x00000010;
239 irq = 4;
240 }
241 } else {
242 if (pend & 0x00000f00) {
243 mask = 0x00000100;
244 irq = 8;
245 } else {
246 mask = 0x00001000;
247 irq = 12;
248 }
249 }
250 } else {
251 if (pend & 0x00ff0000) {
252 if (pend & 0x000f0000) {
253 mask = 0x00010000;
254 irq = 16;
255 } else {
256 mask = 0x00100000;
257 irq = 20;
258 }
259 } else {
260 if (pend & 0x0f000000) {
261 mask = 0x01000000;
262 irq = 24;
263 } else {
264 mask = 0x10000000;
265 irq = 28;
266 }
267 }
268 }
269
270 while (! (mask & pend)) {
271 mask <<=1;
272 irq++;
273 }
274
275 kstat_cpu(0).irqs[irq]++;
276
277 if (int_irq_list[irq].handler) {
278 int_irq_list[irq].handler(irq, int_irq_list[irq].dev_id, fp);
279 } else {
280 printk(KERN_ERR "unregistered interrupt %d!\nTurning it off in the IMR...\n", irq);
281 IMR |= mask;
282 }
283 pend &= ~mask;
284 }
285}