fw_update: fw upgrade memory handle
authorLi, Ning <ning.li@intel.com>
Wed, 6 Jun 2012 09:47:07 +0000 (17:47 +0800)
committerbuildbot <buildbot@intel.com>
Thu, 14 Jun 2012 14:06:36 +0000 (07:06 -0700)
commit5e318d8bfbf260a3e83ee75c1ed0156350c65d80
tree031162a265052e44987306bccc0b43fa093aabfa
parentb9c11b5c9eef9462e586801fce038f9bb74cf4d7
fw_update: fw upgrade memory handle

BZ: 40065

There are some potential issues in fw_update driver, such as haven't
set pointer to NULL after freed and not having cancel IFWI upgrade
mechanism.
Add an early_param "alloc_fota_mem_early". If it's set, the 4M fota
memory will be allocated during driver init. At the same time, the
memory allocation at binary file writing is still kept as before.
A new sysfs interface is created for user space to cancel fw update by:
  echo 1 > /sys/devices/ipc/intel_fw_update.0/fw_info/cancel_update

Change-Id: I149c88c56ea77adfe004161f20167b8408d7e983
Signed-off-by: Li, Ning <ning.li@intel.com>
Reviewed-on: http://android.intel.com:8080/52573
Reviewed-by: Du, Alek <alek.du@intel.com>
Reviewed-by: Puech, Yann <yann.puech@intel.com>
Reviewed-by: Yang, Bin <bin.yang@intel.com>
Tested-by: Tang, HaifengX <haifengx.tang@intel.com>
Reviewed-by: buildbot <buildbot@intel.com>
Tested-by: buildbot <buildbot@intel.com>
drivers/platform/x86/intel_scu_fw_update.c