OSHW-DEIMOS/SOFTWARE/A64-TERES/sunxi-pack-tools/update_uboot/boot0_v2.h
Dimitar Gamishev d867a2260d more stuff
2017-10-13 14:08:52 +03:00

107 lines
4.0 KiB
C
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*
************************************************************************************************************************
* eGON
* the Embedded GO-ON Bootloader System
*
* Copyright(C), 2006-2008, SoftWinners Microelectronic Co., Ltd.
* All Rights Reserved
*
* File Name : boot0.h
*
* Author : Gary.Wang
*
* Version : 1.1.0
*
* Date : 2009.05.21
*
* Description :
*
* Others : None at present.
*
*
* History :
*
* <Author> <time> <version> <description>
*
* Gary.Wang 2009.05.21 1.1.0 build the file
*
************************************************************************************************************************
*/
#ifndef __boot0_v2_h
#define __boot0_v2_h
#include "egon_def.h"
#include "egon_i.h"
#define UBOOT_BASE 0x4a000000
#define BOOT0_START_BLK_NUM 0
#define BLKS_FOR_BOOT0 2
#define BOOT0_LAST_BLK_NUM ( BOOT0_START_BLK_NUM + BLKS_FOR_BOOT0 - 1 )
#define BOOT0_SPI_NOR_START_ADDR 0 // add for spi nor. by Gary,2009-12-8 11:47:17
#define SPI_NOR_SIZE_FOR_BOOT0 SZ_64K // add for spi nor. by Gary,2009-12-8 11:47:17
#define BOOT0_MAGIC "eGON.BT0"
#define BOOT0_START_PAGE_NUM 0 // add for 1618
#define BOOT0_PAGE_ADVANCE 64 // add for 1618
#define BOOT0_PAGES_MAX_COUNT ( BLKS_FOR_BOOT0 * 256 ) // add for 1618
#define BOOT0_PAGE_SIZE SZ_1K // add for 1618
#define BOOT0_PAGE_SIZE_BIT_WIDTH 10 // add for 1618
#define BOOT0_23_START_PAGE_NUM 0 // add for 1623
#define BOOT0_23_PAGE_ADVANCE 64 // add for 1623
#define BOOT0_23_PAGES_MAX_COUNT ( BOOT0_23_PAGE_ADVANCE * 8 ) // add for 1623
//#define BOOT0_23_PAGE_SIZE SZ_1K // add for 1623
#define BOOT0_23_PAGE_SIZE_BIT_WIDTH 10 // add for 1623
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><E1B9A9>SDMMC<4D><43>ʹ<EFBFBD>ã<EFBFBD><C3A3>̶<EFBFBD><CCB6><EFBFBD><EFBFBD>ɸı<C9B8>
#define BOOT0_SDMMC_START_ADDR 16
typedef struct _boot_sdcard_info_t
{
__s32 card_ctrl_num; //<2F>ܹ<EFBFBD><DCB9>Ŀ<EFBFBD><C4BF>ĸ<EFBFBD><C4B8><EFBFBD>
__s32 boot_offset; //ָ<><D6B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>֮<EFBFBD><D6AE><EFBFBD><EFBFBD><EFBFBD>߼<EFBFBD><DFBC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ĺ<EFBFBD><C4B9><EFBFBD>
__s32 card_no[4]; //<2F><>ǰ<EFBFBD><C7B0><EFBFBD><EFBFBD><EFBFBD>Ŀ<EFBFBD><C4BF><EFBFBD>, 16-31:GPIO<49><4F><EFBFBD>ţ<EFBFBD>0-15:ʵ<>ʿ<EFBFBD><CABF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
__s32 speed_mode[4]; //<2F><><EFBFBD><EFBFBD><EFBFBD>ٶ<EFBFBD>ģʽ<C4A3><CABD>0<EFBFBD><30><EFBFBD><EFBFBD><EFBFBD>٣<EFBFBD><D9A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
__s32 line_sel[4]; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ƣ<EFBFBD>0: 1<>ߣ<EFBFBD><DFA3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>4<EFBFBD><34>
__s32 line_count[4]; //<2F><>ʹ<EFBFBD><CAB9><EFBFBD>ߵĸ<DFB5><C4B8><EFBFBD>
}
boot_sdcard_info_t;
/******************************************************************************/
/* file head of Boot0 */
/******************************************************************************/
typedef struct _boot0_private_head_t
{
__u32 prvt_head_size;
char prvt_head_vsn[4]; // the version of boot0_private_head_t
boot_dram_para_t dram_para; // DRAM patameters for initialising dram. Original values is arbitrary,
__s32 uart_port; // UART<52><54><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
normal_gpio_cfg uart_ctrl[2]; // UART<52><54><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(<28><><EFBFBD>Դ<EFBFBD>ӡ<EFBFBD><D3A1>)<29><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ
__s32 enable_jtag; // 1 : enable, 0 : disable
normal_gpio_cfg jtag_gpio[5]; // <20><><EFBFBD><EFBFBD>JTAG<41><47>ȫ<EFBFBD><C8AB>GPIO<49><4F>Ϣ
normal_gpio_cfg storage_gpio[32]; // <20><EFBFBD>豸 GPIO<49><4F>Ϣ
char storage_data[512 - sizeof(normal_gpio_cfg) * 32]; // <20>û<EFBFBD><C3BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ
//boot_nand_connect_info_t nand_connect_info;
}boot0_private_head_t;
typedef struct _boot0_file_head_t
{
boot_file_head_t boot_head;
boot0_private_head_t prvt_head;
}boot0_file_head_t;
#endif // ifndef __boot0_h
/* end of boot0.h */