{
struct sep_work_struct *sep_work = container_of(work,
struct sep_work_struct, work);
+
if (sep_work != NULL) {
(sep_work->callback)(sep_work->data);
kfree(sep_work);
static u32 sep_sg_nents(struct scatterlist *sg)
{
u32 ct1 = 0;
+
while (sg) {
ct1 += 1;
sg = sg_next(sg);
static u32 sep_start_msg(struct this_task_ctx *ta_ctx)
{
u32 *word_ptr;
+
ta_ctx->msg_len_words = 2;
ta_ctx->msgptr = ta_ctx->msg;
memset(ta_ctx->msg, 0, SEP_DRIVER_MESSAGE_SHARED_AREA_SIZE_IN_BYTES);
{
u32 *word_ptr;
void *void_ptr;
+
void_ptr = ta_ctx->msgptr + *msg_offset;
word_ptr = (u32 *)void_ptr;
memcpy(void_ptr, in_addr, size);
/* Do we need to manipulate endian? */
if (byte_array) {
u32 i;
+
for (i = 0; i < ((size + 3) / 4); i += 1)
*(word_ptr + i) = CHG_ENDIAN(*(word_ptr + i));
}
{
u32 *word_ptr;
void *void_ptr;
+
void_ptr = ta_ctx->msgptr + *msg_offset;
word_ptr = (u32 *)void_ptr;
/* Do we need to manipulate endian? */
if (byte_array) {
u32 i;
+
for (i = 0; i < ((size + 3) / 4); i += 1)
*(word_ptr + i) = CHG_ENDIAN(*(word_ptr + i));
}
void *dst, u32 len)
{
u32 max_length = ((len + 3) / sizeof(u32)) * sizeof(u32);
+
sep_read_msg(ta_ctx, dst, len, max_length, msg_offset, 0);
}
void *src, u32 len)
{
u32 max_length = ((len + 3) / sizeof(u32)) * sizeof(u32);
+
sep_write_msg(ta_ctx, src, len, max_length, msg_offset, 0);
}
int sep_crypto_setup(void)
{
int err, i, j, k;
+
tasklet_init(&sep_dev->finish_tasklet, sep_finish,
(unsigned long)sep_dev);