1 /* 2 * 3 * (C) COPYRIGHT 2012-2014, 2017 ARM Limited. All rights reserved. 4 * 5 * This program is free software and is provided to you under the terms of the 6 * GNU General Public License version 2 as published by the Free Software 7 * Foundation, and any use by you of this program is subject to the terms 8 * of such GNU licence. 9 * 10 * A copy of the licence is included with the program, and can also be obtained 11 * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 12 * Boston, MA 02110-1301, USA. 13 * 14 */ 15 16 17 18 19 20 #ifndef _KBASE_MEM_LOWLEVEL_H 21 #define _KBASE_MEM_LOWLEVEL_H 22 23 #ifndef _KBASE_H_ 24 #error "Don't include this file directly, use mali_kbase.h instead" 25 #endif 26 27 #include <linux/dma-mapping.h> 28 29 /** 30 * @brief Flags for kbase_phy_allocator_pages_alloc 31 */ 32 #define KBASE_PHY_PAGES_FLAG_DEFAULT (0) /** Default allocation flag */ 33 #define KBASE_PHY_PAGES_FLAG_CLEAR (1 << 0) /** Clear the pages after allocation */ 34 #define KBASE_PHY_PAGES_FLAG_POISON (1 << 1) /** Fill the memory with a poison value */ 35 36 #define KBASE_PHY_PAGES_SUPPORTED_FLAGS (KBASE_PHY_PAGES_FLAG_DEFAULT|KBASE_PHY_PAGES_FLAG_CLEAR|KBASE_PHY_PAGES_FLAG_POISON) 37 38 #define KBASE_PHY_PAGES_POISON_VALUE 0xFD /** Value to fill the memory with when KBASE_PHY_PAGES_FLAG_POISON is set */ 39 40 enum kbase_sync_type { 41 KBASE_SYNC_TO_CPU, 42 KBASE_SYNC_TO_DEVICE 43 }; 44 45 #endif /* _KBASE_LOWLEVEL_H */ 46