| /* |
| * (C) Copyright 2012 Marvell International Ltd. |
| * All Rights Reserved |
| * |
| * MARVELL CONFIDENTIAL |
| * Copyright 2004 ~ 2012 Marvell International Ltd All Rights Reserved. |
| * The source code contained or described herein and all documents related to |
| * the source code ("Material") are owned by Marvell International Ltd or its |
| * suppliers or licensors. Title to the Material remains with Marvell |
| * or its suppliers and licensors. The Material contains trade secrets and |
| * proprietary and confidential information of Marvell or its suppliers and |
| * licensors. The Material is protected by worldwide copyright and trade secret |
| * laws and treaty provisions. No part of the Material may be used, copied, |
| * reproduced, modified, published, uploaded, posted, transmitted, distributed, |
| * or disclosed in any way without Marvell's prior express written permission. |
| * |
| * No license under any patent, copyright, trade secret or other intellectual |
| * property right is granted to or conferred upon you by disclosure or delivery |
| * of the Materials, either expressly, by implication, inducement, estoppel or |
| * otherwise. Any license under such intellectual property rights must be |
| * express and approved by Marvell in writing. |
| * |
| * @file pxa_tzlc_main.c |
| * @author Jidong Sun |
| * @date 30/01/2013 (dd/mm/yy) |
| * @brief tzlc functions' implementation. |
| * |
| */ |
| |
| #include <common.h> |
| #include "pxa_tzlc_priv.h" |
| |
| tzlc_handle pxa_tzlc_create_handle(void) |
| { |
| /* reserve for futher use */ |
| return (tzlc_handle)1; |
| } |
| |
| void pxa_tzlc_destroy_handle(tzlc_handle handle) |
| { |
| /* reserve for futher use */ |
| return; |
| } |
| |
| int32_t pxa_tzlc_cmd_op(tzlc_handle handle, tzlc_cmd_desc *cmd) |
| { |
| tzlc_req_param param; |
| int32_t ret; |
| |
| if (NULL == cmd || NULL == handle) |
| return -1; |
| |
| if ((cmd->op & TZLC_CMD_MASK) >= |
| ((cmd->op & PLATFORM_SPEC_TZLC_FLAG) ? |
| PLATFORM_SPEC_TZLC_CMD_END : TZLC_CMD_END)) |
| return -1; |
| |
| param.type = TZLC_TYPE_INTEGRATED_CMD; |
| param.cmd = *cmd; |
| |
| ret = __tzlc_send_req(¶m); |
| *cmd = param.cmd; |
| |
| return ret; |
| } |