[flashrom] [PATCH 10/11] add FPB (Flash Partition Boundary) macros and init printing
Stefan Tauner
stefan.tauner at student.tuwien.ac.at
Sat May 28 05:38:47 CEST 2011
Signed-off-by: Stefan Tauner <stefan.tauner at student.tuwien.ac.at>
---
ichspi.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/ichspi.c b/ichspi.c
index c8d8432..5bba0ab 100644
--- a/ichspi.c
+++ b/ichspi.c
@@ -150,6 +150,10 @@
#define VSCC_VCL (0x1 << VSCC_VCL_OFF)
/* 24-31: reserved */
+#define ICH9_REG_FPB 0xD0 /* 32 Bits Flash Partition Boundary */
+#define FPB_FPBA_OFF 0 /* 0-12: Block/Sector Erase Size */
+#define FPB_FPBA (0x1FFF << FPB_FPBA_OFF)
+
// ICH9R SPI commands
#define SPI_OPCODE_TYPE_READ_NO_ADDRESS 0
#define SPI_OPCODE_TYPE_WRITE_NO_ADDRESS 1
@@ -1353,6 +1357,9 @@ int ich_init_spi(struct pci_dev *dev, uint32_t base, void *rcrb,
msg_pdbg("UVSCC: ");
prettyprint_ich9_reg_vscc(tmp);
+ tmp = mmio_readl(ich_spibar + ICH9_REG_FPB);
+ msg_pdbg("0xD0: 0x%08x (FPB)\n", tmp);
+
msg_pdbg("\n");
if (ichspi_desc) {
read_ich_descriptors_from_fdo(ich_spibar);
--
1.7.1
More information about the flashrom
mailing list