1
0
mirror of git://projects.qi-hardware.com/xburst-tools.git synced 2024-11-25 18:44:40 +02:00

fix the repeat typedef

This commit is contained in:
xiangfu 2009-06-25 03:43:00 +00:00
parent 99d783535e
commit 56482a184a
6 changed files with 84 additions and 85 deletions

View File

@ -43,10 +43,10 @@ KERNEL_HEADERS_PACKAGE=$(KERNEL_HEADERS_VER).tar.bz2
KERNEL_HEADERS_URL=
# for the device stage
FLASH_TOOL_PATH = ./flash-tool
FLASH_TOOL_PATH = ./inflash
FLASH_TOOL_BIN_PATH = $(FLASH_TOOL_PATH)/bin
STAGE1_PATH = $(FLASH_TOOL_PATH)/device_stage1
STAGE2_PATH = $(FLASH_TOOL_PATH)/device_stage2
STAGE1_PATH = $(FLASH_TOOL_PATH)/xburst_stage1
STAGE2_PATH = $(FLASH_TOOL_PATH)/xburst_stage2
CROSS_COMPILE ?= mipsel-linux-
CFLAGS="-O2"
@ -155,8 +155,8 @@ kernel:
make uImage
### flash-boot
.PHONY: flash-tool
flash-tool: stage1 stage2
.PHONY: inflash
inflash: stage1 stage2
mkdir -p $(FLASH_TOOL_BIN_PATH)
cp $(FLASH_TOOL_PATH)/src/usb_boot.cfg $(FLASH_TOOL_BIN_PATH)
cd $(FLASH_TOOL_PATH) && \
@ -172,10 +172,14 @@ stage2:
make CROSS_COMPILE=$(CROSS_COMPILE) -C $(STAGE2_PATH)
### clean up
distclean: clean clean-toolchain
distclean: clean clean-inflash clean-toolchain
clean:
make clean -C flash-tool
clean-inflash:
make clean CROSS_COMPILE=$(CROSS_COMPILE) -C $(STAGE1_PATH)
make clean CROSS_COMPILE=$(CROSS_COMPILE) -C $(STAGE2_PATH)
make clean -C $(FLASH_TOOL_PATH)
clean-toolchain: clean-glibc
rm -rf $(TOOLCHAIN_PATH)/$(BINUTILS_VER) binutils

5
README
View File

@ -41,3 +41,8 @@ The Jz4740 also has an IPU which has the following features:
* Video frame resize
* Color space conversion: 420/444/422 YUV to RGB convert
=debian package=
1. run 'dh_make'
2. edit the file under 'debian' folder (create by 'dh_make')
3. run 'dpkg-buildpackage -rfakeroot' to create the deb package and source
package

View File

@ -47,8 +47,8 @@
#define VENDOR_ID 0x601a
#define PRODUCT_ID 0x4740
#define STAGE1_FILE_PATH "/usr/share/inflash/fw.bin"
#define STAGE2_FILE_PATH "/usr/share/inflash/usb_boot.bin"
#define STAGE1_FILE_PATH "/usr/share/inflash/xburst_stage1.bin"
#define STAGE2_FILE_PATH "/usr/share/inflash/xburst_stage2.bin"
#define ARRAY_SIZE(a) (sizeof(a) / sizeof(a[0]))

View File

@ -18,15 +18,10 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA
*/
#ifndef __JZ4740_H__
#define __JZ4740_H__
typedef unsigned int size_t;
typedef unsigned char u8;
typedef unsigned short u16;
typedef unsigned int u32;
#include "typedef.h"
#ifndef __ASSEMBLY__
#define UCOS_CSP 0
@ -4864,7 +4859,6 @@ do{ \
(REG_RTC_HSPR = n ); \
}while(0)
#endif /* !__ASSEMBLY__ */
#endif /* __JZ4740_H__ */

View File

@ -22,13 +22,11 @@
#ifndef __JZ4750_H__
#define __JZ4750_H__
#include "typedef.h"
#ifndef __ASSEMBLY__
#define UCOS_CSP 0
typedef unsigned char u8;
typedef unsigned short u16;
typedef unsigned int u32;
#if 0
#if UCOS_CSP
#define __KERNEL__

View File

@ -1,65 +1,63 @@
/*
* Copyright (C) 2009 PI
* Author: Xiangfu Liu <xiangfu.z@gmail.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* version 3 as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA
*/
#ifndef __NANDLIB_H__
#define __NANDLIB_H__
#ifndef NULL
#define NULL 0
#endif
#define u8 unsigned char
#define u16 unsigned short
#define u32 unsigned int
/* Jz4740 nandflash interface */
unsigned int nand_query_4740(u8 *);
int nand_init_4740(int bus_width, int row_cycle, int page_size, int page_per_block,
int,int,int,int);
int nand_fini_4740(void);
u32 nand_program_4740(void *context, int spage, int pages, int option);
//int nand_program_oob_4740(void *context, int spage, int pages, void (*notify)(int));
u32 nand_erase_4740(int blk_num, int sblk, int force);
u32 nand_read_4740(void *buf, u32 startpage, u32 pagenum,int option);
u32 nand_read_oob_4740(void *buf, u32 startpage, u32 pagenum);
u32 nand_read_raw_4740(void *buf, u32 startpage, u32 pagenum,int);
u32 nand_mark_bad_4740(int bad);
void nand_enable_4740(u32 csn);
void nand_disable_4740(u32 csn);
/* Jz4750 nandflash interface */
unsigned int nand_query_4750(u8 *);
//int nand_init_4750(int bus_width, int row_cycle, int page_size, int page_per_block,
// int,int,int,int);
int nand_init_4750(int bus_width, int row_cycle, int page_size, int page_per_block,
int bch_bit, int ecc_pos, int bad_pos, int bad_page, int force);
int nand_fini_4750(void);
u32 nand_program_4750(void *context, int spage, int pages, int option);
//int nand_program_oob_4740(void *context, int spage, int pages, void (*notify)(int));
u32 nand_erase_4750(int blk_num, int sblk, int force);
u32 nand_read_4750(void *buf, u32 startpage, u32 pagenum,int option);
u32 nand_read_oob_4750(void *buf, u32 startpage, u32 pagenum);
u32 nand_read_raw_4750(void *buf, u32 startpage, u32 pagenum,int);
u32 nand_mark_bad_4750(int bad);
void nand_enable_4750(u32 csn);
void nand_disable_4750(u32 csn);
#endif
/*
* Copyright (C) 2009 PI
* Author: Xiangfu Liu <xiangfu.z@gmail.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* version 3 as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA
*/
#ifndef __NANDLIB_H__
#define __NANDLIB_H__
#include "typedef.h"
#ifndef NULL
#define NULL 0
#endif
/* Jz4740 nandflash interface */
unsigned int nand_query_4740(u8 *);
int nand_init_4740(int bus_width, int row_cycle, int page_size, int page_per_block,
int,int,int,int);
int nand_fini_4740(void);
u32 nand_program_4740(void *context, int spage, int pages, int option);
//int nand_program_oob_4740(void *context, int spage, int pages, void (*notify)(int));
u32 nand_erase_4740(int blk_num, int sblk, int force);
u32 nand_read_4740(void *buf, u32 startpage, u32 pagenum,int option);
u32 nand_read_oob_4740(void *buf, u32 startpage, u32 pagenum);
u32 nand_read_raw_4740(void *buf, u32 startpage, u32 pagenum,int);
u32 nand_mark_bad_4740(int bad);
void nand_enable_4740(u32 csn);
void nand_disable_4740(u32 csn);
/* Jz4750 nandflash interface */
unsigned int nand_query_4750(u8 *);
//int nand_init_4750(int bus_width, int row_cycle, int page_size, int page_per_block,
// int,int,int,int);
int nand_init_4750(int bus_width, int row_cycle, int page_size, int page_per_block,
int bch_bit, int ecc_pos, int bad_pos, int bad_page, int force);
int nand_fini_4750(void);
u32 nand_program_4750(void *context, int spage, int pages, int option);
//int nand_program_oob_4740(void *context, int spage, int pages, void (*notify)(int));
u32 nand_erase_4750(int blk_num, int sblk, int force);
u32 nand_read_4750(void *buf, u32 startpage, u32 pagenum,int option);
u32 nand_read_oob_4750(void *buf, u32 startpage, u32 pagenum);
u32 nand_read_raw_4750(void *buf, u32 startpage, u32 pagenum,int);
u32 nand_mark_bad_4750(int bad);
void nand_enable_4750(u32 csn);
void nand_disable_4750(u32 csn);
#endif