#ifndef __DENALI_H__
#define __DENALI_H__
#include <linux/bits.h>
#include <linux/completion.h>
#include <linux/list.h>
#include <linux/mtd/rawnand.h>
#include <linux/spinlock_types.h>
#include <linux/types.h>
#define DEVICE_RESET …
#define DEVICE_RESET__BANK(bank) …
#define TRANSFER_SPARE_REG …
#define TRANSFER_SPARE_REG__FLAG …
#define LOAD_WAIT_CNT …
#define LOAD_WAIT_CNT__VALUE …
#define PROGRAM_WAIT_CNT …
#define PROGRAM_WAIT_CNT__VALUE …
#define ERASE_WAIT_CNT …
#define ERASE_WAIT_CNT__VALUE …
#define INT_MON_CYCCNT …
#define INT_MON_CYCCNT__VALUE …
#define RB_PIN_ENABLED …
#define RB_PIN_ENABLED__BANK(bank) …
#define MULTIPLANE_OPERATION …
#define MULTIPLANE_OPERATION__FLAG …
#define MULTIPLANE_READ_ENABLE …
#define MULTIPLANE_READ_ENABLE__FLAG …
#define COPYBACK_DISABLE …
#define COPYBACK_DISABLE__FLAG …
#define CACHE_WRITE_ENABLE …
#define CACHE_WRITE_ENABLE__FLAG …
#define CACHE_READ_ENABLE …
#define CACHE_READ_ENABLE__FLAG …
#define PREFETCH_MODE …
#define PREFETCH_MODE__PREFETCH_EN …
#define PREFETCH_MODE__PREFETCH_BURST_LENGTH …
#define CHIP_ENABLE_DONT_CARE …
#define CHIP_EN_DONT_CARE__FLAG …
#define ECC_ENABLE …
#define ECC_ENABLE__FLAG …
#define GLOBAL_INT_ENABLE …
#define GLOBAL_INT_EN_FLAG …
#define TWHR2_AND_WE_2_RE …
#define TWHR2_AND_WE_2_RE__WE_2_RE …
#define TWHR2_AND_WE_2_RE__TWHR2 …
#define TCWAW_AND_ADDR_2_DATA …
#define TCWAW_AND_ADDR_2_DATA__ADDR_2_DATA …
#define TCWAW_AND_ADDR_2_DATA__TCWAW …
#define RE_2_WE …
#define RE_2_WE__VALUE …
#define ACC_CLKS …
#define ACC_CLKS__VALUE …
#define NUMBER_OF_PLANES …
#define NUMBER_OF_PLANES__VALUE …
#define PAGES_PER_BLOCK …
#define PAGES_PER_BLOCK__VALUE …
#define DEVICE_WIDTH …
#define DEVICE_WIDTH__VALUE …
#define DEVICE_MAIN_AREA_SIZE …
#define DEVICE_MAIN_AREA_SIZE__VALUE …
#define DEVICE_SPARE_AREA_SIZE …
#define DEVICE_SPARE_AREA_SIZE__VALUE …
#define TWO_ROW_ADDR_CYCLES …
#define TWO_ROW_ADDR_CYCLES__FLAG …
#define MULTIPLANE_ADDR_RESTRICT …
#define MULTIPLANE_ADDR_RESTRICT__FLAG …
#define ECC_CORRECTION …
#define ECC_CORRECTION__VALUE …
#define ECC_CORRECTION__ERASE_THRESHOLD …
#define READ_MODE …
#define READ_MODE__VALUE …
#define WRITE_MODE …
#define WRITE_MODE__VALUE …
#define COPYBACK_MODE …
#define COPYBACK_MODE__VALUE …
#define RDWR_EN_LO_CNT …
#define RDWR_EN_LO_CNT__VALUE …
#define RDWR_EN_HI_CNT …
#define RDWR_EN_HI_CNT__VALUE …
#define MAX_RD_DELAY …
#define MAX_RD_DELAY__VALUE …
#define CS_SETUP_CNT …
#define CS_SETUP_CNT__VALUE …
#define CS_SETUP_CNT__TWB …
#define SPARE_AREA_SKIP_BYTES …
#define SPARE_AREA_SKIP_BYTES__VALUE …
#define SPARE_AREA_MARKER …
#define SPARE_AREA_MARKER__VALUE …
#define DEVICES_CONNECTED …
#define DEVICES_CONNECTED__VALUE …
#define DIE_MASK …
#define DIE_MASK__VALUE …
#define FIRST_BLOCK_OF_NEXT_PLANE …
#define FIRST_BLOCK_OF_NEXT_PLANE__VALUE …
#define WRITE_PROTECT …
#define WRITE_PROTECT__FLAG …
#define RE_2_RE …
#define RE_2_RE__VALUE …
#define MANUFACTURER_ID …
#define MANUFACTURER_ID__VALUE …
#define DEVICE_ID …
#define DEVICE_ID__VALUE …
#define DEVICE_PARAM_0 …
#define DEVICE_PARAM_0__VALUE …
#define DEVICE_PARAM_1 …
#define DEVICE_PARAM_1__VALUE …
#define DEVICE_PARAM_2 …
#define DEVICE_PARAM_2__VALUE …
#define LOGICAL_PAGE_DATA_SIZE …
#define LOGICAL_PAGE_DATA_SIZE__VALUE …
#define LOGICAL_PAGE_SPARE_SIZE …
#define LOGICAL_PAGE_SPARE_SIZE__VALUE …
#define REVISION …
#define REVISION__VALUE …
#define ONFI_DEVICE_FEATURES …
#define ONFI_DEVICE_FEATURES__VALUE …
#define ONFI_OPTIONAL_COMMANDS …
#define ONFI_OPTIONAL_COMMANDS__VALUE …
#define ONFI_TIMING_MODE …
#define ONFI_TIMING_MODE__VALUE …
#define ONFI_PGM_CACHE_TIMING_MODE …
#define ONFI_PGM_CACHE_TIMING_MODE__VALUE …
#define ONFI_DEVICE_NO_OF_LUNS …
#define ONFI_DEVICE_NO_OF_LUNS__NO_OF_LUNS …
#define ONFI_DEVICE_NO_OF_LUNS__ONFI_DEVICE …
#define ONFI_DEVICE_NO_OF_BLOCKS_PER_LUN_L …
#define ONFI_DEVICE_NO_OF_BLOCKS_PER_LUN_L__VALUE …
#define ONFI_DEVICE_NO_OF_BLOCKS_PER_LUN_U …
#define ONFI_DEVICE_NO_OF_BLOCKS_PER_LUN_U__VALUE …
#define FEATURES …
#define FEATURES__N_BANKS …
#define FEATURES__ECC_MAX_ERR …
#define FEATURES__DMA …
#define FEATURES__CMD_DMA …
#define FEATURES__PARTITION …
#define FEATURES__XDMA_SIDEBAND …
#define FEATURES__GPREG …
#define FEATURES__INDEX_ADDR …
#define TRANSFER_MODE …
#define TRANSFER_MODE__VALUE …
#define INTR_STATUS(bank) …
#define INTR_EN(bank) …
#define INTR__ECC_UNCOR_ERR …
#define INTR__ECC_TRANSACTION_DONE …
#define INTR__ECC_ERR …
#define INTR__DMA_CMD_COMP …
#define INTR__TIME_OUT …
#define INTR__PROGRAM_FAIL …
#define INTR__ERASE_FAIL …
#define INTR__LOAD_COMP …
#define INTR__PROGRAM_COMP …
#define INTR__ERASE_COMP …
#define INTR__PIPE_CPYBCK_CMD_COMP …
#define INTR__LOCKED_BLK …
#define INTR__UNSUP_CMD …
#define INTR__INT_ACT …
#define INTR__RST_COMP …
#define INTR__PIPE_CMD_ERR …
#define INTR__PAGE_XFER_INC …
#define INTR__ERASED_PAGE …
#define PAGE_CNT(bank) …
#define ERR_PAGE_ADDR(bank) …
#define ERR_BLOCK_ADDR(bank) …
#define ECC_THRESHOLD …
#define ECC_THRESHOLD__VALUE …
#define ECC_ERROR_BLOCK_ADDRESS …
#define ECC_ERROR_BLOCK_ADDRESS__VALUE …
#define ECC_ERROR_PAGE_ADDRESS …
#define ECC_ERROR_PAGE_ADDRESS__VALUE …
#define ECC_ERROR_PAGE_ADDRESS__BANK …
#define ECC_ERROR_ADDRESS …
#define ECC_ERROR_ADDRESS__OFFSET …
#define ECC_ERROR_ADDRESS__SECTOR …
#define ERR_CORRECTION_INFO …
#define ERR_CORRECTION_INFO__BYTE …
#define ERR_CORRECTION_INFO__DEVICE …
#define ERR_CORRECTION_INFO__UNCOR …
#define ERR_CORRECTION_INFO__LAST_ERR …
#define ECC_COR_INFO(bank) …
#define ECC_COR_INFO__SHIFT(bank) …
#define ECC_COR_INFO__MAX_ERRORS …
#define ECC_COR_INFO__UNCOR_ERR …
#define CFG_DATA_BLOCK_SIZE …
#define CFG_LAST_DATA_BLOCK_SIZE …
#define CFG_NUM_DATA_BLOCKS …
#define CFG_META_DATA_SIZE …
#define DMA_ENABLE …
#define DMA_ENABLE__FLAG …
#define IGNORE_ECC_DONE …
#define IGNORE_ECC_DONE__FLAG …
#define DMA_INTR …
#define DMA_INTR_EN …
#define DMA_INTR__TARGET_ERROR …
#define DMA_INTR__DESC_COMP_CHANNEL0 …
#define DMA_INTR__DESC_COMP_CHANNEL1 …
#define DMA_INTR__DESC_COMP_CHANNEL2 …
#define DMA_INTR__DESC_COMP_CHANNEL3 …
#define DMA_INTR__MEMCOPY_DESC_COMP …
#define TARGET_ERR_ADDR_LO …
#define TARGET_ERR_ADDR_LO__VALUE …
#define TARGET_ERR_ADDR_HI …
#define TARGET_ERR_ADDR_HI__VALUE …
#define CHNL_ACTIVE …
#define CHNL_ACTIVE__CHANNEL0 …
#define CHNL_ACTIVE__CHANNEL1 …
#define CHNL_ACTIVE__CHANNEL2 …
#define CHNL_ACTIVE__CHANNEL3 …
struct denali_chip_sel { … };
struct denali_chip { … };
struct denali_controller { … };
#define DENALI_CAP_HW_ECC_FIXUP …
#define DENALI_CAP_DMA_64BIT …
int denali_calc_ecc_bytes(int step_size, int strength);
int denali_chip_init(struct denali_controller *denali,
struct denali_chip *dchip);
int denali_init(struct denali_controller *denali);
void denali_remove(struct denali_controller *denali);
#endif