mirror of
git://projects.qi-hardware.com/xburst-tools.git
synced 2024-12-23 17:51:08 +02:00
change the sturct name
This commit is contained in:
parent
e7a23fd7b6
commit
132b7afd9c
@ -38,10 +38,10 @@ extern int com_argc;
|
||||
extern char com_argv[MAX_ARGC][MAX_COMMAND_LENGTH];
|
||||
|
||||
struct ingenic_dev ingenic_dev;
|
||||
struct hand_t hand;
|
||||
struct hand hand;
|
||||
|
||||
static struct nand_in_t nand_in;
|
||||
static struct nand_out_t nand_out;
|
||||
static struct nand_in nand_in;
|
||||
static struct nand_out nand_out;
|
||||
unsigned int total_size;
|
||||
unsigned char code_buf[4 * 512 * 1024];
|
||||
unsigned char check_buf[4 * 512 * 1024];
|
||||
@ -100,7 +100,7 @@ static int load_file(struct ingenic_dev *ingenic_dev, const char *file_path)
|
||||
|
||||
/* write args to code */
|
||||
memcpy(ingenic_dev->file_buff + 8, &hand.fw_args,
|
||||
sizeof(struct fw_args_t));
|
||||
sizeof(struct fw_args));
|
||||
|
||||
res = 1;
|
||||
|
||||
@ -214,7 +214,7 @@ int error_check(unsigned char *org,unsigned char * obj,unsigned int size)
|
||||
return 1;
|
||||
}
|
||||
|
||||
int nand_markbad(struct nand_in_t *nand_in)
|
||||
int nand_markbad(struct nand_in *nand_in)
|
||||
{
|
||||
if (usb_get_ingenic_cpu(&ingenic_dev) < 3) {
|
||||
printf("\n Device unboot! Boot it first!");
|
||||
@ -231,8 +231,8 @@ int nand_markbad(struct nand_in_t *nand_in)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int nand_program_check(struct nand_in_t *nand_in,
|
||||
struct nand_out_t *nand_out,
|
||||
int nand_program_check(struct nand_in *nand_in,
|
||||
struct nand_out *nand_out,
|
||||
unsigned int *start_page)
|
||||
{
|
||||
unsigned int i,page_num,cur_page;
|
||||
@ -340,7 +340,7 @@ int nand_program_check(struct nand_in_t *nand_in,
|
||||
} else {
|
||||
/* (nand_out->status)[i] = 0; */
|
||||
printf(" fail!");
|
||||
struct nand_in_t bad;
|
||||
struct nand_in bad;
|
||||
cur_page = (ret[3] << 24) |
|
||||
(ret[2] << 16) |
|
||||
(ret[1] << 8) |
|
||||
@ -356,7 +356,7 @@ int nand_program_check(struct nand_in_t *nand_in,
|
||||
return 0;
|
||||
}
|
||||
|
||||
int nand_erase(struct nand_in_t *nand_in)
|
||||
int nand_erase(struct nand_in *nand_in)
|
||||
{
|
||||
unsigned int start_blk, blk_num, end_block;
|
||||
int i;
|
||||
@ -408,8 +408,8 @@ int nand_erase(struct nand_in_t *nand_in)
|
||||
return 1;
|
||||
}
|
||||
|
||||
int nand_program_file(struct nand_in_t *nand_in,
|
||||
struct nand_out_t *nand_out,
|
||||
int nand_program_file(struct nand_in *nand_in,
|
||||
struct nand_out *nand_out,
|
||||
char *fname)
|
||||
{
|
||||
|
||||
@ -417,8 +417,8 @@ int nand_program_file(struct nand_in_t *nand_in,
|
||||
unsigned int start_page = 0, page_num, code_len, offset, transfer_size;
|
||||
FILE *fp;
|
||||
unsigned char status_buf[32];
|
||||
struct nand_in_t n_in;
|
||||
struct nand_out_t n_out;
|
||||
struct nand_in n_in;
|
||||
struct nand_out n_out;
|
||||
|
||||
#ifdef CONFIG_NAND_OUT
|
||||
/* nand_out->status = (unsigned char *)malloc(nand_in->max_chip * sizeof(unsigned char)); */
|
||||
@ -527,8 +527,8 @@ int nand_program_file(struct nand_in_t *nand_in,
|
||||
return 1;
|
||||
}
|
||||
|
||||
int nand_program_file_planes(struct nand_in_t *nand_in,
|
||||
struct nand_out_t *nand_out,
|
||||
int nand_program_file_planes(struct nand_in *nand_in,
|
||||
struct nand_out *nand_out,
|
||||
char *fname)
|
||||
{
|
||||
printf(" \n not implement yet !");
|
||||
|
@ -49,7 +49,7 @@ static volatile unsigned char *cmdport = (volatile unsigned char *)0xb8008000;
|
||||
|
||||
static int bus = 8, row = 2, pagesize = 2048, oobsize = 64, ppb = 128;
|
||||
static int bad_block_pos,bad_block_page,force_erase,ecc_pos,wp_pin;
|
||||
extern struct hand_t Hand;
|
||||
extern struct hand Hand;
|
||||
//static u8 data_buf[2048] = {0};
|
||||
static u8 oob_buf[256] = {0};
|
||||
extern u16 handshake_PKT[4];
|
||||
|
@ -39,7 +39,7 @@ static int oobecc = 0; /* Whether the oob data of the binary contains
|
||||
static int bad_block_page = 127; /* Specify the page number of badblock flag inside a block */
|
||||
static u32 bad_block_pos = 0; /* Specify the badblock flag offset inside the oob */
|
||||
static u8 oob_buf[256] = {0};
|
||||
extern struct hand_t Hand;
|
||||
extern struct hand Hand;
|
||||
extern u16 handshake_PKT[4];
|
||||
|
||||
static inline void __nand_sync(void)
|
||||
|
@ -22,7 +22,7 @@ u32 (*nand_mark_bad) (int bad);
|
||||
void (*nand_enable) (unsigned int csn);
|
||||
void (*nand_disable) (unsigned int csn);
|
||||
|
||||
struct hand_t Hand,*Hand_p;
|
||||
struct hand Hand,*Hand_p;
|
||||
extern u32 Bulk_out_buf[BULK_OUT_BUF_SIZE];
|
||||
extern u32 Bulk_in_buf[BULK_IN_BUF_SIZE];
|
||||
extern u16 handshake_PKT[4];
|
||||
@ -48,9 +48,9 @@ void dump_data(unsigned int *p, int size)
|
||||
|
||||
void config_hand()
|
||||
{
|
||||
struct hand_t *hand_p;
|
||||
hand_p=(struct hand_t *)Bulk_out_buf;
|
||||
memcpy(&Hand, (unsigned char *)Bulk_out_buf, sizeof(struct hand_t));
|
||||
struct hand *hand_p;
|
||||
hand_p=(struct hand *)Bulk_out_buf;
|
||||
memcpy(&Hand, (unsigned char *)Bulk_out_buf, sizeof(struct hand));
|
||||
|
||||
#if 0
|
||||
Hand.nand_bw=hand_p->nand_bw;
|
||||
|
@ -25,7 +25,7 @@
|
||||
|
||||
extern unsigned int total_size;
|
||||
|
||||
int hand_init_def(struct hand_t *hand)
|
||||
int hand_init_def(struct hand *hand)
|
||||
{
|
||||
/* nand flash info */
|
||||
/* hand.nand_start=0; */ /* important !!!! */
|
||||
@ -55,7 +55,7 @@ int hand_init_def(struct hand_t *hand)
|
||||
return 1;
|
||||
}
|
||||
|
||||
int check_dump_cfg(struct hand_t *hand)
|
||||
int check_dump_cfg(struct hand *hand)
|
||||
{
|
||||
printf("\n Now checking whether all configure args valid: ");
|
||||
/* check PLL */
|
||||
@ -131,7 +131,7 @@ int check_dump_cfg(struct hand_t *hand)
|
||||
return 1;
|
||||
}
|
||||
|
||||
int parse_configure(struct hand_t *hand, char * file_path)
|
||||
int parse_configure(struct hand *hand, char * file_path)
|
||||
{
|
||||
hand_init_def(hand);
|
||||
|
||||
|
@ -26,8 +26,8 @@
|
||||
|
||||
#define CONFIG_FILE_PATH "usb_boot.cfg"
|
||||
|
||||
int hand_init_def(struct hand_t *hand);
|
||||
int check_dump_cfg(struct hand_t *hand);
|
||||
int parse_configure(struct hand_t *hand, char * file_path);
|
||||
int hand_init_def(struct hand *hand);
|
||||
int check_dump_cfg(struct hand *hand);
|
||||
int parse_configure(struct hand *hand, char * file_path);
|
||||
|
||||
#endif /*__INGENIC_CFG_H__ */
|
||||
|
@ -29,7 +29,7 @@
|
||||
#include "ingenic_cfg.h"
|
||||
|
||||
extern struct ingenic_dev ingenic_dev;
|
||||
extern struct hand_t hand;
|
||||
extern struct hand hand;
|
||||
|
||||
static void help(void)
|
||||
{
|
||||
|
@ -92,7 +92,7 @@ enum DATA_STRUCTURE_OB {
|
||||
DS_hand
|
||||
};
|
||||
|
||||
struct fw_args_t {
|
||||
struct fw_args {
|
||||
/* CPU ID */
|
||||
unsigned int cpu_id;
|
||||
|
||||
@ -122,7 +122,7 @@ struct fw_args_t {
|
||||
/* unsigned char align2; */
|
||||
} __attribute__((packed));
|
||||
|
||||
struct hand_t {
|
||||
struct hand {
|
||||
|
||||
/* nand flash info */
|
||||
int pt; /* cpu type */
|
||||
@ -141,10 +141,10 @@ struct hand_t {
|
||||
unsigned int nand_wppin;
|
||||
unsigned int nand_bpc; /* block number per chip */
|
||||
|
||||
struct fw_args_t fw_args;
|
||||
struct fw_args fw_args;
|
||||
} __attribute__((packed));
|
||||
|
||||
struct nand_in_t {
|
||||
struct nand_in {
|
||||
unsigned char dev;
|
||||
unsigned char max_chip;
|
||||
unsigned char *buf;
|
||||
@ -156,11 +156,11 @@ struct nand_in_t {
|
||||
int (* check) (unsigned char *,unsigned char *,unsigned int);
|
||||
};
|
||||
|
||||
struct nand_out_t {
|
||||
struct nand_out {
|
||||
unsigned char *status;
|
||||
};
|
||||
|
||||
struct sdram_in_t {
|
||||
struct sdram_in {
|
||||
unsigned char dev;
|
||||
unsigned char *buf;
|
||||
unsigned int start;
|
||||
|
Loading…
Reference in New Issue
Block a user