summaryrefslogtreecommitdiffstats
path: root/drivers/staging/media/atomisp/pci/atomisp2/css2400
diff options
context:
space:
mode:
authorAlan Cox2017-03-20 15:38:42 +0100
committerGreg Kroah-Hartman2017-03-21 08:04:32 +0100
commit962da22bbadd4dd07677f8b2c55588cf900a8b32 (patch)
treefd0385bcf83eca5c494bc083caa5390729890a3f /drivers/staging/media/atomisp/pci/atomisp2/css2400
parentatomisp: remove aa kernel wrappers (diff)
downloadkernel-qcow2-linux-962da22bbadd4dd07677f8b2c55588cf900a8b32.tar.gz
kernel-qcow2-linux-962da22bbadd4dd07677f8b2c55588cf900a8b32.tar.xz
kernel-qcow2-linux-962da22bbadd4dd07677f8b2c55588cf900a8b32.zip
atomisp: remove the unused debug wrapping from the mmgr layer
We don't need this layer of indirection and the debugging information is not used. With this removed we can then go on to try and remove the abstraction layer entirely. Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/media/atomisp/pci/atomisp2/css2400')
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/memory_access/memory_access.h80
-rw-r--r--drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_memory_access.c30
2 files changed, 20 insertions, 90 deletions
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/memory_access/memory_access.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/memory_access/memory_access.h
index e78d4626a003..54ab3d948d3e 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/memory_access/memory_access.h
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/memory_access/memory_access.h
@@ -1,6 +1,6 @@
/*
* Support for Intel Camera Imaging ISP subsystem.
- * Copyright (c) 2015, Intel Corporation.
+ * Copyright (c) 2015-2017, Intel Corporation.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License,
@@ -74,7 +74,7 @@
* within the allocation referencable from the
* returned pointer/address.
*/
-#define MMGR_ATTRIBUTE_MASK 0x000f
+#define MMGR_ATTRIBUTE_MASK 0x000f
#define MMGR_ATTRIBUTE_CACHED 0x0001
#define MMGR_ATTRIBUTE_CONTIGUOUS 0x0002
#define MMGR_ATTRIBUTE_PAGEALIGN 0x0004
@@ -87,78 +87,43 @@
extern const hrt_vaddress mmgr_NULL;
extern const hrt_vaddress mmgr_EXCEPTION;
-/*! Set the (sub)system virtual memory page table base address
-
- \param base_addr[in] The address where page table 0 is located
-
- \Note: The base_addr is an absolute system address, thus it is not
- relative to the DDR base address
-
- \return none,
- */
-extern void mmgr_set_base_address(
- const sys_address base_addr);
-
/*! Return the address of an allocation in memory
- \param size[in] Size in bytes of the allocation
+ \param size[in] Size in bytes of the allocation
\param caller_func[in] Caller function name
\param caller_line[in] Caller function line number
\return vaddress
*/
-#define mmgr_malloc(__size) mmgr_malloc_ex(__size, __func__, __LINE__)
-extern hrt_vaddress mmgr_malloc_ex(
- const size_t size,
- const char *caller_func,
- int caller_line);
+extern hrt_vaddress mmgr_malloc(const size_t size);
/*! Return the address of a zero initialised allocation in memory
\param N[in] Horizontal dimension of array
\param size[in] Vertical dimension of array Total size is N*size
- \param caller_func[in] Caller function name
- \param caller_line[in] Caller function line number
\return vaddress
*/
-#define mmgr_calloc(__N, __size) mmgr_calloc_ex(__N, __size, __func__, __LINE__)
-extern hrt_vaddress mmgr_calloc_ex(
- const size_t N,
- const size_t size,
- const char *caller_func,
- int caller_line);
+extern hrt_vaddress mmgr_calloc(const size_t N, const size_t size);
/*! Free the memory allocation identified by the address
\param vaddr[in] Address of the allocation
- \param caller_func[in] Caller function name
- \param caller_line[in] Caller function line number
\return vaddress
*/
-#define mmgr_free(__vaddr) mmgr_free_ex(__vaddr, __func__, __LINE__)
-extern void mmgr_free_ex(
- hrt_vaddress vaddr,
- const char *caller_func,
- int caller_line);
+extern void mmgr_free(hrt_vaddress vaddr);
/*! Return the address of an allocation in memory
\param size[in] Size in bytes of the allocation
\param attribute[in] Bit vector specifying the properties
of the allocation including zero initialisation
- \param caller_func[in] Caller function name
- \param caller_line[in] Caller function line number
\return vaddress
*/
-#define mmgr_alloc_attr(__size, __attribute) mmgr_alloc_attr_ex(__size, __attribute, __func__, __LINE__)
-extern hrt_vaddress mmgr_alloc_attr_ex(
- const size_t size,
- const uint16_t attribute,
- const char *caller_func,
- int caller_line);
+
+extern hrt_vaddress mmgr_alloc_attr(const size_t size, const uint16_t attribute);
/*! Return the address of a mapped existing allocation in memory
@@ -187,52 +152,29 @@ extern hrt_vaddress mmgr_mmap(
\param vaddr[in] Address of an allocation
\param size[in] Size in bytes of the area to be cleared
- \param caller_func[in] Caller function name
- \param caller_line[in] Caller function line number
\return none
*/
-#define mmgr_clear(__vaddr, __size) mmgr_clear_ex(__vaddr, __size, __func__, __LINE__)
-extern void mmgr_clear_ex(
- hrt_vaddress vaddr,
- const size_t size,
- const char *caller_func,
- int caller_line);
+extern void mmgr_clear(hrt_vaddress vaddr, const size_t size);
/*! Read an array of bytes from a virtual memory address
\param vaddr[in] Address of an allocation
\param data[out] pointer to the destination array
\param size[in] number of bytes to read
- \param caller_func[in] Caller function name
- \param caller_line[in] Caller function line number
\return none
*/
-#define mmgr_load(__vaddr, __data, __size) mmgr_load_ex(__vaddr, __data, __size, __func__, __LINE__)
-extern void mmgr_load_ex(
- const hrt_vaddress vaddr,
- void *data,
- const size_t size,
- const char *caller_func,
- int caller_line);
+extern void mmgr_load(const hrt_vaddress vaddr, void *data, const size_t size);
/*! Write an array of bytes to device registers or memory in the device
\param vaddr[in] Address of an allocation
\param data[in] pointer to the source array
\param size[in] number of bytes to write
- \param caller_func[in] Caller function name
- \param caller_line[in] Caller function line number
\return none
*/
-#define mmgr_store(__vaddr, __data, __size) mmgr_store_ex(__vaddr, __data, __size, __func__, __LINE__)
-extern void mmgr_store_ex(
- const hrt_vaddress vaddr,
- const void *data,
- const size_t size,
- const char *caller_func,
- int caller_line);
+extern void mmgr_store(const hrt_vaddress vaddr, const void *data, const size_t size);
#endif /* __MEMORY_ACCESS_H_INCLUDED__ */
diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_memory_access.c b/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_memory_access.c
index 8dfb67003a20..a140cec72290 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_memory_access.c
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_memory_access.c
@@ -1,6 +1,6 @@
/*
* Support for Intel Camera Imaging ISP subsystem.
- * Copyright (c) 2015, Intel Corporation.
+ * Copyright (c) 2015-2017, Intel Corporation.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License,
@@ -33,12 +33,12 @@ ia_css_memory_access_init(const struct ia_css_css_mem_env *env)
}
hrt_vaddress
-mmgr_malloc_ex(const size_t size, const char *caller_func, int caller_line)
+mmgr_malloc(const size_t size)
{
- return mmgr_alloc_attr_ex(size, 0, caller_func, caller_line);
+ return mmgr_alloc_attr(size, 0);
}
-hrt_vaddress mmgr_alloc_attr_ex(const size_t size, const uint16_t attrs, const char *caller_func, int caller_line)
+hrt_vaddress mmgr_alloc_attr(const size_t size, const uint16_t attrs)
{
uint32_t my_attrs = 0;
uint16_t masked_attrs = attrs & MMGR_ATTRIBUTE_MASK;
@@ -53,49 +53,37 @@ hrt_vaddress mmgr_alloc_attr_ex(const size_t size, const uint16_t attrs, const c
if (masked_attrs & MMGR_ATTRIBUTE_PAGEALIGN)
my_attrs |= IA_CSS_MEM_ATTR_PAGEALIGN;
- (void)caller_func;
- (void)caller_line;
ptr = my_env.alloc(size, my_attrs);
return ptr;
}
hrt_vaddress
-mmgr_calloc_ex(const size_t N, const size_t size, const char *caller_func, int caller_line)
+mmgr_calloc(const size_t N, const size_t size)
{
- (void)caller_func;
- (void)caller_line;
return mmgr_alloc_attr(size * N, MMGR_ATTRIBUTE_CLEARED);
}
void
-mmgr_free_ex(hrt_vaddress vaddr, const char *caller_func, int caller_line)
+mmgr_free(hrt_vaddress vaddr)
{
- (void)caller_func;
- (void)caller_line;
my_env.free(vaddr);
}
void
-mmgr_clear_ex(hrt_vaddress vaddr, const size_t size, const char *caller_func, int caller_line)
+mmgr_clear(hrt_vaddress vaddr, const size_t size)
{
- (void)caller_func;
- (void)caller_line;
my_env.set(vaddr, 0, size);
}
void
-mmgr_load_ex(const hrt_vaddress vaddr, void *data, const size_t size, const char *caller_func, int caller_line)
+mmgr_load(const hrt_vaddress vaddr, void *data, const size_t size)
{
- (void)caller_func;
- (void)caller_line;
my_env.load(vaddr, data, size);
}
void
-mmgr_store_ex(const hrt_vaddress vaddr, const void *data, const size_t size, const char *caller_func, int caller_line)
+mmgr_store(const hrt_vaddress vaddr, const void *data, const size_t size)
{
- (void)caller_func;
- (void)caller_line;
my_env.store(vaddr, data, size);
}