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 <[email protected]>

-- 
coreboot mailing list: [email protected]
http://www.coreboot.org/mailman/listinfo/coreboot

Reply via email to