Lines Matching refs:cmd

111 	struct qcom_scm_command *cmd;  in alloc_qcom_scm_command()  local
112 size_t len = sizeof(*cmd) + sizeof(struct qcom_scm_response) + cmd_size + in alloc_qcom_scm_command()
116 cmd = kzalloc(PAGE_ALIGN(len), GFP_KERNEL); in alloc_qcom_scm_command()
117 if (cmd) { in alloc_qcom_scm_command()
118 cmd->len = cpu_to_le32(len); in alloc_qcom_scm_command()
120 cmd->buf_offset = cpu_to_le32(offset); in alloc_qcom_scm_command()
121 cmd->resp_hdr_offset = cpu_to_le32(offset + cmd_size); in alloc_qcom_scm_command()
123 return cmd; in alloc_qcom_scm_command()
132 static inline void free_qcom_scm_command(struct qcom_scm_command *cmd) in free_qcom_scm_command() argument
134 kfree(cmd); in free_qcom_scm_command()
144 const struct qcom_scm_command *cmd) in qcom_scm_command_to_response() argument
146 return (void *)cmd + le32_to_cpu(cmd->resp_hdr_offset); in qcom_scm_command_to_response()
155 static inline void *qcom_scm_get_command_buffer(const struct qcom_scm_command *cmd) in qcom_scm_get_command_buffer() argument
157 return (void *)cmd->buf; in qcom_scm_get_command_buffer()
212 static int __qcom_scm_call(const struct qcom_scm_command *cmd) in __qcom_scm_call() argument
215 u32 cmd_addr = virt_to_phys(cmd); in __qcom_scm_call()
221 secure_flush_area(cmd, cmd->len); in __qcom_scm_call()
271 struct qcom_scm_command *cmd; in qcom_scm_call() local
275 cmd = alloc_qcom_scm_command(cmd_len, resp_len); in qcom_scm_call()
276 if (!cmd) in qcom_scm_call()
279 cmd->id = cpu_to_le32((svc_id << 10) | cmd_id); in qcom_scm_call()
281 memcpy(qcom_scm_get_command_buffer(cmd), cmd_buf, cmd_len); in qcom_scm_call()
284 ret = __qcom_scm_call(cmd); in qcom_scm_call()
289 rsp = qcom_scm_command_to_response(cmd); in qcom_scm_call()
302 free_qcom_scm_command(cmd); in qcom_scm_call()
308 #define SCM_ATOMIC(svc, cmd, n) (((((svc) << 10)|((cmd) & 0x3ff)) << 12) | \ argument
322 static s32 qcom_scm_call_atomic1(u32 svc, u32 cmd, u32 arg1) in qcom_scm_call_atomic1() argument
326 register u32 r0 asm("r0") = SCM_ATOMIC(svc, cmd, 1); in qcom_scm_call_atomic1()
389 } cmd; in qcom_scm_set_boot_addr() local
391 cmd.addr = cpu_to_le32(addr); in qcom_scm_set_boot_addr()
392 cmd.flags = cpu_to_le32(flags); in qcom_scm_set_boot_addr()
394 &cmd, sizeof(cmd), NULL, 0); in qcom_scm_set_boot_addr()