Refine granularity handling in preparation of AT45DB series support

This is a backport of the upstream `commit 02437458` with some
minor additions to align more closely with master. Includes,
`commit c8305e` - Add support for 128 bytes write granularity.

BUG=chromium:478356
BRANCH=none
TEST=still builds

Change-Id: I8f7b5899a8ea2c75174de46e95d935d1bf4ab934
Signed-off-by: Edward O'Callaghan <quasisec@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1484924
Reviewed-by: Stefan Reinauer <reinauer@chromium.org>
2 files changed