59 lines
		
	
	
		
			2.0 KiB
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			59 lines
		
	
	
		
			2.0 KiB
		
	
	
	
		
			C
		
	
	
	
	
	
| /****************************************************************************
 | |
| 
 | |
| Copyright(c) 2019 by Aerospace C.Power (Chongqing) Microelectronics. ALL RIGHTS RESERVED.
 | |
| 
 | |
| This Information is proprietary to Aerospace C.Power (Chongqing) Microelectronics and MAY NOT
 | |
| be copied by any method or incorporated into another program without
 | |
| the express written consent of Aerospace C.Power. This Information or any portion
 | |
| thereof remains the property of Aerospace C.Power. The Information contained herein
 | |
| is believed to be accurate and Aerospace C.Power assumes no responsibility or
 | |
| liability for its use in any way and conveys no license or title under
 | |
| any patent or copyright and makes no representation or warranty that this
 | |
| Information is free from patent or copyright infringement.
 | |
| 
 | |
| ****************************************************************************/
 | |
| 
 | |
| #ifndef RAM_HW_H
 | |
| #define RAM_HW_H
 | |
| 
 | |
| #include "apb.h"
 | |
| 
 | |
| #define RAM_SYSCLK_SET_AS_150M() \
 | |
| do {\
 | |
|     apb_enable_ana_lmtcur(false);\
 | |
|     clk_core_freq_set(CPU_FREQ_150M);\
 | |
| } while(0)
 | |
| 
 | |
| #define RAM_CACHE_INIT() \
 | |
| do {\
 | |
|     ahb_cache_disable(); \
 | |
|     ahb_set_cache_buffer_mode(); \
 | |
|     ahb_cache_enable(); \
 | |
|     ahb_cache_fill_valid_space(); \
 | |
| } while (0)
 | |
| 
 | |
| #define RAM_EFUSE_DUMP()        ramEfuseDump(0, 0xFC)
 | |
| 
 | |
| #define RAM_IMG_OEM_TYPE        imgOEM
 | |
| #define RAM_DEVICE_TYPE         devKunlun
 | |
| #define RAM_CHIP_TYPE           1 /* KL1 */
 | |
| #define HASH_IV_BASE            (0x140+EFUSE_DIG_BASEADDR)
 | |
| #define FLASH_RUN_ADDR_CHECK(addr)      0
 | |
| 
 | |
| #define REG_SFC_CFG0            (SFC_RF_BASEADDR + CFG_SFC_CFG0_ADDR)
 | |
| #define SFC_CRYPT_OFFSET        SFC_CRYPT_MODE_MASK
 | |
| 
 | |
| /* 1:used for hi-lo systems and haixing die burning; 0:others burning.
 | |
| 1.when chip_id=0x211 or 0x221, and fw versin not >= 11.3.9.9,
 | |
| replace sp.bin by built-in sp.bin of ram.bin.
 | |
| 2.keep the output string unchanged between xmodem transfer complete and burning-
 | |
| result, for hi-lo systems find burn result string by absolute offset address.
 | |
| */
 | |
| #define RAM_HELUO_HX_PROGRAM_VERSION (0)
 | |
| 
 | |
| #if (RAM_HELUO_HX_PROGRAM_VERSION == 1)
 | |
| extern uint8_t sp_bin[6496];
 | |
| #endif
 | |
| 
 | |
| #endif //RAM_HW_H
 |