w25q256: Add support for write protect

The Winbond flash chips with size >= 32MB introduce a new block
protect bit in status register 0 and remove the bit that indicates
sector/block configuration.  This breaks the long standing
compatibility of this particular register.

To support write protect on these chips a new status register
format is defined and new functions are provided that use it
correctly.

The w25q256 write protect ranges are also defined and enabled in
the flash chip entry.

BUG=b:122342865
BRANCH=none
TEST=waiting for hardware (will set verified+1 when tested)

Change-Id: I4b1131c2b61f51ced00848476892d6ff2497ed1c
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1403943
Commit-Ready: Lijian Zhao <lijian.zhao@intel.com>
Tested-by: Lijian Zhao <lijian.zhao@intel.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Lijian Zhao <lijian.zhao@intel.com>
3 files changed