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