80 lines
2.6 KiB
C
80 lines
2.6 KiB
C
/*
|
|
* (C) Copyright 2007-2013
|
|
* Allwinner Technology Co., Ltd. <www.allwinnertech.com>
|
|
* Jerry Wang <wangflord@allwinnertech.com>
|
|
*
|
|
* See file CREDITS for list of people who contributed to this
|
|
* project.
|
|
*
|
|
* This program is free software; you can redistribute it and/or
|
|
* modify it under the terms of the GNU General Public License as
|
|
* published by the Free Software Foundation; either version 2 of
|
|
* the License, or (at your option) any later version.
|
|
*
|
|
* 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., 59 Temple Place, Suite 330, Boston,
|
|
* MA 02111-1307 USA
|
|
*/
|
|
#ifndef _SUNXI_NAND_H
|
|
#define _SUNXI_NAND_H
|
|
|
|
|
|
extern int nand_get_mbr(char* buffer, uint len);
|
|
|
|
extern int nand_uboot_init(int boot_mode);
|
|
extern int nand_uboot_exit(int force);
|
|
|
|
extern int nand_uboot_probe(void);
|
|
|
|
extern uint nand_uboot_read(uint start, uint sectors, void *buffer);
|
|
|
|
extern uint nand_uboot_write(uint start, uint sectors, void *buffer);
|
|
|
|
|
|
extern int nand_download_boot0(uint length, void *buffer);
|
|
extern int nand_download_uboot(uint length, void *buffer);
|
|
|
|
extern int nand_force_download_uboot(uint length ,void *buffer);
|
|
|
|
//for boot stage
|
|
extern int nand_write_boot0(void *buffer,uint length);
|
|
extern int nand_read_boot0(void *buffer,uint length);
|
|
|
|
|
|
extern int nand_uboot_erase(int user_erase);
|
|
|
|
extern uint nand_uboot_get_flash_info(void *buffer, uint length);
|
|
|
|
extern uint nand_uboot_set_flash_info(void *buffer, uint length);
|
|
|
|
extern uint nand_uboot_get_flash_size(void);
|
|
|
|
extern int nand_uboot_flush(void);
|
|
|
|
extern int NAND_Uboot_Force_Erase(void);
|
|
|
|
extern int sunxi_chk_ubifs_sb(void *sb_buf);
|
|
extern uint sunxi_nand_mtd_ubi_write(uint start_block, uint nblock,
|
|
void *buffer);
|
|
extern uint sunxi_nand_mtd_ubi_read(uint start, uint sectors, void *buffer);
|
|
extern uint sunxi_nand_mtd_ubi_cap(void);
|
|
extern int sunxi_nand_download_boot0(uint length, void *buffer);
|
|
extern int sunxi_nand_download_uboot(uint length, void *buffer);
|
|
extern int sunxi_nand_uboot_erase(int user_erase);
|
|
extern int sunxi_nand_uboot_probe(void);
|
|
extern int sunxi_nand_uboot_force_erase(void);
|
|
extern uint sunxi_nand_uboot_get_flash_info(void *buffer, uint length);
|
|
extern int sunxi_nand_uboot_init(int boot_mode);
|
|
extern int sunxi_nand_uboot_exit(int force);
|
|
extern int sunxi_open_ubifs_interface(void);
|
|
extern int sunxi_get_mtd_ubi_mode_status(void);
|
|
|
|
#endif
|
|
|