write_protect: switch GD25Q127/128 from wp_generic to wp_25

The wp_generic routines are returning false errors when locking
regions on this part, so switch to the wp_25 routines until wp_generic
is fixed.  We should ignore the WIP and WEL bits in the status register,
but the generic routine doesn't currently have any way to mask them
off and only look at the WP bits.  The code assumes that the rest of
the bits won't change between reading the status register, writing it,
and reading it a second time.  Unfortunately, that's incorrect in this
case.

BUG=b:37404697
BRANCH=factory-glados-7828.B
TEST=Lock top and bottom half and quarter sections, verify that they
lock correctly and can't be written to.  Verify that flashrom does
not return an error when locking these regions.

Change-Id: I09e3db0bf00a0cbc7004f3b3ebba13a2e5b0f547
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://chromium-review.googlesource.com/502567
Commit-Ready: Martin Roth <martinroth@chromium.org>
Tested-by: Martin Roth <martinroth@chromium.org>
Reviewed-by: Patrick Georgi <pgeorgi@chromium.org>
(cherry picked from commit 95785bd709ae6786fd4ccfc4ae4a67a373680368)
Reviewed-on: https://chromium-review.googlesource.com/520148
Reviewed-by: Simon Glass <sjg@chromium.org>
Commit-Queue: Martin Roth <martinroth@chromium.org>
Trybot-Ready: Martin Roth <martinroth@chromium.org>
1 file changed