2 * Support for Intel Camera Imaging ISP subsystem.
3 * Copyright (c) 2015, Intel Corporation.
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms and conditions of the GNU General Public License,
7 * version 2, as published by the Free Software Foundation.
9 * This program is distributed in the hope it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
15 #ifndef __CPU_MEM_SUPPORT_H_INCLUDED__
16 #define __CPU_MEM_SUPPORT_H_INCLUDED__
18 #if defined (__KERNEL__)
19 #include <linux/string.h> /* memset */
21 #include <string.h> /* memset */
24 #include "sh_css_internal.h" /* sh_css_malloc and sh_css_free */
27 ia_css_cpu_mem_alloc(unsigned int size)
29 return sh_css_malloc(size);
33 ia_css_cpu_mem_copy(void* dst, const void* src, unsigned int size)
38 return memcpy(dst, src, size);
42 ia_css_cpu_mem_set_zero(void* dst, unsigned int size)
47 return memset(dst, 0, size);
51 ia_css_cpu_mem_free(void* ptr)
59 #endif /* __CPU_MEM_SUPPORT_H_INCLUDED__ */