2 * drivers/mtd/devices/goldfish_nand_reg.h
4 * Copyright (C) 2007 Google, Inc.
6 * This software is licensed under the terms of the GNU General Public
7 * License version 2, as published by the Free Software Foundation, and
8 * may be copied, distributed, and modified under those terms.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
17 #ifndef GOLDFISH_NAND_REG_H
18 #define GOLDFISH_NAND_REG_H
21 /* Write device name for NAND_DEV to NAND_DATA (vaddr) */
22 NAND_CMD_GET_DEV_NAME,
26 /* NAND_RESULT is 1 if block is bad, 0 if it is not */
27 NAND_CMD_BLOCK_BAD_GET,
28 NAND_CMD_BLOCK_BAD_SET,
29 NAND_CMD_READ_WITH_PARAMS,
30 NAND_CMD_WRITE_WITH_PARAMS,
31 NAND_CMD_ERASE_WITH_PARAMS
35 NAND_DEV_FLAG_READ_ONLY = 0x00000001,
36 NAND_DEV_FLAG_CMD_PARAMS_CAP = 0x00000002,
39 #define NAND_VERSION_CURRENT (1)
48 NAND_DEV_FLAGS = 0x010,
49 NAND_DEV_NAME_LEN = 0x014,
50 NAND_DEV_PAGE_SIZE = 0x018,
51 NAND_DEV_EXTRA_SIZE = 0x01c,
52 NAND_DEV_ERASE_SIZE = 0x020,
53 NAND_DEV_SIZE_LOW = 0x028,
54 NAND_DEV_SIZE_HIGH = 0x02c,
60 NAND_TRANSFER_SIZE = 0x04c,
61 NAND_ADDR_LOW = 0x050,
62 NAND_ADDR_HIGH = 0x054,
63 NAND_CMD_PARAMS_ADDR_LOW = 0x058,
64 NAND_CMD_PARAMS_ADDR_HIGH = 0x05c,
71 uint32_t transfer_size;