/* * Copyright (c) 2008 Carsten Schlote * See file CREDITS for list of people who contributed to this project. * * This file is part of U-Boot V2. * * U-Boot V2 is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * U-Boot V2 is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with U-Boot V2. If not, see . */ /** @file * Arch dependant U-Boot defines about linux mach types */ #ifndef _M68K_SETUP_H #define _M68K_SETUP_H #include /* * Linux/m68k Architectures */ #define MACH_AMIGA 1 #define MACH_ATARI 2 #define MACH_MAC 3 #define MACH_APOLLO 4 #define MACH_SUN3 5 #define MACH_MVME147 6 #define MACH_MVME16x 7 #define MACH_BVME6000 8 #define MACH_HP300 9 #define MACH_Q40 10 #define MACH_SUN3X 11 /* ColdFire boards */ #define MACH_FIRE_ENGINE 12 #ifdef __KERNEL__ #ifndef __ASSEMBLY__ extern unsigned long m68k_machtype; #endif /* !__ASSEMBLY__ */ #if !defined(CONFIG_AMIGA) # define MACH_IS_AMIGA (0) #elif defined(CONFIG_ATARI) || defined(CONFIG_MAC) || defined(CONFIG_APOLLO) \ || defined(CONFIG_MVME16x) || defined(CONFIG_BVME6000) \ || defined(CONFIG_HP300) || defined(CONFIG_Q40) \ || defined(CONFIG_SUN3X) || defined(CONFIG_MVME147) # define MACH_IS_AMIGA (m68k_machtype == MACH_AMIGA) #else # define MACH_AMIGA_ONLY # define MACH_IS_AMIGA (1) # define MACH_TYPE (MACH_AMIGA) #endif #if !defined(CONFIG_ATARI) # define MACH_IS_ATARI (0) #elif defined(CONFIG_AMIGA) || defined(CONFIG_MAC) || defined(CONFIG_APOLLO) \ || defined(CONFIG_MVME16x) || defined(CONFIG_BVME6000) \ || defined(CONFIG_HP300) || defined(CONFIG_Q40) \ || defined(CONFIG_SUN3X) || defined(CONFIG_MVME147) # define MACH_IS_ATARI (m68k_machtype == MACH_ATARI) #else # define MACH_ATARI_ONLY # define MACH_IS_ATARI (1) # define MACH_TYPE (MACH_ATARI) #endif #if !defined(CONFIG_MAC) # define MACH_IS_MAC (0) #elif defined(CONFIG_AMIGA) || defined(CONFIG_ATARI) || defined(CONFIG_APOLLO) \ || defined(CONFIG_MVME16x) || defined(CONFIG_BVME6000) \ || defined(CONFIG_HP300) || defined(CONFIG_Q40) \ || defined(CONFIG_SUN3X) || defined(CONFIG_MVME147) # define MACH_IS_MAC (m68k_machtype == MACH_MAC) #else # define MACH_MAC_ONLY # define MACH_IS_MAC (1) # define MACH_TYPE (MACH_MAC) #endif #if defined(CONFIG_SUN3) #define MACH_IS_SUN3 (1) #define MACH_SUN3_ONLY (1) #define MACH_TYPE (MACH_SUN3) #else #define MACH_IS_SUN3 (0) #endif #if !defined (CONFIG_APOLLO) # define MACH_IS_APOLLO (0) #elif defined(CONFIG_AMIGA) || defined(CONFIG_MAC) || defined(CONFIG_ATARI) \ || defined(CONFIG_MVME16x) || defined(CONFIG_BVME6000) \ || defined(CONFIG_HP300) || defined(CONFIG_Q40) \ || defined(CONFIG_SUN3X) || defined(CONFIG_MVME147) # define MACH_IS_APOLLO (m68k_machtype == MACH_APOLLO) #else # define MACH_APOLLO_ONLY # define MACH_IS_APOLLO (1) # define MACH_TYPE (MACH_APOLLO) #endif #if !defined (CONFIG_MVME147) # define MACH_IS_MVME147 (0) #elif defined(CONFIG_AMIGA) || defined(CONFIG_MAC) || defined(CONFIG_ATARI) \ || defined(CONFIG_APOLLO) || defined(CONFIG_BVME6000) \ || defined(CONFIG_HP300) || defined(CONFIG_Q40) \ || defined(CONFIG_SUN3X) || defined(CONFIG_MVME16x) # define MACH_IS_MVME147 (m68k_machtype == MACH_MVME147) #else # define MACH_MVME147_ONLY # define MACH_IS_MVME147 (1) # define MACH_TYPE (MACH_MVME147) #endif #if !defined (CONFIG_MVME16x) # define MACH_IS_MVME16x (0) #elif defined(CONFIG_AMIGA) || defined(CONFIG_MAC) || defined(CONFIG_ATARI) \ || defined(CONFIG_APOLLO) || defined(CONFIG_BVME6000) \ || defined(CONFIG_HP300) || defined(CONFIG_Q40) \ || defined(CONFIG_SUN3X) || defined(CONFIG_MVME147) # define MACH_IS_MVME16x (m68k_machtype == MACH_MVME16x) #else # define MACH_MVME16x_ONLY # define MACH_IS_MVME16x (1) # define MACH_TYPE (MACH_MVME16x) #endif #if !defined (CONFIG_BVME6000) # define MACH_IS_BVME6000 (0) #elif defined(CONFIG_AMIGA) || defined(CONFIG_MAC) || defined(CONFIG_ATARI) \ || defined(CONFIG_APOLLO) || defined(CONFIG_MVME16x) \ || defined(CONFIG_HP300) || defined(CONFIG_Q40) \ || defined(CONFIG_SUN3X) || defined(CONFIG_MVME147) # define MACH_IS_BVME6000 (m68k_machtype == MACH_BVME6000) #else # define MACH_BVME6000_ONLY # define MACH_IS_BVME6000 (1) # define MACH_TYPE (MACH_BVME6000) #endif #if !defined (CONFIG_HP300) # define MACH_IS_HP300 (0) #elif defined(CONFIG_AMIGA) || defined(CONFIG_MAC) || defined(CONFIG_ATARI) \ || defined(CONFIG_APOLLO) || defined(CONFIG_MVME16x) \ || defined(CONFIG_BVME6000) || defined(CONFIG_Q40) \ || defined(CONFIG_SUN3X) || defined(CONFIG_MVME147) # define MACH_IS_HP300 (m68k_machtype == MACH_HP300) #else # define MACH_HP300_ONLY # define MACH_IS_HP300 (1) # define MACH_TYPE (MACH_HP300) #endif #if !defined (CONFIG_Q40) # define MACH_IS_Q40 (0) #elif defined(CONFIG_AMIGA) || defined(CONFIG_MAC) || defined(CONFIG_ATARI) \ || defined(CONFIG_APOLLO) || defined(CONFIG_MVME16x) \ || defined(CONFIG_BVME6000) || defined(CONFIG_HP300) \ || defined(CONFIG_SUN3X) || defined(CONFIG_MVME147) # define MACH_IS_Q40 (m68k_machtype == MACH_Q40) #else # define MACH_Q40_ONLY # define MACH_IS_Q40 (1) # define MACH_TYPE (MACH_Q40) #endif #if !defined (CONFIG_SUN3X) # define MACH_IS_SUN3X (0) #elif defined(CONFIG_AMIGA) || defined(CONFIG_MAC) || defined(CONFIG_ATARI) \ || defined(CONFIG_APOLLO) || defined(CONFIG_MVME16x) \ || defined(CONFIG_BVME6000) || defined(CONFIG_HP300) \ || defined(CONFIG_Q40) || defined(CONFIG_MVME147) # define MACH_IS_SUN3X (m68k_machtype == MACH_SUN3X) #else # define CONFIG_SUN3X_ONLY # define MACH_IS_SUN3X (1) # define MACH_TYPE (MACH_SUN3X) #endif /* * We only support one ColdFire board for the moment, so we don't do the * kind of complicated configuration this file does for the other 68k CPUs. --NL */ #if !defined (CONFIG_COLDFIRE) # define MACH_IS_COLDFIRE (0) #else # define CONFIG_COLDFIRE_ONLY # define MACH_IS_COLDFIRE (1) # define MACH_TYPE (MACH_COLDFIRE) #endif #ifndef MACH_TYPE # define MACH_TYPE (m68k_machtype) #endif #endif /* __KERNEL__ */ /* * CPU, FPU and MMU types * * Note: we may rely on the following equalities: * * CPU_68020 == MMU_68851 * CPU_68030 == MMU_68030 * CPU_68040 == FPU_68040 == MMU_68040 * CPU_68060 == FPU_68060 == MMU_68060 */ #define CPUB_68020 0 #define CPUB_68030 1 #define CPUB_68040 2 #define CPUB_68060 3 #define CPUB_CFV4E 4 #define CPU_68020 (1<