UPSTREAM mmc_utils: add ffu support

Adding support for field firmware update over multiple command ioctl.
As multiple command ioctl is supported only from kernel 4.4, this patch
should be used against kernel 4.4 and above.

Known issues:
- There is no support for Multiple Block write commands (CMD25) in existing
  IOCTL implementation
- In case MODE_OPERATION_CODES field is not supported by the device
  manual reset of the device/platform is required.
  The reset issue discussed in another email thread - " [RFC 0/6] mmc:
  Field Firmware Update"

  mmc.c : rename the old ffu command old_ffu.

TEST=On 4.4 eve, check we can upgrade eMMC firmware.

Signed-off-by: Yaniv Agman <>
Signed-off-by: Avi Shchislowski <>
Signed-off-by: Chris Ball <>
(cherry picked from commit 89cd01ed865ac5a2ef3ee86070257d6722900a49)
Signed-off-by: Gwendal Grignou <>

Change-Id: Ibd91d8a08b3104341e007f81fb27ca7d1783205a
Commit-Ready: Gwendal Grignou <>
Tested-by: Gwendal Grignou <>
Reviewed-by: Julius Werner <>
4 files changed