summaryrefslogtreecommitdiffstats
path: root/chipset_enable.c
diff options
context:
space:
mode:
authorCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>2009-05-06 13:51:44 +0000
committerCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>2009-05-06 13:51:44 +0000
commit9bb88acc5ed11dba09848198f0a884320bf1b0b0 (patch)
tree4f3318c5cc5f83ecc6e5a3759affc4dcda045e36 /chipset_enable.c
parenta66ceba293a4cbbd3877c7d55206753370f95e80 (diff)
downloadast2050-flashrom-9bb88acc5ed11dba09848198f0a884320bf1b0b0.zip
ast2050-flashrom-9bb88acc5ed11dba09848198f0a884320bf1b0b0.tar.gz
Revert r466 because of inverted logic
If unprotect succeeded, it will print "SB600 unprotect failed". Corresponding to flashrom svn r467. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Diffstat (limited to 'chipset_enable.c')
-rw-r--r--chipset_enable.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/chipset_enable.c b/chipset_enable.c
index 8cb30cc..c52dd15 100644
--- a/chipset_enable.c
+++ b/chipset_enable.c
@@ -675,11 +675,12 @@ static int enable_flash_sb600(struct pci_dev *dev, const char *name)
prot &= 0xfffffffc;
pci_write_byte(dev, reg, prot);
prot = pci_read_long(dev, reg);
- printf("SB600 %s%sunprotect failed from %u to %u\n",
- (prot & 0x1) ? "write " : "",
- (prot & 0x2) ? "read " : "",
- (prot & 0xfffffc00),
- (prot & 0xfffffc00) + ((prot & 0x3ff) << 8));
+ if (prot & 0x3)
+ printf("SB600 still %s%sprotected from %u to %u\n",
+ (prot & 0x1) ? "write " : "",
+ (prot & 0x2) ? "read " : "",
+ (prot & 0xfffffc00),
+ (prot & 0xfffffc00) + ((prot & 0x3ff) << 8));
}
/* Read SPI_BaseAddr */
OpenPOWER on IntegriCloud