cros_ec: use max write size from ec

The programmer's max_data_write is configured to the max outsize
read from ec protoinfo command. Thus this needs to be considered
with the ideal_write_size to decide the max payload size for
cros_ec_write callback.

BUG=chrome-os-partner:33035
BRANCH=none
TEST=
run 'flashrom -p ec -w /tmp/ec.bin' on kitty, reboot successfully.
run 'flashrom -p ec -r /tmp/ec-read.bin', check correctly.

Change-Id: I8c227b7016ae55f5718d03cb636b459cb7e3b02f
Reviewed-on: https://chromium-review.googlesource.com/225598
Tested-by: Ken Chang <kenc@nvidia.com>
Tested-by: Titan Lee <titanlee@nvidia.com>
Reviewed-by: David Hendricks <dhendrix@chromium.org>
Commit-Queue: Ken Chang <kenc@nvidia.com>
1 file changed