#ifndef _DRV_SPI_FLASHALLOC_EXTERNAL_H #define _DRV_SPI_FLASHALLOC_EXTERNAL_H #ifndef _CCOPTS_ #include #endif #include "drv_spi_flash_module_index.h" /* Nor-Flash base address */ #define SPI_CODEFLASH_BASEADDR 0xBC000000 #define SPI_DATAFLASH_BASEADDR 0xBF000000 #if (CONFIG_CODE_FLASH_SIZE <= 1024) #define SPI_IS_WITH_NANDFLASH 1 #else #define SPI_IS_WITH_NANDFLASH 0 #endif #if 1 #define TAG_LENGTH 12 #define FLASH_HEAD_SIZE sizeof(mtab_head_s) typedef struct _mtab_head_s { char sys_tag[TAG_LENGTH]; /* ascii */ unsigned int size; #ifdef CONFIG_SUPPORT_FLASH_MODULE_CRC_CHECK unsigned int data_size; unsigned int crc; unsigned int reserve1; unsigned int reserve2; #endif }mtab_head_s; #define SPI_8051_CODE_ADDR (0x10000) #define SPI_OPTION_DATA_ADDR (SPI_8051_CODE_ADDR+CONFIG_8051_CODE_SIZE) #define SPI_OPTION_DATA_SIZE 480 #define SPI_OUIBOOTINFO_ADDR (SPI_OPTION_DATA_ADDR+SPI_OPTION_DATA_SIZE) #if (defined(CONFIG_SPI_SFS) || defined(SPI_IS_WITH_NANDFLASH)) //reserve 0x01~0x0f #define SPI_ADCDATA_FLASHID (0x01) //12k #define SPI_KMFSHARE_FLASHID (0x02) //1k #define SPI_CIDATA_FLASHADDR (0x03) //need to remove #define SPI_RRTTABLE_FLASHADDR (0x04) //need to remove #define SPI_BOOTSHARE_FLASHID (0x05) //customer used //for nvm data #define SPI_NVMDATA_FLASHID (0x10) #endif #if 0 /* please remove these definitions , 2013.05.13 Gaia */ #if ( SPI_IS_WITH_NANDFLASH ) #define SPI_MENUDEFAULT_FLASHSIZE (11*1024) #else #define SPI_MENUDEFAULT_FLASHSIZE (3*1024) #define SPI_PICTUREDEFAULT_FLASHSIZE (3*1024) #define SPI_AUDIODEFAULT_FLASHSIZE (2*1024) #endif #define SPI_TX_HDCPKEY_SHADOWADDR 0x9A069800 #if ( SPI_IS_WITH_NANDFLASH ) #define SPI_NAND_DPTT_SHADOWADDR 0x9A2F0000 #endif #define SPI_MAC_SHADOWADDR 0x9A069C00 #define SPI_KMFSHARE_SHADOWADDR 0x9A076000 #define SPI_KERNEL_FLASHADDR (0xbc120000) #define SPI_KERNELPART1END_FLASHADDR (0xbc000000+(CONFIG_CODE_FLASH_SIZE*1024)) #define SPI_KERNELPART2_FLASHADDR (0x0) /* usbupdate.h */ #define SPI_KERNELPART2END_FLASHADDR (0x0) /* usbupdate.h */ #define SPI_KERNELPART1_FLASHSIZE (5000*1024)//(4244*1024) #define SPI_KERNELPART2_FLASHSIZE (0) #define SPI_KERNEL_FLASHSIZE (SPI_KERNELPART1_FLASHSIZE+SPI_KERNELPART2_FLASHSIZE) // #define SPI_LOGO_SHADOWSIZE (320*1024) #define SPI_RRTTABLE2_FLASHSIZE (0*1024) #define SPI_LOGO2_FLASHSIZE (0*1024) //#define SPI_RRTLOCK_FLASHSIZE (4*1024) #define SPI_RRTTABLE_FLASHSIZE (288*1024) #endif #endif #endif // _DRV_SPI_FLASHALLOC_H