Changeset 1443
- Timestamp:
- 09/16/11 01:52:55 (8 months ago)
- Location:
- trunk
- Files:
-
- 2 added
- 2 edited
-
Makefile (modified) (1 diff)
-
ich_descriptors.c (added)
-
ich_descriptors.h (added)
-
ichspi.c (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Makefile
r1427 r1443 350 350 PROGRAMMER_OBJS += processor_enable.o chipset_enable.o board_enable.o cbtable.o dmi.o internal.o 351 351 ifeq ($(ARCH),"x86") 352 PROGRAMMER_OBJS += it87spi.o it85spi.o ichspi.o sb600spi.o wbsio_spi.o mcp6x_spi.o 352 PROGRAMMER_OBJS += it87spi.o it85spi.o sb600spi.o wbsio_spi.o mcp6x_spi.o 353 PROGRAMMER_OBJS += ichspi.o ich_descriptors.o 353 354 else 354 355 endif -
trunk/ichspi.c
r1414 r1443 30 30 #include "programmer.h" 31 31 #include "spi.h" 32 #include "ich_descriptors.h" 32 33 33 34 /* ICH9 controller register definition */ … … 119 120 #define ICH9_REG_BBAR 0xA0 /* 32 Bits BIOS Base Address Configuration */ 120 121 #define BBAR_MASK 0x00ffff00 /* 8-23: Bottom of System Flash */ 122 123 #define ICH8_REG_VSCC 0xC1 /* 32 Bits Vendor Specific Component Capabilities */ 124 #define ICH9_REG_LVSCC 0xC4 /* 32 Bits Host Lower Vendor Specific Component Capabilities */ 125 #define ICH9_REG_UVSCC 0xC8 /* 32 Bits Host Upper Vendor Specific Component Capabilities */ 126 /* The individual fields of the VSCC registers are defined in the file 127 * ich_descriptors.h. The reason is that the same layout is also used in the 128 * flash descriptor to define the properties of the different flash chips 129 * supported. The BIOS (or the ME?) is responsible to populate the ICH registers 130 * with the information from the descriptor on startup depending on the actual 131 * chip(s) detected. */ 121 132 122 133 #define ICH9_REG_FPB 0xD0 /* 32 Bits Flash Partition Boundary */ … … 1130 1141 #define ICH_BRRA(x) ((x >> 0) & 0xff) 1131 1142 1132 #define ICH_FREG_BASE(x) ((x >> 0) & 0x1fff)1133 #define ICH_FREG_LIMIT(x) ((x >> 16) & 0x1fff)1134 1135 1143 static void do_ich9_spi_frap(uint32_t frap, int i) 1136 1144 { … … 1159 1167 } 1160 1168 1161 msg_pdbg("0x%08x-0x%08x is %s\n", 1162 (base << 12), (limit << 12) | 0x0fff, 1163 access_names[rwperms]); 1169 msg_pdbg("0x%08x-0x%08x is %s\n", base, (limit | 0x0fff), 1170 access_names[rwperms]); 1164 1171 } 1165 1172 … … 1191 1198 uint16_t spibar_offset, tmp2; 1192 1199 uint32_t tmp; 1200 int ichspi_desc = 0; 1193 1201 1194 1202 switch (ich_generation) { … … 1262 1270 ichspi_lock = 1; 1263 1271 } 1272 if (tmp2 & HSFS_FDV) 1273 ichspi_desc = 1; 1264 1274 1265 1275 tmp2 = mmio_readw(ich_spibar + ICH9_REG_HSFC); … … 1309 1319 msg_pdbg("0x9C: 0x%08x (OPMENU+4)\n", 1310 1320 mmio_readl(ich_spibar + ICH9_REG_OPMENU + 4)); 1311 ichspi_bbar = mmio_readl(ich_spibar + ICH9_REG_BBAR); 1312 msg_pdbg("0xA0: 0x%08x (BBAR)\n", 1313 ichspi_bbar); 1314 tmp = mmio_readl(ich_spibar + ICH9_REG_FPB); 1315 msg_pdbg("0xD0: 0x%08x (FPB)\n", tmp); 1316 1321 if (ich_generation == 8) { 1322 tmp = mmio_readl(ich_spibar + ICH8_REG_VSCC); 1323 msg_pdbg("0xC1: 0x%08x (VSCC)\n", tmp); 1324 msg_pdbg("VSCC: "); 1325 prettyprint_ich_reg_vscc(tmp, MSG_DEBUG); 1326 } else { 1327 ichspi_bbar = mmio_readl(ich_spibar + ICH9_REG_BBAR); 1328 msg_pdbg("0xA0: 0x%08x (BBAR)\n", 1329 ichspi_bbar); 1330 1331 tmp = mmio_readl(ich_spibar + ICH9_REG_LVSCC); 1332 msg_pdbg("0xC4: 0x%08x (LVSCC)\n", tmp); 1333 msg_pdbg("LVSCC: "); 1334 prettyprint_ich_reg_vscc(tmp, MSG_DEBUG); 1335 1336 tmp = mmio_readl(ich_spibar + ICH9_REG_UVSCC); 1337 msg_pdbg("0xC8: 0x%08x (UVSCC)\n", tmp); 1338 msg_pdbg("UVSCC: "); 1339 prettyprint_ich_reg_vscc(tmp, MSG_DEBUG); 1340 1341 tmp = mmio_readl(ich_spibar + ICH9_REG_FPB); 1342 msg_pdbg("0xD0: 0x%08x (FPB)\n", tmp); 1343 } 1344 1345 msg_pdbg("\n"); 1346 if (ichspi_desc) { 1347 struct ich_descriptors desc = {{ 0 }}; 1348 if (read_ich_descriptors_via_fdo(ich_spibar, &desc) == 1349 ICH_RET_OK) 1350 prettyprint_ich_descriptors(CHIPSET_ICH_UNKNOWN, 1351 &desc); 1352 } 1317 1353 ich_init_opcodes(); 1318 1354 break;
Note: See TracChangeset
for help on using the changeset viewer.
