qseecom: Fix issues with failure to release client handle

There exists scenarios when qseecom_release is called,
the client handle type is incorrect; hence proper cleanup
is not done with regards to unloading app or cleaning up
memory allocated for the device handle.
This change addresses all cleanup issues related to qseecom
client in qseecom_release call by ensuring the handle type is
set correctly and cleanup is done properly based on client type.

Change-Id: I126aa431ce635ae98100b774e3d92b704635d199
Signed-off-by: Hariprasad Dhalinarasimha <hnamgund@codeaurora.org>
(cherry picked from commit f12641d6733009c4cd502d3ba25cb3c5d61ab5e2)

Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
qseecom: Replace kzalloc with ion_alloc

Allocate memory to common lib through kzalloc issues no page errors due to
higher order memory request. So allocate the memory from the heap specially
dedicated to QSEECOM.

Change-Id: Ice4a609d6791ce5adc84b9882231def31674f461
Signed-off-by: AnilKumar Chimata <anilc@codeaurora.org>
Signed-off-by: Zhen Kong <zkong@codeaurora.org>
Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
qseecom: Fix failure to load cmnlib image

Set the physical address field of load_req data struct
correctly using the right ion_phys API. Without this,
secure domain is not able to address/dereference memory
where cmnlib image resides.

Change-Id: I9f75e78227e4eee89fff9ad8b19701ff08e5d90a
Signed-off-by: Mona Hossain <mhossain@codeaurora.org>
Signed-off-by: Zhen Kong <zkong@codeaurora.org>
Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>