/* * Copyright (c) 2007-2019 Allwinnertech Co., Ltd. * * This software is licensed under the terms of the GNU General Public * License version 2, as published by the Free Software Foundation, and * may be copied, distributed, and modified under those terms. * * 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. * */ #ifndef _NAND_BASE_H_ #define _NAND_BASE_H_ #include "nand_blk.h" #include "nand_dev.h" #define BLK_ERR_MSG_ON extern struct nand_blk_ops mytr; extern struct _nand_info *p_nand_info; extern void NAND_Interrupt(__u32 nand_index); extern __u32 NAND_GetCurrentCH(void); extern int init_blklayer(void); extern void exit_blklayer(void); extern void set_cache_level(struct _nand_info *nand_info, unsigned short cache_level); extern int NAND_get_storagetype(void); extern __u32 PHY_erase_chip(void); extern void set_capacity_level(struct _nand_info *nand_info, unsigned short capacity_level); extern int NAND_Print_DBG(const char *fmt, ...); extern void NAND_PhysicLock(void); extern void NAND_PhysicUnLock(void); extern int nand_thread(void *arg); #endif