summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Tauner <stefan.tauner@alumni.tuwien.ac.at>2011-07-01 00:39:16 +0000
committerStefan Tauner <stefan.tauner@alumni.tuwien.ac.at>2011-07-01 00:39:16 +0000
commitbd649e450c8699b67747d76c81521fc704f105b1 (patch)
tree4815548630d7f9e4f82496fb2a815039973ce439
parente27b2d41841c3b48b168cde6b2ba531e5238414a (diff)
downloadflashrom-bd649e450c8699b67747d76c81521fc704f105b1.tar.gz
flashrom-bd649e450c8699b67747d76c81521fc704f105b1.tar.bz2
flashrom-bd649e450c8699b67747d76c81521fc704f105b1.zip
ichspi.c: add FPB (Flash Partition Boundary) macros and init printing
Corresponding to flashrom svn r1361. Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
-rw-r--r--ichspi.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/ichspi.c b/ichspi.c
index 7e777f16d..f35ea3786 100644
--- a/ichspi.c
+++ b/ichspi.c
@@ -131,6 +131,10 @@
#define ICH9_REG_BBAR 0xA0 /* 32 Bits BIOS Base Address Configuration */
#define BBAR_MASK 0x00ffff00 /* 8-23: Bottom of System Flash */
+#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
@@ -1324,6 +1328,9 @@ int ich_init_spi(struct pci_dev *dev, uint32_t base, void *rcrb,
ichspi_bbar = mmio_readl(ich_spibar + ICH9_REG_BBAR);
msg_pdbg("0xA0: 0x%08x (BBAR)\n",
ichspi_bbar);
+ tmp = mmio_readl(ich_spibar + ICH9_REG_FPB);
+ msg_pdbg("0xD0: 0x%08x (FPB)\n", tmp);
+
ich_init_opcodes();
break;
default: