This source file includes following definitions.
- m68vz328_reset
- init_hardware
- m68vz328_reset
- _bsc0
- m68vz328_reset
- init_hardware
- config_BSP
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 #include <linux/init.h>
18 #include <linux/types.h>
19 #include <linux/kernel.h>
20 #include <linux/kd.h>
21 #include <linux/netdevice.h>
22 #include <linux/interrupt.h>
23 #include <linux/irq.h>
24 #include <linux/rtc.h>
25
26 #include <asm/pgtable.h>
27 #include <asm/machdep.h>
28 #include <asm/MC68VZ328.h>
29 #include <asm/bootstd.h>
30
31 #ifdef CONFIG_INIT_LCD
32 #include "bootlogo-vz.h"
33 #endif
34
35
36
37 int m68328_hwclk(int set, struct rtc_time *t);
38
39
40
41
42 #if defined(CONFIG_DRAGEN2)
43
44 static void m68vz328_reset(void)
45 {
46 local_irq_disable();
47
48 #ifdef CONFIG_INIT_LCD
49 PBDATA |= 0x20;
50 PKDATA |= 0x4;
51 LCKCON = 0;
52 #endif
53
54 __asm__ __volatile__(
55 "reset\n\t"
56 "moveal #0x04000000, %a0\n\t"
57 "moveal 0(%a0), %sp\n\t"
58 "moveal 4(%a0), %a0\n\t"
59 "jmp (%a0)"
60 );
61 }
62
63 static void __init init_hardware(char *command, int size)
64 {
65 #ifdef CONFIG_DIRECT_IO_ACCESS
66 SCR = 0x10;
67 #endif
68
69
70 CSGBB = 0x4000;
71 CSB = 0x1a1;
72
73
74
75 PKSEL |= PK(3);
76 PKDIR |= PK(3);
77 PKDATA |= PK(3);
78
79
80 PFSEL |= PF(5);
81 PFDIR |= PF(5);
82 PFDATA &= ~PF(5);
83
84
85 PFDATA |= PF(5);
86 { int i; for (i = 0; i < 32000; ++i); }
87 PFDATA &= ~PF(5);
88
89
90 PDPOL &= ~PD(1);
91 PDIQEG &= ~PD(1);
92 PDIRQEN |= PD(1);
93
94 #ifdef CONFIG_INIT_LCD
95
96 LSSA = (long) screen_bits;
97 LVPW = 0x14;
98 LXMAX = 0x140;
99 LYMAX = 0xef;
100 LRRA = 0;
101 LPXCD = 3;
102 LPICF = 0x08;
103 LPOLCF = 0;
104 LCKCON = 0x80;
105 PCPDEN = 0xff;
106 PCSEL = 0;
107
108
109 PKDIR |= 0x4;
110 PKSEL |= 0x4;
111 PKDATA &= ~0x4;
112
113
114 PBDIR |= 0x20;
115 PBSEL |= 0x20;
116 PBDATA &= ~0x20;
117
118
119 PFDIR |= 0x1;
120 PFSEL &= ~0x1;
121 PWMR = 0x037F;
122 #endif
123 }
124
125
126
127
128 #elif defined(CONFIG_UCDIMM)
129
130 static void m68vz328_reset(void)
131 {
132 local_irq_disable();
133 asm volatile (
134 "moveal #0x10c00000, %a0;\n\t"
135 "moveb #0, 0xFFFFF300;\n\t"
136 "moveal 0(%a0), %sp;\n\t"
137 "moveal 4(%a0), %a0;\n\t"
138 "jmp (%a0);\n"
139 );
140 }
141
142 unsigned char *cs8900a_hwaddr;
143 static int errno;
144
145 _bsc0(char *, getserialnum)
146 _bsc1(unsigned char *, gethwaddr, int, a)
147 _bsc1(char *, getbenv, char *, a)
148
149 static void __init init_hardware(char *command, int size)
150 {
151 char *p;
152
153 pr_info("uCdimm serial string [%s]\n", getserialnum());
154 p = cs8900a_hwaddr = gethwaddr(0);
155 pr_info("uCdimm hwaddr %pM\n", p);
156 p = getbenv("APPEND");
157 if (p)
158 strcpy(p, command);
159 else
160 command[0] = 0;
161 }
162
163
164 #else
165
166 static void m68vz328_reset(void)
167 {
168 }
169
170 static void __init init_hardware(char *command, int size)
171 {
172 }
173
174
175 #endif
176
177
178 void __init config_BSP(char *command, int size)
179 {
180 pr_info("68VZ328 DragonBallVZ support (c) 2001 Lineo, Inc.\n");
181
182 init_hardware(command, size);
183
184 mach_sched_init = hw_timer_init;
185 mach_hwclk = m68328_hwclk;
186 mach_reset = m68vz328_reset;
187 }
188
189