blob: cdf5802a8358ed24e0f552b185d7342ac43d6673 [file] [log] [blame]
wdenk1d589e32001-01-20 01:23:52 +00001/*
2 * (C) Copyright 2000
3 * Murray Jensen, CSIRO-MST
4 *
5 * See file CREDITS for list of people who contributed to this
6 * project.
7 *
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.
12 *
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.
17 *
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,
21 * MA 02111-1307 USA
22 */
23
24#ifndef _CONFIG_COGENT_COMMON_H
25#define _CONFIG_COGENT_COMMON_H
26
27/*
28 * Cogent Motherboard Capabilities
29 */
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) */
45
46/*
47 * Cogent option sanity checking
48 */
49
50#if defined(CONFIG_MPC821) || defined(CONFIG_MPC823) || \
51 defined(CONFIG_MPC850) || defined(CONFIG_MPC860)
52
53/*
54 * check a PowerPC 8xx cpu module has been selected
55 */
56
57# if defined(CONFIG_CMA286_21)
58
59# define COGENT_CPU_MODULE "CMA286-21"
60
61# elif defined(CONFIG_CMA286_60_OLD)
62
63# define COGENT_CPU_MODULE "CMA286-60 (old)"
64
65# elif defined(CONFIG_CMA286_60)
66
67# define COGENT_CPU_MODULE "CMA286-60"
68
69# elif defined(CONFIG_CMA286_60P)
70
71# define COGENT_CPU_MODULE "CMA286-60P"
72
73# elif defined(CONFIG_CMA287_21)
74
75# define COGENT_CPU_MODULE "CMA287-21"
76
77# elif defined(CONFIG_CMA287_50)
78
79# define COGENT_CPU_MODULE "CMA287-50"
80
81# else
82
83# error Cogent CPU Module must be a PowerPC MPC8xx module
84
85# endif
86
87#elif defined(CONFIG_MPC8260)
88
89/*
90 * check a PowerPC 8260 cpu module has been selected
91 */
92
93# if defined(CONFIG_CMA282)
94
95# define COGENT_CPU_MODULE "CMA282"
96
97# else
98
99# error Cogent CPU Module must be a PowerPC MPC8260 module
100
101# endif
102
103#else
104
105# error CPU type must be PowerPC 8xx or 8260
106
107#endif
108
109/*
110 * check a motherboard has been selected
111 * define the motherboard capabilities while we're at it
112 */
113
114#if defined(CONFIG_CMA101)
115
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 | \
120 CMA_MB_CAP_SLOT3)
121# define CMA_MB_NSLOTS 3
122
123#elif defined(CONFIG_CMA102)
124
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
130
131#elif defined(CONFIG_CMA110)
132
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
138
139#elif defined(CONFIG_CMA111)
140
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
148
149#elif defined(CONFIG_CMA120)
150
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
159
160#elif defined(CONFIG_CMA150)
161
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 | \
165 CMA_MB_CAP_KBM)
166# define CMA_MB_NSLOTS 0
167
168#else
169
170# error Cogent Motherboard either unsupported or undefined
171
172#endif
173
174/*
175 * check a flash i/o module has been selected if no flash on m/b
176 */
177
178#if defined(CONFIG_CMA302)
179
180# define COGENT_FLASH_MODULE "CMA302"
181
182#elif (CMA_MB_CAPS & CMA_MB_CAP_FLASH) == 0
183
184# error Cogent Flash I/O module (e.g. CMA302) is required with this Motherboard
185
186#endif
187
188/*
189 * some further sanity checks
190 */
191
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
194#endif
195
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
198#endif
199
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
202#endif
203
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
206#endif
wdenk7d1eb822004-09-29 11:02:56 +0000207#include "../board/cogent/mb.h"
wdenk1d589e32001-01-20 01:23:52 +0000208#endif /* _CONFIG_COGENT_COMMON_H */