Implement status register read/write callbacks in flash struct

This allows us to add custom handlers which can be useful when
working with "opaque" programmers and chips that do not follow the
usual procedure for reading/writing the status register.

W25R- writeprotect code is greatly simplified as an immediate result.

BUG=chrome-os-partner:49474
BRANCH=none
TEST=flashrom -p host --wp-enable
flashrom -p host --wp-disable
flashrom -p host --wp-status
flashrom -p host --wp-list
flashrom -p host --wp-range

Change-Id: I2bffb713e8d78b15016c4d7ccf72f3f6030d3df4
Signed-off-by: Ramya Vijaykumar <ramya.vijaykumar@intel.com>
Signed-off-by: David Hendricks <dhendrix@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/329025
12 files changed