gpu: ion: Use standard cache routines

Instead of using custom routines for cache operations use the
standard operations for cache flush, cache clean, and cache
invalidate. In addition only call outer cache routines if
outer cache is available.

Change-Id: Idb51bf7348fd526ebdea1e6ff2e366b8a3b4de33
Signed-off-by: Olav Haugan <ohaugan@codeaurora.org>
This commit is contained in:
Olav Haugan
2012-05-30 17:32:37 -07:00
committed by Stephen Boyd
parent 4f54589485
commit 1beef4be65
6 changed files with 113 additions and 67 deletions

View File

@@ -147,6 +147,7 @@ struct ion_buffer;
* @base: base address of heap in physical memory if applicable
* @size: size of the heap in bytes if applicable
* @memory_type:Memory type used for the heap
* @has_outer_cache: set to 1 if outer cache is used, 0 otherwise.
* @extra_data: Extra data specific to each heap type
*/
struct ion_platform_heap {
@@ -156,6 +157,7 @@ struct ion_platform_heap {
ion_phys_addr_t base;
size_t size;
enum ion_memory_types memory_type;
unsigned int has_outer_cache;
void *extra_data;
};
@@ -227,6 +229,7 @@ struct ion_co_heap_pdata {
/**
* struct ion_platform_data - array of platform heaps passed from board file
* @has_outer_cache: set to 1 if outer cache is used, 0 otherwise.
* @nr: number of structures in the array
* @request_region: function to be called when the number of allocations goes
* from 0 -> 1
@@ -238,6 +241,7 @@ struct ion_co_heap_pdata {
* Provided by the board file in the form of platform data to a platform device.
*/
struct ion_platform_data {
unsigned int has_outer_cache;
int nr;
int (*request_region)(void *);
int (*release_region)(void *);