Loading...
1/*
2** asm/setup.h -- Definition of the Linux/m68k setup information
3**
4** Copyright 1992 by Greg Harp
5**
6** This file is subject to the terms and conditions of the GNU General Public
7** License. See the file COPYING in the main directory of this archive
8** for more details.
9**
10** Created 09/29/92 by Greg Harp
11**
12** 5/2/94 Roman Hodek:
13** Added bi_atari part of the machine dependent union bi_un; for now it
14** contains just a model field to distinguish between TT and Falcon.
15** 26/7/96 Roman Zippel:
16** Renamed to setup.h; added some useful macros to allow gcc some
17** optimizations if possible.
18** 5/10/96 Geert Uytterhoeven:
19** Redesign of the boot information structure; moved boot information
20** structure to bootinfo.h
21*/
22#ifndef _M68K_SETUP_H
23#define _M68K_SETUP_H
24
25#include <uapi/asm/bootinfo.h>
26#include <uapi/asm/setup.h>
27
28
29#define CL_SIZE COMMAND_LINE_SIZE
30
31#ifndef __ASSEMBLY__
32extern unsigned long m68k_machtype;
33#endif /* !__ASSEMBLY__ */
34
35#if !defined(CONFIG_AMIGA)
36# define MACH_IS_AMIGA (0)
37#elif defined(CONFIG_ATARI) || defined(CONFIG_MAC) || defined(CONFIG_APOLLO) \
38 || defined(CONFIG_MVME16x) || defined(CONFIG_BVME6000) \
39 || defined(CONFIG_HP300) || defined(CONFIG_Q40) \
40 || defined(CONFIG_SUN3X) || defined(CONFIG_MVME147)
41# define MACH_IS_AMIGA (m68k_machtype == MACH_AMIGA)
42#else
43# define MACH_AMIGA_ONLY
44# define MACH_IS_AMIGA (1)
45# define MACH_TYPE (MACH_AMIGA)
46#endif
47
48#if !defined(CONFIG_ATARI)
49# define MACH_IS_ATARI (0)
50#elif defined(CONFIG_AMIGA) || defined(CONFIG_MAC) || defined(CONFIG_APOLLO) \
51 || defined(CONFIG_MVME16x) || defined(CONFIG_BVME6000) \
52 || defined(CONFIG_HP300) || defined(CONFIG_Q40) \
53 || defined(CONFIG_SUN3X) || defined(CONFIG_MVME147)
54# define MACH_IS_ATARI (m68k_machtype == MACH_ATARI)
55#else
56# define MACH_ATARI_ONLY
57# define MACH_IS_ATARI (1)
58# define MACH_TYPE (MACH_ATARI)
59#endif
60
61#if !defined(CONFIG_MAC)
62# define MACH_IS_MAC (0)
63#elif defined(CONFIG_AMIGA) || defined(CONFIG_ATARI) || defined(CONFIG_APOLLO) \
64 || defined(CONFIG_MVME16x) || defined(CONFIG_BVME6000) \
65 || defined(CONFIG_HP300) || defined(CONFIG_Q40) \
66 || defined(CONFIG_SUN3X) || defined(CONFIG_MVME147)
67# define MACH_IS_MAC (m68k_machtype == MACH_MAC)
68#else
69# define MACH_MAC_ONLY
70# define MACH_IS_MAC (1)
71# define MACH_TYPE (MACH_MAC)
72#endif
73
74#if defined(CONFIG_SUN3)
75#define MACH_IS_SUN3 (1)
76#define MACH_SUN3_ONLY (1)
77#define MACH_TYPE (MACH_SUN3)
78#else
79#define MACH_IS_SUN3 (0)
80#endif
81
82#if !defined (CONFIG_APOLLO)
83# define MACH_IS_APOLLO (0)
84#elif defined(CONFIG_AMIGA) || defined(CONFIG_MAC) || defined(CONFIG_ATARI) \
85 || defined(CONFIG_MVME16x) || defined(CONFIG_BVME6000) \
86 || defined(CONFIG_HP300) || defined(CONFIG_Q40) \
87 || defined(CONFIG_SUN3X) || defined(CONFIG_MVME147)
88# define MACH_IS_APOLLO (m68k_machtype == MACH_APOLLO)
89#else
90# define MACH_APOLLO_ONLY
91# define MACH_IS_APOLLO (1)
92# define MACH_TYPE (MACH_APOLLO)
93#endif
94
95#if !defined (CONFIG_MVME147)
96# define MACH_IS_MVME147 (0)
97#elif defined(CONFIG_AMIGA) || defined(CONFIG_MAC) || defined(CONFIG_ATARI) \
98 || defined(CONFIG_APOLLO) || defined(CONFIG_BVME6000) \
99 || defined(CONFIG_HP300) || defined(CONFIG_Q40) \
100 || defined(CONFIG_SUN3X) || defined(CONFIG_MVME16x)
101# define MACH_IS_MVME147 (m68k_machtype == MACH_MVME147)
102#else
103# define MACH_MVME147_ONLY
104# define MACH_IS_MVME147 (1)
105# define MACH_TYPE (MACH_MVME147)
106#endif
107
108#if !defined (CONFIG_MVME16x)
109# define MACH_IS_MVME16x (0)
110#elif defined(CONFIG_AMIGA) || defined(CONFIG_MAC) || defined(CONFIG_ATARI) \
111 || defined(CONFIG_APOLLO) || defined(CONFIG_BVME6000) \
112 || defined(CONFIG_HP300) || defined(CONFIG_Q40) \
113 || defined(CONFIG_SUN3X) || defined(CONFIG_MVME147)
114# define MACH_IS_MVME16x (m68k_machtype == MACH_MVME16x)
115#else
116# define MACH_MVME16x_ONLY
117# define MACH_IS_MVME16x (1)
118# define MACH_TYPE (MACH_MVME16x)
119#endif
120
121#if !defined (CONFIG_BVME6000)
122# define MACH_IS_BVME6000 (0)
123#elif defined(CONFIG_AMIGA) || defined(CONFIG_MAC) || defined(CONFIG_ATARI) \
124 || defined(CONFIG_APOLLO) || defined(CONFIG_MVME16x) \
125 || defined(CONFIG_HP300) || defined(CONFIG_Q40) \
126 || defined(CONFIG_SUN3X) || defined(CONFIG_MVME147)
127# define MACH_IS_BVME6000 (m68k_machtype == MACH_BVME6000)
128#else
129# define MACH_BVME6000_ONLY
130# define MACH_IS_BVME6000 (1)
131# define MACH_TYPE (MACH_BVME6000)
132#endif
133
134#if !defined (CONFIG_HP300)
135# define MACH_IS_HP300 (0)
136#elif defined(CONFIG_AMIGA) || defined(CONFIG_MAC) || defined(CONFIG_ATARI) \
137 || defined(CONFIG_APOLLO) || defined(CONFIG_MVME16x) \
138 || defined(CONFIG_BVME6000) || defined(CONFIG_Q40) \
139 || defined(CONFIG_SUN3X) || defined(CONFIG_MVME147)
140# define MACH_IS_HP300 (m68k_machtype == MACH_HP300)
141#else
142# define MACH_HP300_ONLY
143# define MACH_IS_HP300 (1)
144# define MACH_TYPE (MACH_HP300)
145#endif
146
147#if !defined (CONFIG_Q40)
148# define MACH_IS_Q40 (0)
149#elif defined(CONFIG_AMIGA) || defined(CONFIG_MAC) || defined(CONFIG_ATARI) \
150 || defined(CONFIG_APOLLO) || defined(CONFIG_MVME16x) \
151 || defined(CONFIG_BVME6000) || defined(CONFIG_HP300) \
152 || defined(CONFIG_SUN3X) || defined(CONFIG_MVME147)
153# define MACH_IS_Q40 (m68k_machtype == MACH_Q40)
154#else
155# define MACH_Q40_ONLY
156# define MACH_IS_Q40 (1)
157# define MACH_TYPE (MACH_Q40)
158#endif
159
160#if !defined (CONFIG_SUN3X)
161# define MACH_IS_SUN3X (0)
162#elif defined(CONFIG_AMIGA) || defined(CONFIG_MAC) || defined(CONFIG_ATARI) \
163 || defined(CONFIG_APOLLO) || defined(CONFIG_MVME16x) \
164 || defined(CONFIG_BVME6000) || defined(CONFIG_HP300) \
165 || defined(CONFIG_Q40) || defined(CONFIG_MVME147)
166# define MACH_IS_SUN3X (m68k_machtype == MACH_SUN3X)
167#else
168# define CONFIG_SUN3X_ONLY
169# define MACH_IS_SUN3X (1)
170# define MACH_TYPE (MACH_SUN3X)
171#endif
172
173#ifndef MACH_TYPE
174# define MACH_TYPE (m68k_machtype)
175#endif
176
177
178#ifndef __ASSEMBLY__
179extern unsigned long m68k_cputype;
180extern unsigned long m68k_fputype;
181extern unsigned long m68k_mmutype;
182#ifdef CONFIG_VME
183extern unsigned long vme_brdtype;
184#endif
185
186 /*
187 * m68k_is040or060 is != 0 for a '040 or higher;
188 * used numbers are 4 for 68040 and 6 for 68060.
189 */
190
191extern int m68k_is040or060;
192#endif /* !__ASSEMBLY__ */
193
194#if !defined(CONFIG_M68020)
195# define CPU_IS_020 (0)
196# define MMU_IS_851 (0)
197# define MMU_IS_SUN3 (0)
198#elif defined(CONFIG_M68030) || defined(CONFIG_M68040) || defined(CONFIG_M68060)
199# define CPU_IS_020 (m68k_cputype & CPU_68020)
200# define MMU_IS_851 (m68k_mmutype & MMU_68851)
201# define MMU_IS_SUN3 (0) /* Sun3 not supported with other CPU enabled */
202#else
203# define CPU_M68020_ONLY
204# define CPU_IS_020 (1)
205#ifdef MACH_SUN3_ONLY
206# define MMU_IS_SUN3 (1)
207# define MMU_IS_851 (0)
208#else
209# define MMU_IS_SUN3 (0)
210# define MMU_IS_851 (1)
211#endif
212#endif
213
214#if !defined(CONFIG_M68030)
215# define CPU_IS_030 (0)
216# define MMU_IS_030 (0)
217#elif defined(CONFIG_M68020) || defined(CONFIG_M68040) || defined(CONFIG_M68060)
218# define CPU_IS_030 (m68k_cputype & CPU_68030)
219# define MMU_IS_030 (m68k_mmutype & MMU_68030)
220#else
221# define CPU_M68030_ONLY
222# define CPU_IS_030 (1)
223# define MMU_IS_030 (1)
224#endif
225
226#if !defined(CONFIG_M68040)
227# define CPU_IS_040 (0)
228# define MMU_IS_040 (0)
229#elif defined(CONFIG_M68020) || defined(CONFIG_M68030) || defined(CONFIG_M68060)
230# define CPU_IS_040 (m68k_cputype & CPU_68040)
231# define MMU_IS_040 (m68k_mmutype & MMU_68040)
232#else
233# define CPU_M68040_ONLY
234# define CPU_IS_040 (1)
235# define MMU_IS_040 (1)
236#endif
237
238#if !defined(CONFIG_M68060)
239# define CPU_IS_060 (0)
240# define MMU_IS_060 (0)
241#elif defined(CONFIG_M68020) || defined(CONFIG_M68030) || defined(CONFIG_M68040)
242# define CPU_IS_060 (m68k_cputype & CPU_68060)
243# define MMU_IS_060 (m68k_mmutype & MMU_68060)
244#else
245# define CPU_M68060_ONLY
246# define CPU_IS_060 (1)
247# define MMU_IS_060 (1)
248#endif
249
250#if !defined(CONFIG_M68020) && !defined(CONFIG_M68030)
251# define CPU_IS_020_OR_030 (0)
252#else
253# define CPU_M68020_OR_M68030
254# if defined(CONFIG_M68040) || defined(CONFIG_M68060)
255# define CPU_IS_020_OR_030 (!m68k_is040or060)
256# else
257# define CPU_M68020_OR_M68030_ONLY
258# define CPU_IS_020_OR_030 (1)
259# endif
260#endif
261
262#if !defined(CONFIG_M68040) && !defined(CONFIG_M68060)
263# define CPU_IS_040_OR_060 (0)
264#else
265# define CPU_M68040_OR_M68060
266# if defined(CONFIG_M68020) || defined(CONFIG_M68030)
267# define CPU_IS_040_OR_060 (m68k_is040or060)
268# else
269# define CPU_M68040_OR_M68060_ONLY
270# define CPU_IS_040_OR_060 (1)
271# endif
272#endif
273
274#if !defined(CONFIG_COLDFIRE)
275# define CPU_IS_COLDFIRE (0)
276#else
277# define CPU_IS_COLDFIRE (1)
278# define MMU_IS_COLDFIRE (1)
279#endif
280
281#define CPU_TYPE (m68k_cputype)
282
283#ifdef CONFIG_M68KFPU_EMU
284# ifdef CONFIG_M68KFPU_EMU_ONLY
285# define FPU_IS_EMU (1)
286# else
287# define FPU_IS_EMU (!m68k_fputype)
288# endif
289#else
290# define FPU_IS_EMU (0)
291#endif
292
293
294 /*
295 * Miscellaneous
296 */
297
298#define NUM_MEMINFO 4
299
300#ifndef __ASSEMBLY__
301struct m68k_mem_info {
302 unsigned long addr; /* physical address of memory chunk */
303 unsigned long size; /* length of memory chunk (in bytes) */
304};
305
306extern int m68k_num_memory; /* # of memory blocks found (and used) */
307extern int m68k_realnum_memory; /* real # of memory blocks found */
308extern struct m68k_mem_info m68k_memory[NUM_MEMINFO];/* memory description */
309#endif
310
311#endif /* _M68K_SETUP_H */
1/*
2** asm/setup.h -- Definition of the Linux/m68k setup information
3**
4** Copyright 1992 by Greg Harp
5**
6** This file is subject to the terms and conditions of the GNU General Public
7** License. See the file COPYING in the main directory of this archive
8** for more details.
9**
10** Created 09/29/92 by Greg Harp
11**
12** 5/2/94 Roman Hodek:
13** Added bi_atari part of the machine dependent union bi_un; for now it
14** contains just a model field to distinguish between TT and Falcon.
15** 26/7/96 Roman Zippel:
16** Renamed to setup.h; added some useful macros to allow gcc some
17** optimizations if possible.
18** 5/10/96 Geert Uytterhoeven:
19** Redesign of the boot information structure; moved boot information
20** structure to bootinfo.h
21*/
22#ifndef _M68K_SETUP_H
23#define _M68K_SETUP_H
24
25#include <uapi/asm/bootinfo.h>
26#include <uapi/asm/setup.h>
27
28
29#define CL_SIZE COMMAND_LINE_SIZE
30
31#ifndef __ASSEMBLY__
32extern unsigned long m68k_machtype;
33#endif /* !__ASSEMBLY__ */
34
35#if !defined(CONFIG_AMIGA)
36# define MACH_IS_AMIGA (0)
37#elif defined(CONFIG_ATARI) || defined(CONFIG_MAC) || defined(CONFIG_APOLLO) \
38 || defined(CONFIG_MVME16x) || defined(CONFIG_BVME6000) \
39 || defined(CONFIG_HP300) || defined(CONFIG_Q40) \
40 || defined(CONFIG_SUN3X) || defined(CONFIG_MVME147) \
41 || defined(CONFIG_VIRT)
42# define MACH_IS_AMIGA (m68k_machtype == MACH_AMIGA)
43#else
44# define MACH_AMIGA_ONLY
45# define MACH_IS_AMIGA (1)
46# define MACH_TYPE (MACH_AMIGA)
47#endif
48
49#if !defined(CONFIG_ATARI)
50# define MACH_IS_ATARI (0)
51#elif defined(CONFIG_AMIGA) || defined(CONFIG_MAC) || defined(CONFIG_APOLLO) \
52 || defined(CONFIG_MVME16x) || defined(CONFIG_BVME6000) \
53 || defined(CONFIG_HP300) || defined(CONFIG_Q40) \
54 || defined(CONFIG_SUN3X) || defined(CONFIG_MVME147) \
55 || defined(CONFIG_VIRT)
56# define MACH_IS_ATARI (m68k_machtype == MACH_ATARI)
57#else
58# define MACH_ATARI_ONLY
59# define MACH_IS_ATARI (1)
60# define MACH_TYPE (MACH_ATARI)
61#endif
62
63#if !defined(CONFIG_MAC)
64# define MACH_IS_MAC (0)
65#elif defined(CONFIG_AMIGA) || defined(CONFIG_ATARI) || defined(CONFIG_APOLLO) \
66 || defined(CONFIG_MVME16x) || defined(CONFIG_BVME6000) \
67 || defined(CONFIG_HP300) || defined(CONFIG_Q40) \
68 || defined(CONFIG_SUN3X) || defined(CONFIG_MVME147) \
69 || defined(CONFIG_VIRT)
70# define MACH_IS_MAC (m68k_machtype == MACH_MAC)
71#else
72# define MACH_MAC_ONLY
73# define MACH_IS_MAC (1)
74# define MACH_TYPE (MACH_MAC)
75#endif
76
77#if defined(CONFIG_SUN3)
78#define MACH_IS_SUN3 (1)
79#define MACH_SUN3_ONLY (1)
80#define MACH_TYPE (MACH_SUN3)
81#else
82#define MACH_IS_SUN3 (0)
83#endif
84
85#if !defined (CONFIG_APOLLO)
86# define MACH_IS_APOLLO (0)
87#elif defined(CONFIG_AMIGA) || defined(CONFIG_MAC) || defined(CONFIG_ATARI) \
88 || defined(CONFIG_MVME16x) || defined(CONFIG_BVME6000) \
89 || defined(CONFIG_HP300) || defined(CONFIG_Q40) \
90 || defined(CONFIG_SUN3X) || defined(CONFIG_MVME147) \
91 || defined(CONFIG_VIRT)
92# define MACH_IS_APOLLO (m68k_machtype == MACH_APOLLO)
93#else
94# define MACH_APOLLO_ONLY
95# define MACH_IS_APOLLO (1)
96# define MACH_TYPE (MACH_APOLLO)
97#endif
98
99#if !defined (CONFIG_MVME147)
100# define MACH_IS_MVME147 (0)
101#elif defined(CONFIG_AMIGA) || defined(CONFIG_MAC) || defined(CONFIG_ATARI) \
102 || defined(CONFIG_APOLLO) || defined(CONFIG_BVME6000) \
103 || defined(CONFIG_HP300) || defined(CONFIG_Q40) \
104 || defined(CONFIG_SUN3X) || defined(CONFIG_MVME16x) \
105 || defined(CONFIG_VIRT)
106# define MACH_IS_MVME147 (m68k_machtype == MACH_MVME147)
107#else
108# define MACH_MVME147_ONLY
109# define MACH_IS_MVME147 (1)
110# define MACH_TYPE (MACH_MVME147)
111#endif
112
113#if !defined (CONFIG_MVME16x)
114# define MACH_IS_MVME16x (0)
115#elif defined(CONFIG_AMIGA) || defined(CONFIG_MAC) || defined(CONFIG_ATARI) \
116 || defined(CONFIG_APOLLO) || defined(CONFIG_BVME6000) \
117 || defined(CONFIG_HP300) || defined(CONFIG_Q40) \
118 || defined(CONFIG_SUN3X) || defined(CONFIG_MVME147) \
119 || defined(CONFIG_VIRT)
120# define MACH_IS_MVME16x (m68k_machtype == MACH_MVME16x)
121#else
122# define MACH_MVME16x_ONLY
123# define MACH_IS_MVME16x (1)
124# define MACH_TYPE (MACH_MVME16x)
125#endif
126
127#if !defined (CONFIG_BVME6000)
128# define MACH_IS_BVME6000 (0)
129#elif defined(CONFIG_AMIGA) || defined(CONFIG_MAC) || defined(CONFIG_ATARI) \
130 || defined(CONFIG_APOLLO) || defined(CONFIG_MVME16x) \
131 || defined(CONFIG_HP300) || defined(CONFIG_Q40) \
132 || defined(CONFIG_SUN3X) || defined(CONFIG_MVME147) \
133 || defined(CONFIG_VIRT)
134# define MACH_IS_BVME6000 (m68k_machtype == MACH_BVME6000)
135#else
136# define MACH_BVME6000_ONLY
137# define MACH_IS_BVME6000 (1)
138# define MACH_TYPE (MACH_BVME6000)
139#endif
140
141#if !defined (CONFIG_HP300)
142# define MACH_IS_HP300 (0)
143#elif defined(CONFIG_AMIGA) || defined(CONFIG_MAC) || defined(CONFIG_ATARI) \
144 || defined(CONFIG_APOLLO) || defined(CONFIG_MVME16x) \
145 || defined(CONFIG_BVME6000) || defined(CONFIG_Q40) \
146 || defined(CONFIG_SUN3X) || defined(CONFIG_MVME147) \
147 || defined(CONFIG_VIRT)
148# define MACH_IS_HP300 (m68k_machtype == MACH_HP300)
149#else
150# define MACH_HP300_ONLY
151# define MACH_IS_HP300 (1)
152# define MACH_TYPE (MACH_HP300)
153#endif
154
155#if !defined (CONFIG_Q40)
156# define MACH_IS_Q40 (0)
157#elif defined(CONFIG_AMIGA) || defined(CONFIG_MAC) || defined(CONFIG_ATARI) \
158 || defined(CONFIG_APOLLO) || defined(CONFIG_MVME16x) \
159 || defined(CONFIG_BVME6000) || defined(CONFIG_HP300) \
160 || defined(CONFIG_SUN3X) || defined(CONFIG_MVME147) \
161 || defined(CONFIG_VIRT)
162# define MACH_IS_Q40 (m68k_machtype == MACH_Q40)
163#else
164# define MACH_Q40_ONLY
165# define MACH_IS_Q40 (1)
166# define MACH_TYPE (MACH_Q40)
167#endif
168
169#if !defined (CONFIG_SUN3X)
170# define MACH_IS_SUN3X (0)
171#elif defined(CONFIG_AMIGA) || defined(CONFIG_MAC) || defined(CONFIG_ATARI) \
172 || defined(CONFIG_APOLLO) || defined(CONFIG_MVME16x) \
173 || defined(CONFIG_BVME6000) || defined(CONFIG_HP300) \
174 || defined(CONFIG_Q40) || defined(CONFIG_MVME147) \
175 || defined(CONFIG_VIRT)
176# define MACH_IS_SUN3X (m68k_machtype == MACH_SUN3X)
177#else
178# define CONFIG_SUN3X_ONLY
179# define MACH_IS_SUN3X (1)
180# define MACH_TYPE (MACH_SUN3X)
181#endif
182
183#if !defined(CONFIG_VIRT)
184# define MACH_IS_VIRT (0)
185#elif defined(CONFIG_AMIGA) || defined(CONFIG_MAC) || defined(CONFIG_ATARI) \
186 || defined(CONFIG_APOLLO) || defined(CONFIG_MVME16x) \
187 || defined(CONFIG_BVME6000) || defined(CONFIG_HP300) \
188 || defined(CONFIG_Q40) || defined(CONFIG_SUN3X) \
189 || defined(CONFIG_MVME147)
190# define MACH_IS_VIRT (m68k_machtype == MACH_VIRT)
191#else
192# define MACH_VIRT_ONLY
193# define MACH_IS_VIRT (1)
194# define MACH_TYPE (MACH_VIRT)
195#endif
196
197#ifndef MACH_TYPE
198# define MACH_TYPE (m68k_machtype)
199#endif
200
201
202#ifndef __ASSEMBLY__
203extern unsigned long m68k_cputype;
204extern unsigned long m68k_fputype;
205extern unsigned long m68k_mmutype;
206#ifdef CONFIG_VME
207extern unsigned long vme_brdtype;
208#endif
209
210 /*
211 * m68k_is040or060 is != 0 for a '040 or higher;
212 * used numbers are 4 for 68040 and 6 for 68060.
213 */
214
215extern int m68k_is040or060;
216#endif /* !__ASSEMBLY__ */
217
218#if !defined(CONFIG_M68020)
219# define CPU_IS_020 (0)
220# define MMU_IS_851 (0)
221# define MMU_IS_SUN3 (0)
222#elif defined(CONFIG_M68030) || defined(CONFIG_M68040) || defined(CONFIG_M68060)
223# define CPU_IS_020 (m68k_cputype & CPU_68020)
224# define MMU_IS_851 (m68k_mmutype & MMU_68851)
225# define MMU_IS_SUN3 (0) /* Sun3 not supported with other CPU enabled */
226#else
227# define CPU_M68020_ONLY
228# define CPU_IS_020 (1)
229#ifdef MACH_SUN3_ONLY
230# define MMU_IS_SUN3 (1)
231# define MMU_IS_851 (0)
232#else
233# define MMU_IS_SUN3 (0)
234# define MMU_IS_851 (1)
235#endif
236#endif
237
238#if !defined(CONFIG_M68030)
239# define CPU_IS_030 (0)
240# define MMU_IS_030 (0)
241#elif defined(CONFIG_M68020) || defined(CONFIG_M68040) || defined(CONFIG_M68060)
242# define CPU_IS_030 (m68k_cputype & CPU_68030)
243# define MMU_IS_030 (m68k_mmutype & MMU_68030)
244#else
245# define CPU_M68030_ONLY
246# define CPU_IS_030 (1)
247# define MMU_IS_030 (1)
248#endif
249
250#if !defined(CONFIG_M68040)
251# define CPU_IS_040 (0)
252# define MMU_IS_040 (0)
253#elif defined(CONFIG_M68020) || defined(CONFIG_M68030) || defined(CONFIG_M68060)
254# define CPU_IS_040 (m68k_cputype & CPU_68040)
255# define MMU_IS_040 (m68k_mmutype & MMU_68040)
256#else
257# define CPU_M68040_ONLY
258# define CPU_IS_040 (1)
259# define MMU_IS_040 (1)
260#endif
261
262#if !defined(CONFIG_M68060)
263# define CPU_IS_060 (0)
264# define MMU_IS_060 (0)
265#elif defined(CONFIG_M68020) || defined(CONFIG_M68030) || defined(CONFIG_M68040)
266# define CPU_IS_060 (m68k_cputype & CPU_68060)
267# define MMU_IS_060 (m68k_mmutype & MMU_68060)
268#else
269# define CPU_M68060_ONLY
270# define CPU_IS_060 (1)
271# define MMU_IS_060 (1)
272#endif
273
274#if !defined(CONFIG_M68020) && !defined(CONFIG_M68030)
275# define CPU_IS_020_OR_030 (0)
276#else
277# define CPU_M68020_OR_M68030
278# if defined(CONFIG_M68040) || defined(CONFIG_M68060)
279# define CPU_IS_020_OR_030 (!m68k_is040or060)
280# else
281# define CPU_M68020_OR_M68030_ONLY
282# define CPU_IS_020_OR_030 (1)
283# endif
284#endif
285
286#if !defined(CONFIG_M68040) && !defined(CONFIG_M68060)
287# define CPU_IS_040_OR_060 (0)
288#else
289# define CPU_M68040_OR_M68060
290# if defined(CONFIG_M68020) || defined(CONFIG_M68030)
291# define CPU_IS_040_OR_060 (m68k_is040or060)
292# else
293# define CPU_M68040_OR_M68060_ONLY
294# define CPU_IS_040_OR_060 (1)
295# endif
296#endif
297
298#if !defined(CONFIG_COLDFIRE)
299# define CPU_IS_COLDFIRE (0)
300#else
301# define CPU_IS_COLDFIRE (1)
302# define MMU_IS_COLDFIRE (1)
303#endif
304
305#define CPU_TYPE (m68k_cputype)
306
307#ifdef CONFIG_M68KFPU_EMU
308# ifdef CONFIG_M68KFPU_EMU_ONLY
309# define FPU_IS_EMU (1)
310# else
311# define FPU_IS_EMU (!m68k_fputype)
312# endif
313#else
314# define FPU_IS_EMU (0)
315#endif
316
317
318 /*
319 * Miscellaneous
320 */
321
322#define NUM_MEMINFO 4
323
324#ifndef __ASSEMBLY__
325struct m68k_mem_info {
326 unsigned long addr; /* physical address of memory chunk */
327 unsigned long size; /* length of memory chunk (in bytes) */
328};
329
330extern int m68k_num_memory; /* # of memory blocks found (and used) */
331extern int m68k_realnum_memory; /* real # of memory blocks found */
332extern struct m68k_mem_info m68k_memory[NUM_MEMINFO];/* memory description */
333#endif
334
335#endif /* _M68K_SETUP_H */