Signed-off-by: Stefan Tauner <[email protected]>
---
 sb600spi.c |   10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/sb600spi.c b/sb600spi.c
index 42a0ece..95e5ad1 100644
--- a/sb600spi.c
+++ b/sb600spi.c
@@ -246,6 +246,16 @@ int sb600_probe_spi(struct pci_dev *dev)
        msg_pdbg("PrefetchEnSPIFromHost=%i, SpiOpEnInLpcMode=%i\n",
                     tmp & 0x1, (tmp & 0x20) >> 5);
        tmp = mmio_readl(sb600_spibar);
+       if (((tmp >> 18) & 0x3) != 0) {
+               msg_pdbg("Disabling fast reads and setting SPI clock to 16.5 
MHz...");
+               tmp &= ~(0x3 << 18);
+               mmio_writel(tmp, sb600_spibar);
+               mmio_writeb(mmio_readb(sb600_spibar + 0xd) | (0x3 << 4), 
sb600_spibar + 0xd);
+
+               tmp = mmio_readl(sb600_spibar);
+               msg_pdbg(" done\n");
+       }
+
        /* FIXME: If SpiAccessMacRomEn or SpiHostAccessRomEn are zero on
         * SB700 or later, reads and writes will be corrupted. Abort in this
         * case. Make sure to avoid this check on SB600.
-- 
Kind regards, Stefan Tauner


_______________________________________________
flashrom mailing list
[email protected]
http://www.flashrom.org/mailman/listinfo/flashrom

Reply via email to