wdenk | 1d589e3 | 2001-01-20 01:23:52 +0000 | [diff] [blame] | 1 | /* |
| 2 | * (C) Copyright 2000 |
| 3 | * Murray Jensen, CSIRO-MST |
| 4 | * |
Wolfgang Denk | 1a45966 | 2013-07-08 09:37:19 +0200 | [diff] [blame] | 5 | * SPDX-License-Identifier: GPL-2.0+ |
wdenk | 1d589e3 | 2001-01-20 01:23:52 +0000 | [diff] [blame] | 6 | */ |
| 7 | |
| 8 | #ifndef _CONFIG_COGENT_COMMON_H |
| 9 | #define _CONFIG_COGENT_COMMON_H |
| 10 | |
| 11 | /* |
| 12 | * Cogent Motherboard Capabilities |
| 13 | */ |
| 14 | #define CMA_MB_CAP_SERPAR 0x0001 /* has dual serial+parallel (16C552) */ |
| 15 | #define CMA_MB_CAP_LCD 0x0002 /* has LCD display (HD44780) */ |
| 16 | #define CMA_MB_CAP_FLASH 0x0004 /* has flash (E28F800B or AM29F800BB) */ |
| 17 | #define CMA_MB_CAP_RTC 0x0008 /* has RTC+NVRAM (MK48T02) */ |
| 18 | #define CMA_MB_CAP_ETHER 0x0010 /* has Ethernet (MB86964) */ |
| 19 | #define CMA_MB_CAP_SLOT1 0x0020 /* has CMABus slot 1 */ |
| 20 | #define CMA_MB_CAP_SLOT2 0x0040 /* has CMABus slot 2 */ |
| 21 | #define CMA_MB_CAP_SLOT3 0x0080 /* has CMABus slot 3 */ |
| 22 | #define CMA_MB_CAP_KBM 0x0100 /* has PS/2 keyboard+mouse (HT6542B) */ |
| 23 | #define CMA_MB_CAP_SER2 0x0200 /* has 2nd dual serial (16C2552) */ |
| 24 | #define CMA_MB_CAP_PCI 0x0400 /* has pci bridge (V360EPC) */ |
| 25 | #define CMA_MB_CAP_PCI_EXT 0x0800 /* can access extended pci space */ |
| 26 | #define CMA_MB_CAP_PCI_ETHER 0x1000 /* has 10/100 ether on PCI (GD82559) */ |
| 27 | #define CMA_MB_CAP_PCI_VIDEO 0x2000 /* has video int'face on PCI (B69000) */ |
| 28 | #define CMA_MB_CAP_PCI_CARDBUS 0x4000 /* has Cardbus Ctlr on PCI (PD6832) */ |
| 29 | |
| 30 | /* |
| 31 | * Cogent option sanity checking |
| 32 | */ |
| 33 | |
| 34 | #if defined(CONFIG_MPC821) || defined(CONFIG_MPC823) || \ |
| 35 | defined(CONFIG_MPC850) || defined(CONFIG_MPC860) |
| 36 | |
| 37 | /* |
| 38 | * check a PowerPC 8xx cpu module has been selected |
| 39 | */ |
| 40 | |
| 41 | # if defined(CONFIG_CMA286_21) |
| 42 | |
| 43 | # define COGENT_CPU_MODULE "CMA286-21" |
| 44 | |
| 45 | # elif defined(CONFIG_CMA286_60_OLD) |
| 46 | |
| 47 | # define COGENT_CPU_MODULE "CMA286-60 (old)" |
| 48 | |
| 49 | # elif defined(CONFIG_CMA286_60) |
| 50 | |
| 51 | # define COGENT_CPU_MODULE "CMA286-60" |
| 52 | |
| 53 | # elif defined(CONFIG_CMA286_60P) |
| 54 | |
| 55 | # define COGENT_CPU_MODULE "CMA286-60P" |
| 56 | |
| 57 | # elif defined(CONFIG_CMA287_21) |
| 58 | |
| 59 | # define COGENT_CPU_MODULE "CMA287-21" |
| 60 | |
| 61 | # elif defined(CONFIG_CMA287_50) |
| 62 | |
| 63 | # define COGENT_CPU_MODULE "CMA287-50" |
| 64 | |
| 65 | # else |
| 66 | |
| 67 | # error Cogent CPU Module must be a PowerPC MPC8xx module |
| 68 | |
| 69 | # endif |
| 70 | |
| 71 | #elif defined(CONFIG_MPC8260) |
| 72 | |
| 73 | /* |
| 74 | * check a PowerPC 8260 cpu module has been selected |
| 75 | */ |
| 76 | |
| 77 | # if defined(CONFIG_CMA282) |
| 78 | |
| 79 | # define COGENT_CPU_MODULE "CMA282" |
| 80 | |
| 81 | # else |
| 82 | |
| 83 | # error Cogent CPU Module must be a PowerPC MPC8260 module |
| 84 | |
| 85 | # endif |
| 86 | |
| 87 | #else |
| 88 | |
| 89 | # error CPU type must be PowerPC 8xx or 8260 |
| 90 | |
| 91 | #endif |
| 92 | |
| 93 | /* |
| 94 | * check a motherboard has been selected |
| 95 | * define the motherboard capabilities while we're at it |
| 96 | */ |
| 97 | |
| 98 | #if defined(CONFIG_CMA101) |
| 99 | |
| 100 | # define COGENT_MOTHERBOARD "CMA101" |
| 101 | # define CMA_MB_CAPS (CMA_MB_CAP_SERPAR | CMA_MB_CAP_LCD | \ |
| 102 | CMA_MB_CAP_RTC | CMA_MB_CAP_ETHER | \ |
| 103 | CMA_MB_CAP_SLOT1 | CMA_MB_CAP_SLOT2 | \ |
| 104 | CMA_MB_CAP_SLOT3) |
| 105 | # define CMA_MB_NSLOTS 3 |
| 106 | |
| 107 | #elif defined(CONFIG_CMA102) |
| 108 | |
| 109 | # define COGENT_MOTHERBOARD "CMA102" |
| 110 | # define CMA_MB_CAPS (CMA_MB_CAP_SERPAR | CMA_MB_CAP_LCD | \ |
| 111 | CMA_MB_CAP_RTC | CMA_MB_CAP_SLOT1 | \ |
| 112 | CMA_MB_CAP_SLOT2 | CMA_MB_CAP_SLOT3) |
| 113 | # define CMA_MB_NSLOTS 3 |
| 114 | |
| 115 | #elif defined(CONFIG_CMA110) |
| 116 | |
| 117 | # define COGENT_MOTHERBOARD "CMA110" |
| 118 | # define CMA_MB_CAPS (CMA_MB_CAP_SERPAR | CMA_MB_CAP_LCD | \ |
| 119 | CMA_MB_CAP_FLASH | CMA_MB_CAP_RTC | \ |
| 120 | CMA_MB_CAP_KBM | CMA_MB_CAP_PCI) |
| 121 | # define CMA_MB_NSLOTS 0 |
| 122 | |
| 123 | #elif defined(CONFIG_CMA111) |
| 124 | |
| 125 | # define COGENT_MOTHERBOARD "CMA111" |
| 126 | # define CMA_MB_CAPS (CMA_MB_CAP_SERPAR | CMA_MB_CAP_LCD | \ |
| 127 | CMA_MB_CAP_FLASH | CMA_MB_CAP_RTC | \ |
| 128 | CMA_MB_CAP_SLOT1 | CMA_MB_CAP_KBM | \ |
| 129 | CMA_MB_CAP_PCI | CMA_MB_CAP_PCI_EXT | \ |
| 130 | CMA_MB_CAP_PCI_ETHER) |
| 131 | # define CMA_MB_NSLOTS 1 |
| 132 | |
| 133 | #elif defined(CONFIG_CMA120) |
| 134 | |
| 135 | # define COGENT_MOTHERBOARD "CMA120" |
| 136 | # define CMA_MB_CAPS (CMA_MB_CAP_SERPAR | CMA_MB_CAP_LCD | \ |
| 137 | CMA_MB_CAP_FLASH | CMA_MB_CAP_RTC | \ |
| 138 | CMA_MB_CAP_SLOT1 | CMA_MB_CAP_KBM | \ |
| 139 | CMA_MB_CAP_SER2 | CMA_MB_CAP_PCI | \ |
| 140 | CMA_MB_CAP_PCI_EXT | CMA_MB_CAP_PCI_ETHER | \ |
| 141 | CMA_MB_CAP_PCI_VIDEO | CMA_MB_CAP_PCI_CARDBUS) |
| 142 | # define CMA_MB_NSLOTS 1 |
| 143 | |
| 144 | #elif defined(CONFIG_CMA150) |
| 145 | |
| 146 | # define COGENT_MOTHERBOARD "CMA150" |
| 147 | # define CMA_MB_CAPS (CMA_MB_CAP_SERPAR | CMA_MB_CAP_LCD | \ |
| 148 | CMA_MB_CAP_FLASH | CMA_MB_CAP_RTC | \ |
| 149 | CMA_MB_CAP_KBM) |
| 150 | # define CMA_MB_NSLOTS 0 |
| 151 | |
| 152 | #else |
| 153 | |
| 154 | # error Cogent Motherboard either unsupported or undefined |
| 155 | |
| 156 | #endif |
| 157 | |
| 158 | /* |
| 159 | * check a flash i/o module has been selected if no flash on m/b |
| 160 | */ |
| 161 | |
| 162 | #if defined(CONFIG_CMA302) |
| 163 | |
| 164 | # define COGENT_FLASH_MODULE "CMA302" |
| 165 | |
| 166 | #elif (CMA_MB_CAPS & CMA_MB_CAP_FLASH) == 0 |
| 167 | |
| 168 | # error Cogent Flash I/O module (e.g. CMA302) is required with this Motherboard |
| 169 | |
| 170 | #endif |
| 171 | |
| 172 | /* |
| 173 | * some further sanity checks |
| 174 | */ |
| 175 | |
| 176 | #if (CMA_MB_CAPS & CMA_MB_CAP_PCI) && (CMA_MB_CAPS & CMA_MB_CAP_SLOT2) |
| 177 | #error Cogent Sanity Check: Both Slot2 and PCI are defined |
| 178 | #endif |
| 179 | |
| 180 | #if (CMA_MB_CAPS & CMA_MB_CAP_PCI_EXT) && !(CMA_MB_CAPS & CMA_MB_CAP_PCI) |
| 181 | #error Extended PCI capability defined without PCI capability |
| 182 | #endif |
| 183 | |
| 184 | #if (CMA_MB_CAPS & CMA_MB_CAP_PCI_ETHER) && !(CMA_MB_CAPS & CMA_MB_CAP_PCI) |
| 185 | #error Motherboard ethernet capability defined without PCI capability |
| 186 | #endif |
| 187 | |
| 188 | #if (CMA_MB_CAPS & CMA_MB_CAP_SER2) && !(CMA_MB_CAPS & CMA_MB_CAP_SERPAR) |
| 189 | #error 2nd dual serial capability defined without serial/parallel capability |
| 190 | #endif |
wdenk | da93ed8 | 2004-09-29 11:02:56 +0000 | [diff] [blame] | 191 | #include "../board/cogent/mb.h" |
wdenk | 1d589e3 | 2001-01-20 01:23:52 +0000 | [diff] [blame] | 192 | #endif /* _CONFIG_COGENT_COMMON_H */ |