#ifndef __FC_TIMA_HASH_COPY_H__
#define __FC_TIMA_HASH_COPY_H__


/* Special Physical address for TIMA */
#if defined(EXYNOS9820) || defined(EXYNOS9830) || defined(EXYNOS9630) || defined(EXYNOS3830) ||\
	defined(EXYNOS2100) || defined(S5E9925) || defined(S5E8825)
#define TB_TIMA_BOOT_HASH_NUM	8
#elif defined(EXYNOS7570) || defined(EXYNOS7885) || defined(EXYNOS7870) || defined(EXYNOS9610) ||\
	defined(EXYNOS7904) || defined(EXYNOS9110) || defined(EXYNOS9810)
#define TB_TIMA_BOOT_HASH_NUM	6 /* BL1, BL2, SecureOS, S-boot, Kernel, CM */
#else
#define SRAM_HASH_TABLE_PA              ((uint32_t)0x02103800)	/* HASH table in iRAM */ 
#define TB_TIMA_BOOT_HASH_NUM	5 /* preloader, lk, tee, atf, kernel */
#endif

#if defined(MT6737T)
#define DRAM_HASH_TABLE_PA              ((uint32_t)0x9FF00000)	/* HASH table in DRAM */
#elif defined(MT6757)
#define DRAM_HASH_TABLE_PA              ((uint32_t)0x7FBC0000)	/* HASH table in DRAM */
#elif defined(SMDK7420)
#define DRAM_HASH_TABLE_PA              ((uint32_t)0xFE800000)	/* HASH table in DRAM */
#elif defined(EXYNOS7570)
#define DRAM_HASH_TABLE_PA              ((uint32_t)0x7E800000)	/* HASH table in DRAM */
#define SECURE_MEM_BOUNDARY             ((uint32_t)0x7FFFFFFF)
#elif defined(EXYNOS7885)
#define DRAM_HASH_TABLE_PA              ((uint32_t)0xBE000000)	/* HASH table in DRAM */
#define SECURE_MEM_BOUNDARY             ((uint32_t)0xBFFFFFFF)
#elif defined(EXYNOS7870)
#define DRAM_HASH_TABLE_PA              ((uint32_t)0x7E400000)	/* HASH table in DRAM */
#define SECURE_MEM_BOUNDARY             ((uint32_t)0x7FFFFFFF)
#elif defined(EXYNOS9610) || defined(EXYNOS9820)
#define DRAM_HASH_TABLE_PA              ((uint32_t)0xBAB00000)	/* HASH table in DRAM */
#define SECURE_MEM_BOUNDARY             ((uint32_t)0xBFFFFFFF)
#elif defined(EXYNOS7904)
#if defined(EXYNOS7904_80MB)
#define DRAM_HASH_TABLE_PA              ((uint32_t)0xBA600000)	/* HASH table in DRAM */
#elif defined(EXYNOS7904_28MB)
#define DRAM_HASH_TABLE_PA              ((uint32_t)0xBDA00000)	/* HASH table in DRAM */
#else
#define DRAM_HASH_TABLE_PA              ((uint32_t)0xBBC00000)	/* HASH table in DRAM */
#endif
#define SECURE_MEM_BOUNDARY             ((uint32_t)0xBFFFFFFF)
#elif defined(EXYNOS9830) || defined(EXYNOS9630) ||\
	defined(EXYNOS3830) || defined(EXYNOS2100) ||\
	defined(S5E9925) || defined(S5E8825)
#define DRAM_HASH_TABLE_PA              ((uint32_t)0xBF600000)	/* HASH table in DRAM */
#define SECURE_MEM_BOUNDARY             ((uint32_t)0xBFFFFFFF)
#elif defined(EXYNOS9110)
#define DRAM_HASH_TABLE_PA              ((uint32_t)0x9F100000)	/* HASH table in DRAM */
#define SECURE_MEM_BOUNDARY             ((uint32_t)0x9FFFFFFF)
#elif defined(EXYNOS9810)
#define DRAM_HASH_TABLE_PA              ((uint32_t)0xBC800000)	/* HASH table in DRAM */
#define SECURE_MEM_BOUNDARY             ((uint32_t)0xBFFFFFFF)
#endif

/* For Trusted Boot */
#define TB_TIMA_MAGIC	"TIMA 3.0"
#define TB_TIMA_MAGIC_LEN	8
#define TB_TIMA_BOOT_HASH_STORED	4 /* already stored preloader, lk, tee, atf */

#define TB_DEBUG	0

#endif /* __FC_TIMA_HASH_COPY_H__ */
