[coreboot] [PATCH] flashrom: Rewrite SB600 chipset enable function
Peter Stuge
peter at stuge.se
Tue May 5 18:17:00 CEST 2009
Carl-Daniel Hailfinger wrote:
> + prot = pci_read_long(dev, reg);
> + if (prot & 0x3)
> + printf("SB600 %s %s protected from %u to %u\n",
> + (prot & 0x1) ? "write" : "",
> + (prot & 0x2) ? "read" : "",
> + (prot & 0xfffffc00),
> + (prot & 0xfffffc00) + ((prot & 0x3ff) << 8));
> + prot &= 0xfffffffc;
> + pci_write_byte(dev, reg, prot);
I'd like to avoid writing at all if the region is unprotected. Please
just if (0 == (prot & 0x3)) continue; at the top. Maybe add a message
saying that the region is unprotected.
And I think these should be printf_debug() or such.
> + printf("SB600 still %s %s protected from %u to %u\n",
> + (prot & 0x1) ? "write" : "",
> + (prot & 0x2) ? "read" : "",
Output looks a little nicer if the space is moved down to the
trigraphs.
..still%s%s protected ..
" write" : "",
" read" : ""
Fix this and it's
Acked-by: Peter Stuge <peter at stuge.se>
More information about the coreboot
mailing list