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 <[email protected]>
Reviewed-on: https://chromium-review.googlesource.com/1111099
Reviewed-by: Simon Glass <[email protected]>
2 files changed