From patchwork Sat Aug 25 02:20:11 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: fixup! Remove potential endless loops from satasii.c. Date: Sat, 25 Aug 2012 02:20:11 -0000 From: Stefan Tauner X-Patchwork-Id: 3721 Message-Id: <1345861211-29427-1-git-send-email-stefan.tauner@student.tuwien.ac.at> To: flashrom@flashrom.org Cc: Carl-Daniel Hailfinger Signed-off-by: Carl-Daniel Hailfinger --- i have not looked at the datasheet... do we still want this in? then ill commit it with the previous patch... or my tested stuff branch? Signed-off-by: Stefan Tauner --- satasii.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/satasii.c b/satasii.c index a68a0c4..18003b8 100644 --- a/satasii.c +++ b/satasii.c @@ -79,6 +79,7 @@ int satasii_init(void) { uint32_t addr; uint16_t reg_offset; + uint32_t tmp; if (rget_io_perms()) return 1; @@ -101,6 +102,13 @@ int satasii_init(void) if ((id != 0x0680) && (!(pci_mmio_readl(sii_bar) & (1 << 26)))) msg_pinfo("Warning: Flash seems unconnected.\n"); + msg_pdbg("Using BAR5 access method.\n"); + tmp = pci_read_long(pcidev_dev, 0x40) & (1 << 1); + msg_pdbg("BAR5 Indirect Access is %sabled\n", tmp ? "en" : "dis"); + /* This bit has contradicting definitions in the 3512 datasheet. */ + tmp = pci_read_long(pcidev_dev, 0x88) & (1 << 16); + msg_pdbg("BAR5 Access is %sabled\n", tmp ? "en" : "dis"); + if (register_shutdown(satasii_shutdown, NULL)) return 1;