action_descriptor: skip unsupported erase functions
It turns out that on devices with use Intel Controller Hub of the
Baitrail chipset not all SPI erase commands supported by various flash
chips are allowed to be used.
This patch adds code which filters unsupported erase functions before
action descriptor is created.
BRANCH=none
BUG=b:79492818, chromium:854833
TEST=flashrom invocations erasing exactly 32 kB do not fail any more
on rambi and cyan.
Change-Id: I87eb1b636067bce6bade65985a2d0ddc95e30938
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1111099
Reviewed-by: Simon Glass <sjg@chromium.org>
diff --git a/programmer.h b/programmer.h
index 662ff33..71da8e4 100644
--- a/programmer.h
+++ b/programmer.h
@@ -604,6 +604,12 @@
};
#if CONFIG_INTERNAL == 1
+
+/*
+ * This global variable is used to communicate the type of ICH found on the
+ * device. When running on non-intel platforms default value of
+ * CHIPSET_ICH_UNKNOWN is used.
+*/
enum ich_chipset ich_generation;
extern uint32_t ichspi_bbar;
int ich_init_spi(struct pci_dev *dev, uint32_t base, void *rcrb,