3 * Murray Jensen, CSIRO-MST
5 * See file CREDITS for list of people who contributed to this
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License as
10 * published by the Free Software Foundation; either version 2 of
11 * the License, or (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
24 #ifndef _CONFIG_COGENT_COMMON_H
25 #define _CONFIG_COGENT_COMMON_H
28 * Cogent Motherboard Capabilities
30 #define CMA_MB_CAP_SERPAR 0x0001 /* has dual serial+parallel (16C552) */
31 #define CMA_MB_CAP_LCD 0x0002 /* has LCD display (HD44780) */
32 #define CMA_MB_CAP_FLASH 0x0004 /* has flash (E28F800B or AM29F800BB) */
33 #define CMA_MB_CAP_RTC 0x0008 /* has RTC+NVRAM (MK48T02) */
34 #define CMA_MB_CAP_ETHER 0x0010 /* has Ethernet (MB86964) */
35 #define CMA_MB_CAP_SLOT1 0x0020 /* has CMABus slot 1 */
36 #define CMA_MB_CAP_SLOT2 0x0040 /* has CMABus slot 2 */
37 #define CMA_MB_CAP_SLOT3 0x0080 /* has CMABus slot 3 */
38 #define CMA_MB_CAP_KBM 0x0100 /* has PS/2 keyboard+mouse (HT6542B) */
39 #define CMA_MB_CAP_SER2 0x0200 /* has 2nd dual serial (16C2552) */
40 #define CMA_MB_CAP_PCI 0x0400 /* has pci bridge (V360EPC) */
41 #define CMA_MB_CAP_PCI_EXT 0x0800 /* can access extended pci space */
42 #define CMA_MB_CAP_PCI_ETHER 0x1000 /* has 10/100 ether on PCI (GD82559) */
43 #define CMA_MB_CAP_PCI_VIDEO 0x2000 /* has video int'face on PCI (B69000) */
44 #define CMA_MB_CAP_PCI_CARDBUS 0x4000 /* has Cardbus Ctlr on PCI (PD6832) */
47 * Cogent option sanity checking
50 #if defined(CONFIG_MPC821) || defined(CONFIG_MPC823) || \
51 defined(CONFIG_MPC850) || defined(CONFIG_MPC860)
54 * check a PowerPC 8xx cpu module has been selected
57 # if defined(CONFIG_CMA286_21)
59 # define COGENT_CPU_MODULE "CMA286-21"
61 # elif defined(CONFIG_CMA286_60_OLD)
63 # define COGENT_CPU_MODULE "CMA286-60 (old)"
65 # elif defined(CONFIG_CMA286_60)
67 # define COGENT_CPU_MODULE "CMA286-60"
69 # elif defined(CONFIG_CMA286_60P)
71 # define COGENT_CPU_MODULE "CMA286-60P"
73 # elif defined(CONFIG_CMA287_21)
75 # define COGENT_CPU_MODULE "CMA287-21"
77 # elif defined(CONFIG_CMA287_50)
79 # define COGENT_CPU_MODULE "CMA287-50"
83 # error Cogent CPU Module must be a PowerPC MPC8xx module
87 #elif defined(CONFIG_MPC8260)
90 * check a PowerPC 8260 cpu module has been selected
93 # if defined(CONFIG_CMA282)
95 # define COGENT_CPU_MODULE "CMA282"
99 # error Cogent CPU Module must be a PowerPC MPC8260 module
105 # error CPU type must be PowerPC 8xx or 8260
110 * check a motherboard has been selected
111 * define the motherboard capabilities while we're at it
114 #if defined(CONFIG_CMA101)
116 # define COGENT_MOTHERBOARD "CMA101"
117 # define CMA_MB_CAPS (CMA_MB_CAP_SERPAR | CMA_MB_CAP_LCD | \
118 CMA_MB_CAP_RTC | CMA_MB_CAP_ETHER | \
119 CMA_MB_CAP_SLOT1 | CMA_MB_CAP_SLOT2 | \
121 # define CMA_MB_NSLOTS 3
123 #elif defined(CONFIG_CMA102)
125 # define COGENT_MOTHERBOARD "CMA102"
126 # define CMA_MB_CAPS (CMA_MB_CAP_SERPAR | CMA_MB_CAP_LCD | \
127 CMA_MB_CAP_RTC | CMA_MB_CAP_SLOT1 | \
128 CMA_MB_CAP_SLOT2 | CMA_MB_CAP_SLOT3)
129 # define CMA_MB_NSLOTS 3
131 #elif defined(CONFIG_CMA110)
133 # define COGENT_MOTHERBOARD "CMA110"
134 # define CMA_MB_CAPS (CMA_MB_CAP_SERPAR | CMA_MB_CAP_LCD | \
135 CMA_MB_CAP_FLASH | CMA_MB_CAP_RTC | \
136 CMA_MB_CAP_KBM | CMA_MB_CAP_PCI)
137 # define CMA_MB_NSLOTS 0
139 #elif defined(CONFIG_CMA111)
141 # define COGENT_MOTHERBOARD "CMA111"
142 # define CMA_MB_CAPS (CMA_MB_CAP_SERPAR | CMA_MB_CAP_LCD | \
143 CMA_MB_CAP_FLASH | CMA_MB_CAP_RTC | \
144 CMA_MB_CAP_SLOT1 | CMA_MB_CAP_KBM | \
145 CMA_MB_CAP_PCI | CMA_MB_CAP_PCI_EXT | \
146 CMA_MB_CAP_PCI_ETHER)
147 # define CMA_MB_NSLOTS 1
149 #elif defined(CONFIG_CMA120)
151 # define COGENT_MOTHERBOARD "CMA120"
152 # define CMA_MB_CAPS (CMA_MB_CAP_SERPAR | CMA_MB_CAP_LCD | \
153 CMA_MB_CAP_FLASH | CMA_MB_CAP_RTC | \
154 CMA_MB_CAP_SLOT1 | CMA_MB_CAP_KBM | \
155 CMA_MB_CAP_SER2 | CMA_MB_CAP_PCI | \
156 CMA_MB_CAP_PCI_EXT | CMA_MB_CAP_PCI_ETHER | \
157 CMA_MB_CAP_PCI_VIDEO | CMA_MB_CAP_PCI_CARDBUS)
158 # define CMA_MB_NSLOTS 1
160 #elif defined(CONFIG_CMA150)
162 # define COGENT_MOTHERBOARD "CMA150"
163 # define CMA_MB_CAPS (CMA_MB_CAP_SERPAR | CMA_MB_CAP_LCD | \
164 CMA_MB_CAP_FLASH | CMA_MB_CAP_RTC | \
166 # define CMA_MB_NSLOTS 0
170 # error Cogent Motherboard either unsupported or undefined
175 * check a flash i/o module has been selected if no flash on m/b
178 #if defined(CONFIG_CMA302)
180 # define COGENT_FLASH_MODULE "CMA302"
182 #elif (CMA_MB_CAPS & CMA_MB_CAP_FLASH) == 0
184 # error Cogent Flash I/O module (e.g. CMA302) is required with this Motherboard
189 * some further sanity checks
192 #if (CMA_MB_CAPS & CMA_MB_CAP_PCI) && (CMA_MB_CAPS & CMA_MB_CAP_SLOT2)
193 #error Cogent Sanity Check: Both Slot2 and PCI are defined
196 #if (CMA_MB_CAPS & CMA_MB_CAP_PCI_EXT) && !(CMA_MB_CAPS & CMA_MB_CAP_PCI)
197 #error Extended PCI capability defined without PCI capability
200 #if (CMA_MB_CAPS & CMA_MB_CAP_PCI_ETHER) && !(CMA_MB_CAPS & CMA_MB_CAP_PCI)
201 #error Motherboard ethernet capability defined without PCI capability
204 #if (CMA_MB_CAPS & CMA_MB_CAP_SER2) && !(CMA_MB_CAPS & CMA_MB_CAP_SERPAR)
205 #error 2nd dual serial capability defined without serial/parallel capability
207 #include "../board/cogent/mb.h"
208 #endif /* _CONFIG_COGENT_COMMON_H */