- Timestamp:
- 09/18/11 00:21:55 (8 months ago)
- File:
-
- 1 edited
-
trunk/ichspi.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ichspi.c
r1446 r1447 1201 1201 } 1202 1202 1203 /* Set/Clear the read and write protection enable bits of PR register @i 1204 * according to @read_prot and @write_prot. */ 1205 static void ich9_set_pr(int i, int read_prot, int write_prot) 1206 { 1207 void *addr = ich_spibar + ICH9_REG_PR0 + (i * 4); 1208 uint32_t old = mmio_readl(addr); 1209 uint32_t new; 1210 1211 msg_gspew("PR%u is 0x%08x", i, old); 1212 new = old & ~((1 << PR_RP_OFF) | (1 << PR_WP_OFF)); 1213 if (read_prot) 1214 new |= (1 << PR_RP_OFF); 1215 if (write_prot) 1216 new |= (1 << PR_WP_OFF); 1217 if (old == new) { 1218 msg_gspew(" already.\n"); 1219 return; 1220 } 1221 msg_gspew(", trying to set it to 0x%08x ", new); 1222 rmmio_writel(new, addr); 1223 msg_gspew("resulted in 0x%08x.\n", mmio_readl(addr)); 1224 } 1225 1203 1226 static const struct spi_programmer spi_programmer_ich7 = { 1204 1227 .type = SPI_CONTROLLER_ICH7, … … 1321 1344 do_ich9_spi_frap(tmp, i); 1322 1345 1346 /* try to disable PR locks before printing them */ 1347 if (!ichspi_lock) 1348 for(i = 0; i < 5; i++) 1349 ich9_set_pr(i, 0, 0); 1323 1350 for(i = 0; i < 5; i++) 1324 1351 prettyprint_ich9_reg_pr(i);
Note: See TracChangeset
for help on using the changeset viewer.
