diff options
Diffstat (limited to 'arch/m68k/platform/68328')
-rw-r--r-- | arch/m68k/platform/68328/Makefile | 22 | ||||
-rw-r--r-- | arch/m68k/platform/68328/bootlogo.h | 270 | ||||
-rw-r--r-- | arch/m68k/platform/68328/bootlogo.pl | 10 | ||||
-rw-r--r-- | arch/m68k/platform/68328/config.c | 52 | ||||
-rw-r--r-- | arch/m68k/platform/68328/entry.S | 263 | ||||
-rw-r--r-- | arch/m68k/platform/68328/head-de2.S | 128 | ||||
-rw-r--r-- | arch/m68k/platform/68328/head-pilot.S | 222 | ||||
-rw-r--r-- | arch/m68k/platform/68328/head-ram.S | 141 | ||||
-rw-r--r-- | arch/m68k/platform/68328/head-rom.S | 110 | ||||
-rw-r--r-- | arch/m68k/platform/68328/ints.c | 186 | ||||
-rw-r--r-- | arch/m68k/platform/68328/romvec.S | 35 | ||||
-rw-r--r-- | arch/m68k/platform/68328/timers.c | 134 |
12 files changed, 1573 insertions, 0 deletions
diff --git a/arch/m68k/platform/68328/Makefile b/arch/m68k/platform/68328/Makefile new file mode 100644 index 00000000000..5e5435552d5 --- /dev/null +++ b/arch/m68k/platform/68328/Makefile | |||
@@ -0,0 +1,22 @@ | |||
1 | # | ||
2 | # Makefile for arch/m68knommu/platform/68328. | ||
3 | # | ||
4 | |||
5 | head-y = head-$(MODEL).o | ||
6 | head-$(CONFIG_PILOT) = head-pilot.o | ||
7 | head-$(CONFIG_DRAGEN2) = head-de2.o | ||
8 | |||
9 | obj-y += entry.o ints.o timers.o | ||
10 | obj-$(CONFIG_M68328) += config.o | ||
11 | obj-$(CONFIG_ROM) += romvec.o | ||
12 | |||
13 | extra-y := head.o | ||
14 | extra-$(CONFIG_M68328) += bootlogo.rh head.o | ||
15 | |||
16 | $(obj)/bootlogo.rh: $(src)/bootlogo.h | ||
17 | perl $(src)/bootlogo.pl < $(src)/bootlogo.h > $(obj)/bootlogo.rh | ||
18 | |||
19 | $(obj)/head.o: $(obj)/$(head-y) | ||
20 | ln -sf $(head-y) $(obj)/head.o | ||
21 | |||
22 | clean-files := $(obj)/bootlogo.rh $(obj)/head.o $(head-y) | ||
diff --git a/arch/m68k/platform/68328/bootlogo.h b/arch/m68k/platform/68328/bootlogo.h new file mode 100644 index 00000000000..67bc2c17386 --- /dev/null +++ b/arch/m68k/platform/68328/bootlogo.h | |||
@@ -0,0 +1,270 @@ | |||
1 | #define bootlogo_width 160 | ||
2 | #define bootlogo_height 160 | ||
3 | static 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/m68k/platform/68328/bootlogo.pl b/arch/m68k/platform/68328/bootlogo.pl new file mode 100644 index 00000000000..b04ae3f50da --- /dev/null +++ b/arch/m68k/platform/68328/bootlogo.pl | |||
@@ -0,0 +1,10 @@ | |||
1 | |||
2 | $_ = join("", <>); | ||
3 | |||
4 | s/(0x[0-9a-f]{2})/sprintf("0x%.2x",ord(pack("b8",unpack("B8",chr(hex($1))))))/gei; | ||
5 | |||
6 | s/^ / .byte /gm; | ||
7 | s/[,};]+$//gm; | ||
8 | s/^static.*//gm; | ||
9 | |||
10 | print $_; | ||
diff --git a/arch/m68k/platform/68328/config.c b/arch/m68k/platform/68328/config.c new file mode 100644 index 00000000000..a7bd21deb00 --- /dev/null +++ b/arch/m68k/platform/68328/config.c | |||
@@ -0,0 +1,52 @@ | |||
1 | /***************************************************************************/ | ||
2 | |||
3 | /* | ||
4 | * linux/arch/m68knommu/platform/68328/config.c | ||
5 | * | ||
6 | * Copyright (C) 1993 Hamish Macdonald | ||
7 | * Copyright (C) 1999 D. Jeff Dionne | ||
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 | * VZ Support/Fixes Evan Stawnyczy <e@lineo.ca> | ||
14 | */ | ||
15 | |||
16 | /***************************************************************************/ | ||
17 | |||
18 | #include <linux/types.h> | ||
19 | #include <linux/kernel.h> | ||
20 | #include <asm/system.h> | ||
21 | #include <asm/machdep.h> | ||
22 | #include <asm/MC68328.h> | ||
23 | |||
24 | /***************************************************************************/ | ||
25 | |||
26 | void m68328_timer_gettod(int *year, int *mon, int *day, int *hour, int *min, int *sec); | ||
27 | |||
28 | /***************************************************************************/ | ||
29 | |||
30 | void m68328_reset (void) | ||
31 | { | ||
32 | local_irq_disable(); | ||
33 | asm volatile ("moveal #0x10c00000, %a0;\n\t" | ||
34 | "moveb #0, 0xFFFFF300;\n\t" | ||
35 | "moveal 0(%a0), %sp;\n\t" | ||
36 | "moveal 4(%a0), %a0;\n\t" | ||
37 | "jmp (%a0);"); | ||
38 | } | ||
39 | |||
40 | /***************************************************************************/ | ||
41 | |||
42 | void config_BSP(char *command, int len) | ||
43 | { | ||
44 | printk(KERN_INFO "\n68328 support D. Jeff Dionne <jeff@uclinux.org>\n"); | ||
45 | printk(KERN_INFO "68328 support Kenneth Albanowski <kjahds@kjshds.com>\n"); | ||
46 | printk(KERN_INFO "68328/Pilot support Bernhard Kuhn <kuhn@lpr.e-technik.tu-muenchen.de>\n"); | ||
47 | |||
48 | mach_gettod = m68328_timer_gettod; | ||
49 | mach_reset = m68328_reset; | ||
50 | } | ||
51 | |||
52 | /***************************************************************************/ | ||
diff --git a/arch/m68k/platform/68328/entry.S b/arch/m68k/platform/68328/entry.S new file mode 100644 index 00000000000..676960cf022 --- /dev/null +++ b/arch/m68k/platform/68328/entry.S | |||
@@ -0,0 +1,263 @@ | |||
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/sys.h> | ||
14 | #include <linux/linkage.h> | ||
15 | #include <asm/thread_info.h> | ||
16 | #include <asm/unistd.h> | ||
17 | #include <asm/errno.h> | ||
18 | #include <asm/setup.h> | ||
19 | #include <asm/segment.h> | ||
20 | #include <asm/traps.h> | ||
21 | #include <asm/asm-offsets.h> | ||
22 | #include <asm/entry.h> | ||
23 | |||
24 | .text | ||
25 | |||
26 | .globl system_call | ||
27 | .globl resume | ||
28 | .globl ret_from_exception | ||
29 | .globl ret_from_signal | ||
30 | .globl sys_call_table | ||
31 | .globl ret_from_interrupt | ||
32 | .globl bad_interrupt | ||
33 | .globl inthandler1 | ||
34 | .globl inthandler2 | ||
35 | .globl inthandler3 | ||
36 | .globl inthandler4 | ||
37 | .globl inthandler5 | ||
38 | .globl inthandler6 | ||
39 | .globl inthandler7 | ||
40 | |||
41 | badsys: | ||
42 | movel #-ENOSYS,%sp@(PT_OFF_D0) | ||
43 | jra ret_from_exception | ||
44 | |||
45 | do_trace: | ||
46 | movel #-ENOSYS,%sp@(PT_OFF_D0) /* needed for strace*/ | ||
47 | subql #4,%sp | ||
48 | SAVE_SWITCH_STACK | ||
49 | jbsr syscall_trace_enter | ||
50 | RESTORE_SWITCH_STACK | ||
51 | addql #4,%sp | ||
52 | movel %sp@(PT_OFF_ORIG_D0),%d1 | ||
53 | movel #-ENOSYS,%d0 | ||
54 | cmpl #NR_syscalls,%d1 | ||
55 | jcc 1f | ||
56 | lsl #2,%d1 | ||
57 | lea sys_call_table, %a0 | ||
58 | jbsr %a0@(%d1) | ||
59 | |||
60 | 1: movel %d0,%sp@(PT_OFF_D0) /* save the return value */ | ||
61 | subql #4,%sp /* dummy return address */ | ||
62 | SAVE_SWITCH_STACK | ||
63 | jbsr syscall_trace_leave | ||
64 | |||
65 | ret_from_signal: | ||
66 | RESTORE_SWITCH_STACK | ||
67 | addql #4,%sp | ||
68 | jra ret_from_exception | ||
69 | |||
70 | ENTRY(system_call) | ||
71 | SAVE_ALL | ||
72 | |||
73 | /* save top of frame*/ | ||
74 | pea %sp@ | ||
75 | jbsr set_esp0 | ||
76 | addql #4,%sp | ||
77 | |||
78 | movel %sp@(PT_OFF_ORIG_D0),%d0 | ||
79 | |||
80 | movel %sp,%d1 /* get thread_info pointer */ | ||
81 | andl #-THREAD_SIZE,%d1 | ||
82 | movel %d1,%a2 | ||
83 | btst #(TIF_SYSCALL_TRACE%8),%a2@(TI_FLAGS+(31-TIF_SYSCALL_TRACE)/8) | ||
84 | jne do_trace | ||
85 | cmpl #NR_syscalls,%d0 | ||
86 | jcc badsys | ||
87 | lsl #2,%d0 | ||
88 | lea sys_call_table,%a0 | ||
89 | movel %a0@(%d0), %a0 | ||
90 | jbsr %a0@ | ||
91 | movel %d0,%sp@(PT_OFF_D0) /* save the return value*/ | ||
92 | |||
93 | ret_from_exception: | ||
94 | btst #5,%sp@(PT_OFF_SR) /* check if returning to kernel*/ | ||
95 | jeq Luser_return /* if so, skip resched, signals*/ | ||
96 | |||
97 | Lkernel_return: | ||
98 | RESTORE_ALL | ||
99 | |||
100 | Luser_return: | ||
101 | /* only allow interrupts when we are really the last one on the*/ | ||
102 | /* kernel stack, otherwise stack overflow can occur during*/ | ||
103 | /* heavy interrupt load*/ | ||
104 | andw #ALLOWINT,%sr | ||
105 | |||
106 | movel %sp,%d1 /* get thread_info pointer */ | ||
107 | andl #-THREAD_SIZE,%d1 | ||
108 | movel %d1,%a2 | ||
109 | 1: | ||
110 | move %a2@(TI_FLAGS),%d1 /* thread_info->flags */ | ||
111 | jne Lwork_to_do | ||
112 | RESTORE_ALL | ||
113 | |||
114 | Lwork_to_do: | ||
115 | movel %a2@(TI_FLAGS),%d1 /* thread_info->flags */ | ||
116 | btst #TIF_NEED_RESCHED,%d1 | ||
117 | jne reschedule | ||
118 | |||
119 | Lsignal_return: | ||
120 | subql #4,%sp /* dummy return address*/ | ||
121 | SAVE_SWITCH_STACK | ||
122 | pea %sp@(SWITCH_STACK_SIZE) | ||
123 | bsrw do_signal | ||
124 | addql #4,%sp | ||
125 | RESTORE_SWITCH_STACK | ||
126 | addql #4,%sp | ||
127 | jra 1b | ||
128 | |||
129 | /* | ||
130 | * This is the main interrupt handler, responsible for calling process_int() | ||
131 | */ | ||
132 | inthandler1: | ||
133 | SAVE_ALL | ||
134 | movew %sp@(PT_OFF_FORMATVEC), %d0 | ||
135 | and #0x3ff, %d0 | ||
136 | |||
137 | movel %sp,%sp@- | ||
138 | movel #65,%sp@- /* put vector # on stack*/ | ||
139 | jbsr process_int /* process the IRQ*/ | ||
140 | 3: addql #8,%sp /* pop parameters off stack*/ | ||
141 | bra ret_from_interrupt | ||
142 | |||
143 | inthandler2: | ||
144 | SAVE_ALL | ||
145 | movew %sp@(PT_OFF_FORMATVEC), %d0 | ||
146 | and #0x3ff, %d0 | ||
147 | |||
148 | movel %sp,%sp@- | ||
149 | movel #66,%sp@- /* put vector # on stack*/ | ||
150 | jbsr process_int /* process the IRQ*/ | ||
151 | 3: addql #8,%sp /* pop parameters off stack*/ | ||
152 | bra ret_from_interrupt | ||
153 | |||
154 | inthandler3: | ||
155 | SAVE_ALL | ||
156 | movew %sp@(PT_OFF_FORMATVEC), %d0 | ||
157 | and #0x3ff, %d0 | ||
158 | |||
159 | movel %sp,%sp@- | ||
160 | movel #67,%sp@- /* put vector # on stack*/ | ||
161 | jbsr process_int /* process the IRQ*/ | ||
162 | 3: addql #8,%sp /* pop parameters off stack*/ | ||
163 | bra ret_from_interrupt | ||
164 | |||
165 | inthandler4: | ||
166 | SAVE_ALL | ||
167 | movew %sp@(PT_OFF_FORMATVEC), %d0 | ||
168 | and #0x3ff, %d0 | ||
169 | |||
170 | movel %sp,%sp@- | ||
171 | movel #68,%sp@- /* put vector # on stack*/ | ||
172 | jbsr process_int /* process the IRQ*/ | ||
173 | 3: addql #8,%sp /* pop parameters off stack*/ | ||
174 | bra ret_from_interrupt | ||
175 | |||
176 | inthandler5: | ||
177 | SAVE_ALL | ||
178 | movew %sp@(PT_OFF_FORMATVEC), %d0 | ||
179 | and #0x3ff, %d0 | ||
180 | |||
181 | movel %sp,%sp@- | ||
182 | movel #69,%sp@- /* put vector # on stack*/ | ||
183 | jbsr process_int /* process the IRQ*/ | ||
184 | 3: addql #8,%sp /* pop parameters off stack*/ | ||
185 | bra ret_from_interrupt | ||
186 | |||
187 | inthandler6: | ||
188 | SAVE_ALL | ||
189 | movew %sp@(PT_OFF_FORMATVEC), %d0 | ||
190 | and #0x3ff, %d0 | ||
191 | |||
192 | movel %sp,%sp@- | ||
193 | movel #70,%sp@- /* put vector # on stack*/ | ||
194 | jbsr process_int /* process the IRQ*/ | ||
195 | 3: addql #8,%sp /* pop parameters off stack*/ | ||
196 | bra ret_from_interrupt | ||
197 | |||
198 | inthandler7: | ||
199 | SAVE_ALL | ||
200 | movew %sp@(PT_OFF_FORMATVEC), %d0 | ||
201 | and #0x3ff, %d0 | ||
202 | |||
203 | movel %sp,%sp@- | ||
204 | movel #71,%sp@- /* put vector # on stack*/ | ||
205 | jbsr process_int /* process the IRQ*/ | ||
206 | 3: addql #8,%sp /* pop parameters off stack*/ | ||
207 | bra ret_from_interrupt | ||
208 | |||
209 | inthandler: | ||
210 | SAVE_ALL | ||
211 | movew %sp@(PT_OFF_FORMATVEC), %d0 | ||
212 | and #0x3ff, %d0 | ||
213 | |||
214 | movel %sp,%sp@- | ||
215 | movel %d0,%sp@- /* put vector # on stack*/ | ||
216 | jbsr process_int /* process the IRQ*/ | ||
217 | 3: addql #8,%sp /* pop parameters off stack*/ | ||
218 | bra ret_from_interrupt | ||
219 | |||
220 | ret_from_interrupt: | ||
221 | jeq 1f | ||
222 | 2: | ||
223 | RESTORE_ALL | ||
224 | 1: | ||
225 | moveb %sp@(PT_OFF_SR), %d0 | ||
226 | and #7, %d0 | ||
227 | jhi 2b | ||
228 | |||
229 | /* check if we need to do software interrupts */ | ||
230 | jeq ret_from_exception | ||
231 | |||
232 | pea ret_from_exception | ||
233 | jra do_softirq | ||
234 | |||
235 | |||
236 | /* | ||
237 | * Handler for uninitialized and spurious interrupts. | ||
238 | */ | ||
239 | ENTRY(bad_interrupt) | ||
240 | addql #1,num_spurious | ||
241 | rte | ||
242 | |||
243 | /* | ||
244 | * Beware - when entering resume, prev (the current task) is | ||
245 | * in a0, next (the new task) is in a1,so don't change these | ||
246 | * registers until their contents are no longer needed. | ||
247 | */ | ||
248 | ENTRY(resume) | ||
249 | movel %a0,%d1 /* save prev thread in d1 */ | ||
250 | movew %sr,%a0@(TASK_THREAD+THREAD_SR) /* save sr */ | ||
251 | movel %usp,%a2 /* save usp */ | ||
252 | movel %a2,%a0@(TASK_THREAD+THREAD_USP) | ||
253 | |||
254 | SAVE_SWITCH_STACK | ||
255 | movel %sp,%a0@(TASK_THREAD+THREAD_KSP) /* save kernel stack */ | ||
256 | movel %a1@(TASK_THREAD+THREAD_KSP),%sp /* restore new thread stack */ | ||
257 | RESTORE_SWITCH_STACK | ||
258 | |||
259 | movel %a1@(TASK_THREAD+THREAD_USP),%a0 /* restore user stack */ | ||
260 | movel %a0,%usp | ||
261 | movew %a1@(TASK_THREAD+THREAD_SR),%sr /* restore thread status reg */ | ||
262 | rts | ||
263 | |||
diff --git a/arch/m68k/platform/68328/head-de2.S b/arch/m68k/platform/68328/head-de2.S new file mode 100644 index 00000000000..f632fdcb93e --- /dev/null +++ b/arch/m68k/platform/68328/head-de2.S | |||
@@ -0,0 +1,128 @@ | |||
1 | |||
2 | #define MEM_END 0x00800000 /* Memory size 8Mb */ | ||
3 | |||
4 | #undef CRT_DEBUG | ||
5 | |||
6 | .macro PUTC CHAR | ||
7 | #ifdef CRT_DEBUG | ||
8 | moveq #\CHAR, %d7 | ||
9 | jsr putc | ||
10 | #endif | ||
11 | .endm | ||
12 | |||
13 | .global _start | ||
14 | .global _rambase | ||
15 | .global _ramvec | ||
16 | .global _ramstart | ||
17 | .global _ramend | ||
18 | |||
19 | .data | ||
20 | |||
21 | /* | ||
22 | * Set up the usable of RAM stuff | ||
23 | */ | ||
24 | _rambase: | ||
25 | .long 0 | ||
26 | _ramvec: | ||
27 | .long 0 | ||
28 | _ramstart: | ||
29 | .long 0 | ||
30 | _ramend: | ||
31 | .long 0 | ||
32 | |||
33 | .text | ||
34 | |||
35 | _start: | ||
36 | |||
37 | /* | ||
38 | * Setup initial stack | ||
39 | */ | ||
40 | /* disable all interrupts */ | ||
41 | movew #0x2700, %sr | ||
42 | movel #-1, 0xfffff304 | ||
43 | movel #MEM_END-4, %sp | ||
44 | |||
45 | PUTC '\r' | ||
46 | PUTC '\n' | ||
47 | PUTC 'A' | ||
48 | PUTC 'B' | ||
49 | |||
50 | /* | ||
51 | * Determine end of RAM | ||
52 | */ | ||
53 | |||
54 | movel #MEM_END, %a0 | ||
55 | movel %a0, _ramend | ||
56 | |||
57 | PUTC 'C' | ||
58 | |||
59 | /* | ||
60 | * Move ROM filesystem above bss :-) | ||
61 | */ | ||
62 | |||
63 | moveal #_sbss, %a0 /* romfs at the start of bss */ | ||
64 | moveal #_ebss, %a1 /* Set up destination */ | ||
65 | movel %a0, %a2 /* Copy of bss start */ | ||
66 | |||
67 | movel 8(%a0), %d1 /* Get size of ROMFS */ | ||
68 | addql #8, %d1 /* Allow for rounding */ | ||
69 | andl #0xfffffffc, %d1 /* Whole words */ | ||
70 | |||
71 | addl %d1, %a0 /* Copy from end */ | ||
72 | addl %d1, %a1 /* Copy from end */ | ||
73 | movel %a1, _ramstart /* Set start of ram */ | ||
74 | |||
75 | 1: | ||
76 | movel -(%a0), %d0 /* Copy dword */ | ||
77 | movel %d0, -(%a1) | ||
78 | cmpl %a0, %a2 /* Check if at end */ | ||
79 | bne 1b | ||
80 | |||
81 | PUTC 'D' | ||
82 | |||
83 | /* | ||
84 | * Initialize BSS segment to 0 | ||
85 | */ | ||
86 | |||
87 | lea _sbss, %a0 | ||
88 | lea _ebss, %a1 | ||
89 | |||
90 | /* Copy 0 to %a0 until %a0 == %a1 */ | ||
91 | 2: cmpal %a0, %a1 | ||
92 | beq 1f | ||
93 | clrl (%a0)+ | ||
94 | bra 2b | ||
95 | 1: | ||
96 | |||
97 | PUTC 'E' | ||
98 | |||
99 | /* | ||
100 | * Load the current task pointer and stack | ||
101 | */ | ||
102 | |||
103 | lea init_thread_union, %a0 | ||
104 | lea 0x2000(%a0), %sp | ||
105 | |||
106 | PUTC 'F' | ||
107 | PUTC '\r' | ||
108 | PUTC '\n' | ||
109 | |||
110 | /* | ||
111 | * Go | ||
112 | */ | ||
113 | |||
114 | jmp start_kernel | ||
115 | |||
116 | /* | ||
117 | * Local functions | ||
118 | */ | ||
119 | |||
120 | #ifdef CRT_DEBUG | ||
121 | putc: | ||
122 | moveb %d7, 0xfffff907 | ||
123 | 1: | ||
124 | movew 0xfffff906, %d7 | ||
125 | andw #0x2000, %d7 | ||
126 | beq 1b | ||
127 | rts | ||
128 | #endif | ||
diff --git a/arch/m68k/platform/68328/head-pilot.S b/arch/m68k/platform/68328/head-pilot.S new file mode 100644 index 00000000000..aecff532b34 --- /dev/null +++ b/arch/m68k/platform/68328/head-pilot.S | |||
@@ -0,0 +1,222 @@ | |||
1 | /* | ||
2 | * linux/arch/m68knommu/platform/68328/head-pilot.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 | |||
19 | .global _stext | ||
20 | .global _start | ||
21 | |||
22 | .global _rambase | ||
23 | .global _ramvec | ||
24 | .global _ramstart | ||
25 | .global _ramend | ||
26 | |||
27 | .global penguin_bits | ||
28 | |||
29 | #ifdef CONFIG_PILOT | ||
30 | |||
31 | #define IMR 0xFFFFF304 | ||
32 | |||
33 | .data | ||
34 | .align 16 | ||
35 | |||
36 | penguin_bits: | ||
37 | #include "bootlogo.rh" | ||
38 | |||
39 | #endif | ||
40 | |||
41 | /*****************************************************************************/ | ||
42 | |||
43 | .data | ||
44 | |||
45 | /* | ||
46 | * Set up the usable of RAM stuff. Size of RAM is determined then | ||
47 | * an initial stack set up at the end. | ||
48 | */ | ||
49 | .align 4 | ||
50 | _ramvec: | ||
51 | .long 0 | ||
52 | _rambase: | ||
53 | .long 0 | ||
54 | _ramstart: | ||
55 | .long 0 | ||
56 | _ramend: | ||
57 | .long 0 | ||
58 | |||
59 | .text | ||
60 | |||
61 | _start: | ||
62 | _stext: | ||
63 | |||
64 | |||
65 | #ifdef CONFIG_M68328 | ||
66 | |||
67 | #ifdef CONFIG_PILOT | ||
68 | .byte 0x4e, 0xfa, 0x00, 0x0a /* Jmp +X bytes */ | ||
69 | .byte 'b', 'o', 'o', 't' | ||
70 | .word 10000 | ||
71 | |||
72 | nop | ||
73 | #endif | ||
74 | |||
75 | moveq #0, %d0 | ||
76 | movew %d0, 0xfffff618 /* Watchdog off */ | ||
77 | movel #0x00011f07, 0xfffff114 /* CS A1 Mask */ | ||
78 | |||
79 | movew #0x0800, 0xfffff906 /* Ignore CTS */ | ||
80 | movew #0x010b, 0xfffff902 /* BAUD to 9600 */ | ||
81 | |||
82 | movew #0x2410, 0xfffff200 /* PLLCR */ | ||
83 | movew #0x123, 0xfffff202 /* PLLFSR */ | ||
84 | |||
85 | #ifdef CONFIG_PILOT | ||
86 | moveb #0, 0xfffffA27 /* LCKCON */ | ||
87 | movel #_start, 0xfffffA00 /* LSSA */ | ||
88 | moveb #0xa, 0xfffffA05 /* LVPW */ | ||
89 | movew #0x9f, 0xFFFFFa08 /* LXMAX */ | ||
90 | movew #0x9f, 0xFFFFFa0a /* LYMAX */ | ||
91 | moveb #9, 0xfffffa29 /* LBAR */ | ||
92 | moveb #0, 0xfffffa25 /* LPXCD */ | ||
93 | moveb #0x04, 0xFFFFFa20 /* LPICF */ | ||
94 | moveb #0x58, 0xfffffA27 /* LCKCON */ | ||
95 | moveb #0x85, 0xfffff429 /* PFDATA */ | ||
96 | moveb #0xd8, 0xfffffA27 /* LCKCON */ | ||
97 | moveb #0xc5, 0xfffff429 /* PFDATA */ | ||
98 | moveb #0xd5, 0xfffff429 /* PFDATA */ | ||
99 | |||
100 | moveal #0x00100000, %a3 | ||
101 | moveal #0x100ffc00, %a4 | ||
102 | #endif /* CONFIG_PILOT */ | ||
103 | |||
104 | #endif /* CONFIG_M68328 */ | ||
105 | |||
106 | movew #0x2700, %sr | ||
107 | lea %a4@(-4), %sp | ||
108 | |||
109 | DBG_PUTC('\r') | ||
110 | DBG_PUTC('\n') | ||
111 | DBG_PUTC('A') | ||
112 | |||
113 | moveq #0,%d0 | ||
114 | movew #16384, %d0 /* PLL settle wait loop */ | ||
115 | L0: | ||
116 | subw #1, %d0 | ||
117 | bne L0 | ||
118 | |||
119 | DBG_PUTC('B') | ||
120 | |||
121 | /* Copy command line from beginning of RAM (+16) to end of bss */ | ||
122 | movel #CONFIG_VECTORBASE, %d7 | ||
123 | addl #16, %d7 | ||
124 | moveal %d7, %a0 | ||
125 | moveal #_ebss, %a1 | ||
126 | lea %a1@(512), %a2 | ||
127 | |||
128 | DBG_PUTC('C') | ||
129 | |||
130 | /* Copy %a0 to %a1 until %a1 == %a2 */ | ||
131 | L2: | ||
132 | movel %a0@+, %d0 | ||
133 | movel %d0, %a1@+ | ||
134 | cmpal %a1, %a2 | ||
135 | bhi L2 | ||
136 | |||
137 | /* Copy data+init segment from ROM to RAM */ | ||
138 | moveal #_etext, %a0 | ||
139 | moveal #_sdata, %a1 | ||
140 | moveal #__init_end, %a2 | ||
141 | |||
142 | DBG_PUTC('D') | ||
143 | |||
144 | /* Copy %a0 to %a1 until %a1 == %a2 */ | ||
145 | LD1: | ||
146 | movel %a0@+, %d0 | ||
147 | movel %d0, %a1@+ | ||
148 | cmpal %a1, %a2 | ||
149 | bhi LD1 | ||
150 | |||
151 | DBG_PUTC('E') | ||
152 | |||
153 | moveal #_sbss, %a0 | ||
154 | moveal #_ebss, %a1 | ||
155 | |||
156 | /* Copy 0 to %a0 until %a0 == %a1 */ | ||
157 | L1: | ||
158 | movel #0, %a0@+ | ||
159 | cmpal %a0, %a1 | ||
160 | bhi L1 | ||
161 | |||
162 | DBG_PUTC('F') | ||
163 | |||
164 | /* Copy command line from end of bss to command line */ | ||
165 | moveal #_ebss, %a0 | ||
166 | moveal #command_line, %a1 | ||
167 | lea %a1@(512), %a2 | ||
168 | |||
169 | DBG_PUTC('G') | ||
170 | |||
171 | /* Copy %a0 to %a1 until %a1 == %a2 */ | ||
172 | L3: | ||
173 | movel %a0@+, %d0 | ||
174 | movel %d0, %a1@+ | ||
175 | cmpal %a1, %a2 | ||
176 | bhi L3 | ||
177 | |||
178 | movel #_sdata, %d0 | ||
179 | movel %d0, _rambase | ||
180 | movel #_ebss, %d0 | ||
181 | movel %d0, _ramstart | ||
182 | |||
183 | movel %a4, %d0 | ||
184 | subl #4096, %d0 /* Reserve 4K of stack */ | ||
185 | moveq #79, %d7 | ||
186 | movel %d0, _ramend | ||
187 | |||
188 | movel %a3, %d0 | ||
189 | movel %d0, rom_length | ||
190 | |||
191 | pea 0 | ||
192 | pea env | ||
193 | pea %sp@(4) | ||
194 | pea 0 | ||
195 | |||
196 | DBG_PUTC('H') | ||
197 | |||
198 | #ifdef CONFIG_PILOT | ||
199 | movel #penguin_bits, 0xFFFFFA00 | ||
200 | moveb #10, 0xFFFFFA05 | ||
201 | movew #160, 0xFFFFFA08 | ||
202 | movew #160, 0xFFFFFA0A | ||
203 | #endif /* CONFIG_PILOT */ | ||
204 | |||
205 | DBG_PUTC('I') | ||
206 | |||
207 | lea init_thread_union, %a0 | ||
208 | lea 0x2000(%a0), %sp | ||
209 | |||
210 | DBG_PUTC('J') | ||
211 | DBG_PUTC('\r') | ||
212 | DBG_PUTC('\n') | ||
213 | |||
214 | jsr start_kernel | ||
215 | _exit: | ||
216 | |||
217 | jmp _exit | ||
218 | |||
219 | |||
220 | .data | ||
221 | env: | ||
222 | .long 0 | ||
diff --git a/arch/m68k/platform/68328/head-ram.S b/arch/m68k/platform/68328/head-ram.S new file mode 100644 index 00000000000..7f1aeeacb21 --- /dev/null +++ b/arch/m68k/platform/68328/head-ram.S | |||
@@ -0,0 +1,141 @@ | |||
1 | |||
2 | .global __main | ||
3 | .global __rom_start | ||
4 | |||
5 | .global _rambase | ||
6 | .global _ramstart | ||
7 | |||
8 | .global splash_bits | ||
9 | .global _start | ||
10 | .global _stext | ||
11 | .global _edata | ||
12 | |||
13 | #define DEBUG | ||
14 | #define ROM_OFFSET 0x10C00000 | ||
15 | #define STACK_GAURD 0x10 | ||
16 | |||
17 | .text | ||
18 | |||
19 | _start: | ||
20 | _stext: | ||
21 | movew #0x2700, %sr /* Exceptions off! */ | ||
22 | |||
23 | #if 0 | ||
24 | /* Init chip registers. uCsimm specific */ | ||
25 | moveb #0x00, 0xfffffb0b /* Watchdog off */ | ||
26 | moveb #0x10, 0xfffff000 /* SCR */ | ||
27 | |||
28 | movew #0x2400, 0xfffff200 /* PLLCR */ | ||
29 | movew #0x0123, 0xfffff202 /* PLLFSR */ | ||
30 | |||
31 | moveb #0x00, 0xfffff40b /* enable chip select */ | ||
32 | moveb #0x00, 0xfffff423 /* enable /DWE */ | ||
33 | moveb #0x08, 0xfffffd0d /* disable hardmap */ | ||
34 | moveb #0x07, 0xfffffd0e /* level 7 interrupt clear */ | ||
35 | |||
36 | movew #0x8600, 0xfffff100 /* FLASH at 0x10c00000 */ | ||
37 | movew #0x018b, 0xfffff110 /* 2Meg, enable, 0ws */ | ||
38 | |||
39 | movew #0x8f00, 0xfffffc00 /* DRAM configuration */ | ||
40 | movew #0x9667, 0xfffffc02 /* DRAM control */ | ||
41 | movew #0x0000, 0xfffff106 /* DRAM at 0x00000000 */ | ||
42 | movew #0x068f, 0xfffff116 /* 8Meg, enable, 0ws */ | ||
43 | |||
44 | moveb #0x40, 0xfffff300 /* IVR */ | ||
45 | movel #0x007FFFFF, %d0 /* IMR */ | ||
46 | movel %d0, 0xfffff304 | ||
47 | |||
48 | moveb 0xfffff42b, %d0 | ||
49 | andb #0xe0, %d0 | ||
50 | moveb %d0, 0xfffff42b | ||
51 | |||
52 | moveb #0x08, 0xfffff907 /* Ignore CTS */ | ||
53 | movew #0x010b, 0xfffff902 /* BAUD to 9600 */ | ||
54 | movew #0xe100, 0xfffff900 /* enable */ | ||
55 | #endif | ||
56 | |||
57 | movew #16384, %d0 /* PLL settle wait loop */ | ||
58 | L0: | ||
59 | subw #1, %d0 | ||
60 | bne L0 | ||
61 | #ifdef DEBUG | ||
62 | moveq #70, %d7 /* 'F' */ | ||
63 | moveb %d7,0xfffff907 /* No absolute addresses */ | ||
64 | pclp1: | ||
65 | movew 0xfffff906, %d7 | ||
66 | andw #0x2000, %d7 | ||
67 | beq pclp1 | ||
68 | #endif /* DEBUG */ | ||
69 | |||
70 | #ifdef DEBUG | ||
71 | moveq #82, %d7 /* 'R' */ | ||
72 | moveb %d7,0xfffff907 /* No absolute addresses */ | ||
73 | pclp3: | ||
74 | movew 0xfffff906, %d7 | ||
75 | andw #0x2000, %d7 | ||
76 | beq pclp3 | ||
77 | #endif /* DEBUG */ | ||
78 | moveal #0x007ffff0, %ssp | ||
79 | moveal #_sbss, %a0 | ||
80 | moveal #_ebss, %a1 | ||
81 | |||
82 | /* Copy 0 to %a0 until %a0 >= %a1 */ | ||
83 | L1: | ||
84 | movel #0, %a0@+ | ||
85 | cmpal %a0, %a1 | ||
86 | bhi L1 | ||
87 | |||
88 | #ifdef DEBUG | ||
89 | moveq #67, %d7 /* 'C' */ | ||
90 | jsr putc | ||
91 | #endif /* DEBUG */ | ||
92 | |||
93 | pea 0 | ||
94 | pea env | ||
95 | pea %sp@(4) | ||
96 | pea 0 | ||
97 | |||
98 | #ifdef DEBUG | ||
99 | moveq #70, %d7 /* 'F' */ | ||
100 | jsr putc | ||
101 | #endif /* DEBUG */ | ||
102 | |||
103 | lp: | ||
104 | jsr start_kernel | ||
105 | jmp lp | ||
106 | _exit: | ||
107 | |||
108 | jmp _exit | ||
109 | |||
110 | __main: | ||
111 | /* nothing */ | ||
112 | rts | ||
113 | |||
114 | #ifdef DEBUG | ||
115 | putc: | ||
116 | moveb %d7,0xfffff907 | ||
117 | pclp: | ||
118 | movew 0xfffff906, %d7 | ||
119 | andw #0x2000, %d7 | ||
120 | beq pclp | ||
121 | rts | ||
122 | #endif /* DEBUG */ | ||
123 | |||
124 | .data | ||
125 | |||
126 | /* | ||
127 | * Set up the usable of RAM stuff. Size of RAM is determined then | ||
128 | * an initial stack set up at the end. | ||
129 | */ | ||
130 | .align 4 | ||
131 | _ramvec: | ||
132 | .long 0 | ||
133 | _rambase: | ||
134 | .long 0 | ||
135 | _ramstart: | ||
136 | .long 0 | ||
137 | _ramend: | ||
138 | .long 0 | ||
139 | |||
140 | env: | ||
141 | .long 0 | ||
diff --git a/arch/m68k/platform/68328/head-rom.S b/arch/m68k/platform/68328/head-rom.S new file mode 100644 index 00000000000..6ec77d3ea0b --- /dev/null +++ b/arch/m68k/platform/68328/head-rom.S | |||
@@ -0,0 +1,110 @@ | |||
1 | |||
2 | .global _start | ||
3 | .global _stext | ||
4 | |||
5 | .global _rambase | ||
6 | .global _ramvec | ||
7 | .global _ramstart | ||
8 | .global _ramend | ||
9 | |||
10 | #ifdef CONFIG_INIT_LCD | ||
11 | .global splash_bits | ||
12 | #endif | ||
13 | |||
14 | .data | ||
15 | |||
16 | /* | ||
17 | * Set up the usable of RAM stuff. Size of RAM is determined then | ||
18 | * an initial stack set up at the end. | ||
19 | */ | ||
20 | .align 4 | ||
21 | _ramvec: | ||
22 | .long 0 | ||
23 | _rambase: | ||
24 | .long 0 | ||
25 | _ramstart: | ||
26 | .long 0 | ||
27 | _ramend: | ||
28 | .long 0 | ||
29 | |||
30 | #define RAMEND (CONFIG_RAMBASE + CONFIG_RAMSIZE) | ||
31 | |||
32 | #ifdef CONFIG_INIT_LCD | ||
33 | splash_bits: | ||
34 | #include "bootlogo.rh" | ||
35 | #endif | ||
36 | |||
37 | .text | ||
38 | _start: | ||
39 | _stext: movew #0x2700,%sr | ||
40 | #ifdef CONFIG_INIT_LCD | ||
41 | movel #splash_bits, 0xfffffA00 /* LSSA */ | ||
42 | moveb #0x28, 0xfffffA05 /* LVPW */ | ||
43 | movew #0x280, 0xFFFFFa08 /* LXMAX */ | ||
44 | movew #0x1df, 0xFFFFFa0a /* LYMAX */ | ||
45 | moveb #0, 0xfffffa29 /* LBAR */ | ||
46 | moveb #0, 0xfffffa25 /* LPXCD */ | ||
47 | moveb #0x08, 0xFFFFFa20 /* LPICF */ | ||
48 | moveb #0x01, 0xFFFFFA21 /* -ve pol */ | ||
49 | moveb #0x81, 0xfffffA27 /* LCKCON */ | ||
50 | movew #0xff00, 0xfffff412 /* LCD pins */ | ||
51 | #endif | ||
52 | moveal #RAMEND-CONFIG_MEMORY_RESERVE*0x100000 - 0x10, %sp | ||
53 | movew #32767, %d0 /* PLL settle wait loop */ | ||
54 | 1: subq #1, %d0 | ||
55 | bne 1b | ||
56 | |||
57 | /* Copy data segment from ROM to RAM */ | ||
58 | moveal #_etext, %a0 | ||
59 | moveal #_sdata, %a1 | ||
60 | moveal #_edata, %a2 | ||
61 | |||
62 | /* Copy %a0 to %a1 until %a1 == %a2 */ | ||
63 | 1: movel %a0@+, %a1@+ | ||
64 | cmpal %a1, %a2 | ||
65 | bhi 1b | ||
66 | |||
67 | moveal #_sbss, %a0 | ||
68 | moveal #_ebss, %a1 | ||
69 | /* Copy 0 to %a0 until %a0 == %a1 */ | ||
70 | |||
71 | 1: | ||
72 | clrl %a0@+ | ||
73 | cmpal %a0, %a1 | ||
74 | bhi 1b | ||
75 | |||
76 | movel #_sdata, %d0 | ||
77 | movel %d0, _rambase | ||
78 | movel #_ebss, %d0 | ||
79 | movel %d0, _ramstart | ||
80 | movel #RAMEND-CONFIG_MEMORY_RESERVE*0x100000, %d0 | ||
81 | movel %d0, _ramend | ||
82 | movel #CONFIG_VECTORBASE, %d0 | ||
83 | movel %d0, _ramvec | ||
84 | |||
85 | /* | ||
86 | * load the current task pointer and stack | ||
87 | */ | ||
88 | lea init_thread_union, %a0 | ||
89 | lea 0x2000(%a0), %sp | ||
90 | |||
91 | 1: jsr start_kernel | ||
92 | bra 1b | ||
93 | _exit: | ||
94 | |||
95 | jmp _exit | ||
96 | |||
97 | |||
98 | putc: | ||
99 | moveb %d7,0xfffff907 | ||
100 | 1: | ||
101 | movew 0xfffff906, %d7 | ||
102 | andw #0x2000, %d7 | ||
103 | beq 1b | ||
104 | rts | ||
105 | |||
106 | .data | ||
107 | env: | ||
108 | .long 0 | ||
109 | .text | ||
110 | |||
diff --git a/arch/m68k/platform/68328/ints.c b/arch/m68k/platform/68328/ints.c new file mode 100644 index 00000000000..e5631831a20 --- /dev/null +++ b/arch/m68k/platform/68328/ints.c | |||
@@ -0,0 +1,186 @@ | |||
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/types.h> | ||
13 | #include <linux/kernel.h> | ||
14 | #include <linux/init.h> | ||
15 | #include <linux/interrupt.h> | ||
16 | #include <linux/irq.h> | ||
17 | #include <asm/traps.h> | ||
18 | #include <asm/io.h> | ||
19 | #include <asm/machdep.h> | ||
20 | |||
21 | #if defined(CONFIG_M68328) | ||
22 | #include <asm/MC68328.h> | ||
23 | #elif defined(CONFIG_M68EZ328) | ||
24 | #include <asm/MC68EZ328.h> | ||
25 | #elif defined(CONFIG_M68VZ328) | ||
26 | #include <asm/MC68VZ328.h> | ||
27 | #endif | ||
28 | |||
29 | /* assembler routines */ | ||
30 | asmlinkage void system_call(void); | ||
31 | asmlinkage void buserr(void); | ||
32 | asmlinkage void trap(void); | ||
33 | asmlinkage void trap3(void); | ||
34 | asmlinkage void trap4(void); | ||
35 | asmlinkage void trap5(void); | ||
36 | asmlinkage void trap6(void); | ||
37 | asmlinkage void trap7(void); | ||
38 | asmlinkage void trap8(void); | ||
39 | asmlinkage void trap9(void); | ||
40 | asmlinkage void trap10(void); | ||
41 | asmlinkage void trap11(void); | ||
42 | asmlinkage void trap12(void); | ||
43 | asmlinkage void trap13(void); | ||
44 | asmlinkage void trap14(void); | ||
45 | asmlinkage void trap15(void); | ||
46 | asmlinkage void trap33(void); | ||
47 | asmlinkage void trap34(void); | ||
48 | asmlinkage void trap35(void); | ||
49 | asmlinkage void trap36(void); | ||
50 | asmlinkage void trap37(void); | ||
51 | asmlinkage void trap38(void); | ||
52 | asmlinkage void trap39(void); | ||
53 | asmlinkage void trap40(void); | ||
54 | asmlinkage void trap41(void); | ||
55 | asmlinkage void trap42(void); | ||
56 | asmlinkage void trap43(void); | ||
57 | asmlinkage void trap44(void); | ||
58 | asmlinkage void trap45(void); | ||
59 | asmlinkage void trap46(void); | ||
60 | asmlinkage void trap47(void); | ||
61 | asmlinkage irqreturn_t bad_interrupt(int, void *); | ||
62 | asmlinkage irqreturn_t inthandler(void); | ||
63 | asmlinkage irqreturn_t inthandler1(void); | ||
64 | asmlinkage irqreturn_t inthandler2(void); | ||
65 | asmlinkage irqreturn_t inthandler3(void); | ||
66 | asmlinkage irqreturn_t inthandler4(void); | ||
67 | asmlinkage irqreturn_t inthandler5(void); | ||
68 | asmlinkage irqreturn_t inthandler6(void); | ||
69 | asmlinkage irqreturn_t inthandler7(void); | ||
70 | |||
71 | extern e_vector *_ramvec; | ||
72 | |||
73 | /* The number of spurious interrupts */ | ||
74 | volatile unsigned int num_spurious; | ||
75 | |||
76 | /* The 68k family did not have a good way to determine the source | ||
77 | * of interrupts until later in the family. The EC000 core does | ||
78 | * not provide the vector number on the stack, we vector everything | ||
79 | * into one vector and look in the blasted mask register... | ||
80 | * This code is designed to be fast, almost constant time, not clean! | ||
81 | */ | ||
82 | void process_int(int vec, struct pt_regs *fp) | ||
83 | { | ||
84 | int irq; | ||
85 | int mask; | ||
86 | |||
87 | unsigned long pend = ISR; | ||
88 | |||
89 | while (pend) { | ||
90 | if (pend & 0x0000ffff) { | ||
91 | if (pend & 0x000000ff) { | ||
92 | if (pend & 0x0000000f) { | ||
93 | mask = 0x00000001; | ||
94 | irq = 0; | ||
95 | } else { | ||
96 | mask = 0x00000010; | ||
97 | irq = 4; | ||
98 | } | ||
99 | } else { | ||
100 | if (pend & 0x00000f00) { | ||
101 | mask = 0x00000100; | ||
102 | irq = 8; | ||
103 | } else { | ||
104 | mask = 0x00001000; | ||
105 | irq = 12; | ||
106 | } | ||
107 | } | ||
108 | } else { | ||
109 | if (pend & 0x00ff0000) { | ||
110 | if (pend & 0x000f0000) { | ||
111 | mask = 0x00010000; | ||
112 | irq = 16; | ||
113 | } else { | ||
114 | mask = 0x00100000; | ||
115 | irq = 20; | ||
116 | } | ||
117 | } else { | ||
118 | if (pend & 0x0f000000) { | ||
119 | mask = 0x01000000; | ||
120 | irq = 24; | ||
121 | } else { | ||
122 | mask = 0x10000000; | ||
123 | irq = 28; | ||
124 | } | ||
125 | } | ||
126 | } | ||
127 | |||
128 | while (! (mask & pend)) { | ||
129 | mask <<=1; | ||
130 | irq++; | ||
131 | } | ||
132 | |||
133 | do_IRQ(irq, fp); | ||
134 | pend &= ~mask; | ||
135 | } | ||
136 | } | ||
137 | |||
138 | static void intc_irq_unmask(struct irq_data *d) | ||
139 | { | ||
140 | IMR &= ~(1 << d->irq); | ||
141 | } | ||
142 | |||
143 | static void intc_irq_mask(struct irq_data *d) | ||
144 | { | ||
145 | IMR |= (1 << d->irq); | ||
146 | } | ||
147 | |||
148 | static struct irq_chip intc_irq_chip = { | ||
149 | .name = "M68K-INTC", | ||
150 | .irq_mask = intc_irq_mask, | ||
151 | .irq_unmask = intc_irq_unmask, | ||
152 | }; | ||
153 | |||
154 | /* | ||
155 | * This function should be called during kernel startup to initialize | ||
156 | * the machine vector table. | ||
157 | */ | ||
158 | void __init init_IRQ(void) | ||
159 | { | ||
160 | int i; | ||
161 | |||
162 | /* set up the vectors */ | ||
163 | for (i = 72; i < 256; ++i) | ||
164 | _ramvec[i] = (e_vector) bad_interrupt; | ||
165 | |||
166 | _ramvec[32] = system_call; | ||
167 | |||
168 | _ramvec[65] = (e_vector) inthandler1; | ||
169 | _ramvec[66] = (e_vector) inthandler2; | ||
170 | _ramvec[67] = (e_vector) inthandler3; | ||
171 | _ramvec[68] = (e_vector) inthandler4; | ||
172 | _ramvec[69] = (e_vector) inthandler5; | ||
173 | _ramvec[70] = (e_vector) inthandler6; | ||
174 | _ramvec[71] = (e_vector) inthandler7; | ||
175 | |||
176 | IVR = 0x40; /* Set DragonBall IVR (interrupt base) to 64 */ | ||
177 | |||
178 | /* turn off all interrupts */ | ||
179 | IMR = ~0; | ||
180 | |||
181 | for (i = 0; (i < NR_IRQS); i++) { | ||
182 | set_irq_chip(i, &intc_irq_chip); | ||
183 | set_irq_handler(i, handle_level_irq); | ||
184 | } | ||
185 | } | ||
186 | |||
diff --git a/arch/m68k/platform/68328/romvec.S b/arch/m68k/platform/68328/romvec.S new file mode 100644 index 00000000000..31084466eae --- /dev/null +++ b/arch/m68k/platform/68328/romvec.S | |||
@@ -0,0 +1,35 @@ | |||
1 | /* | ||
2 | * linux/arch/m68knommu/platform/68328/romvec.S | ||
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 | * Copyright 2006 Greg Ungerer <gerg@snapgear.com> | ||
11 | */ | ||
12 | |||
13 | .global _start | ||
14 | .global _buserr | ||
15 | .global trap | ||
16 | .global system_call | ||
17 | |||
18 | .section .romvec | ||
19 | |||
20 | e_vectors: | ||
21 | .long CONFIG_RAMBASE+CONFIG_RAMSIZE-4, _start, buserr, trap | ||
22 | .long trap, trap, trap, trap | ||
23 | .long trap, trap, trap, trap | ||
24 | .long trap, trap, trap, trap | ||
25 | .long trap, trap, trap, trap | ||
26 | .long trap, trap, trap, trap | ||
27 | .long trap, trap, trap, trap | ||
28 | .long trap, trap, trap, trap | ||
29 | /* TRAP #0-15 */ | ||
30 | .long system_call, trap, trap, trap | ||
31 | .long trap, trap, trap, trap | ||
32 | .long trap, trap, trap, trap | ||
33 | .long trap, trap, trap, trap | ||
34 | .long 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 | ||
35 | |||
diff --git a/arch/m68k/platform/68328/timers.c b/arch/m68k/platform/68328/timers.c new file mode 100644 index 00000000000..309f725995b --- /dev/null +++ b/arch/m68k/platform/68328/timers.c | |||
@@ -0,0 +1,134 @@ | |||
1 | /***************************************************************************/ | ||
2 | |||
3 | /* | ||
4 | * linux/arch/m68knommu/platform/68328/timers.c | ||
5 | * | ||
6 | * Copyright (C) 1993 Hamish Macdonald | ||
7 | * Copyright (C) 1999 D. Jeff Dionne | ||
8 | * Copyright (C) 2001 Georges Menie, Ken Desmet | ||
9 | * | ||
10 | * This file is subject to the terms and conditions of the GNU General Public | ||
11 | * License. See the file COPYING in the main directory of this archive | ||
12 | * for more details. | ||
13 | */ | ||
14 | |||
15 | /***************************************************************************/ | ||
16 | |||
17 | #include <linux/types.h> | ||
18 | #include <linux/kernel.h> | ||
19 | #include <linux/mm.h> | ||
20 | #include <linux/interrupt.h> | ||
21 | #include <linux/irq.h> | ||
22 | #include <linux/clocksource.h> | ||
23 | #include <asm/setup.h> | ||
24 | #include <asm/system.h> | ||
25 | #include <asm/pgtable.h> | ||
26 | #include <asm/machdep.h> | ||
27 | #include <asm/MC68VZ328.h> | ||
28 | |||
29 | /***************************************************************************/ | ||
30 | |||
31 | #if defined(CONFIG_DRAGEN2) | ||
32 | /* with a 33.16 MHz clock, this will give usec resolution to the time functions */ | ||
33 | #define CLOCK_SOURCE TCTL_CLKSOURCE_SYSCLK | ||
34 | #define CLOCK_PRE 7 | ||
35 | #define TICKS_PER_JIFFY 41450 | ||
36 | |||
37 | #elif defined(CONFIG_XCOPILOT_BUGS) | ||
38 | /* | ||
39 | * The only thing I know is that CLK32 is not available on Xcopilot | ||
40 | * I have little idea about what frequency SYSCLK has on Xcopilot. | ||
41 | * The values for prescaler and compare registers were simply | ||
42 | * taken from the original source | ||
43 | */ | ||
44 | #define CLOCK_SOURCE TCTL_CLKSOURCE_SYSCLK | ||
45 | #define CLOCK_PRE 2 | ||
46 | #define TICKS_PER_JIFFY 0xd7e4 | ||
47 | |||
48 | #else | ||
49 | /* default to using the 32Khz clock */ | ||
50 | #define CLOCK_SOURCE TCTL_CLKSOURCE_32KHZ | ||
51 | #define CLOCK_PRE 31 | ||
52 | #define TICKS_PER_JIFFY 10 | ||
53 | #endif | ||
54 | |||
55 | static u32 m68328_tick_cnt; | ||
56 | |||
57 | /***************************************************************************/ | ||
58 | |||
59 | static irqreturn_t hw_tick(int irq, void *dummy) | ||
60 | { | ||
61 | /* Reset Timer1 */ | ||
62 | TSTAT &= 0; | ||
63 | |||
64 | m68328_tick_cnt += TICKS_PER_JIFFY; | ||
65 | return arch_timer_interrupt(irq, dummy); | ||
66 | } | ||
67 | |||
68 | /***************************************************************************/ | ||
69 | |||
70 | static struct irqaction m68328_timer_irq = { | ||
71 | .name = "timer", | ||
72 | .flags = IRQF_DISABLED | IRQF_TIMER, | ||
73 | .handler = hw_tick, | ||
74 | }; | ||
75 | |||
76 | /***************************************************************************/ | ||
77 | |||
78 | static cycle_t m68328_read_clk(struct clocksource *cs) | ||
79 | { | ||
80 | unsigned long flags; | ||
81 | u32 cycles; | ||
82 | |||
83 | local_irq_save(flags); | ||
84 | cycles = m68328_tick_cnt + TCN; | ||
85 | local_irq_restore(flags); | ||
86 | |||
87 | return cycles; | ||
88 | } | ||
89 | |||
90 | /***************************************************************************/ | ||
91 | |||
92 | static struct clocksource m68328_clk = { | ||
93 | .name = "timer", | ||
94 | .rating = 250, | ||
95 | .read = m68328_read_clk, | ||
96 | .shift = 20, | ||
97 | .mask = CLOCKSOURCE_MASK(32), | ||
98 | .flags = CLOCK_SOURCE_IS_CONTINUOUS, | ||
99 | }; | ||
100 | |||
101 | /***************************************************************************/ | ||
102 | |||
103 | void hw_timer_init(void) | ||
104 | { | ||
105 | /* disable timer 1 */ | ||
106 | TCTL = 0; | ||
107 | |||
108 | /* set ISR */ | ||
109 | setup_irq(TMR_IRQ_NUM, &m68328_timer_irq); | ||
110 | |||
111 | /* Restart mode, Enable int, Set clock source */ | ||
112 | TCTL = TCTL_OM | TCTL_IRQEN | CLOCK_SOURCE; | ||
113 | TPRER = CLOCK_PRE; | ||
114 | TCMP = TICKS_PER_JIFFY; | ||
115 | |||
116 | /* Enable timer 1 */ | ||
117 | TCTL |= TCTL_TEN; | ||
118 | m68328_clk.mult = clocksource_hz2mult(TICKS_PER_JIFFY*HZ, m68328_clk.shift); | ||
119 | clocksource_register(&m68328_clk); | ||
120 | } | ||
121 | |||
122 | /***************************************************************************/ | ||
123 | |||
124 | void m68328_timer_gettod(int *year, int *mon, int *day, int *hour, int *min, int *sec) | ||
125 | { | ||
126 | long now = RTCTIME; | ||
127 | |||
128 | *year = *mon = *day = 1; | ||
129 | *hour = (now >> 24) % 24; | ||
130 | *min = (now >> 16) % 60; | ||
131 | *sec = now % 60; | ||
132 | } | ||
133 | |||
134 | /***************************************************************************/ | ||