1*95e1ffb1Schristos /* $NetBSD: i28f128reg.h,v 1.4 2005/12/11 12:17:34 christos Exp $ */ 2f8bc0014Sigy 3f8bc0014Sigy /* 48f53455cSigy * Copyright (c) 2003 Naoto Shimazaki. 5f8bc0014Sigy * All rights reserved. 6f8bc0014Sigy * 7f8bc0014Sigy * Redistribution and use in source and binary forms, with or without 8f8bc0014Sigy * modification, are permitted provided that the following conditions 9f8bc0014Sigy * are met: 10f8bc0014Sigy * 1. Redistributions of source code must retain the above copyright 11f8bc0014Sigy * notice, this list of conditions and the following disclaimer. 12f8bc0014Sigy * 2. Redistributions in binary form must reproduce the above copyright 13f8bc0014Sigy * notice, this list of conditions and the following disclaimer in the 14f8bc0014Sigy * documentation and/or other materials provided with the distribution. 15f8bc0014Sigy * 168f53455cSigy * THIS SOFTWARE IS PROVIDED BY NAOTO SHIMAZAKI AND CONTRIBUTORS ``AS IS'' 178f53455cSigy * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 188f53455cSigy * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 198f53455cSigy * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE NAOTO OR CONTRIBUTORS BE 208f53455cSigy * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 21f8bc0014Sigy * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 22f8bc0014Sigy * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 23f8bc0014Sigy * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 24f8bc0014Sigy * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 258f53455cSigy * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 268f53455cSigy * THE POSSIBILITY OF SUCH DAMAGE. 27f8bc0014Sigy */ 28f8bc0014Sigy 29f8bc0014Sigy /* 30f8bc0014Sigy * Flash Memory Writer 31f8bc0014Sigy */ 32f8bc0014Sigy 33f8bc0014Sigy #define I28F128_BLOCK_SIZE 0x20000 /* 128Kbyte */ 34f8bc0014Sigy #define I28F128_BLOCK_MASK 0x1ffff /* 128Kbyte */ 35f8bc0014Sigy 365dc7df16Sigy #define I28F128_WBUF_SIZE 0x20 375dc7df16Sigy 38f8bc0014Sigy #define I28F128_MANUFACT 0x89 39f8bc0014Sigy #define I28F128_DEVCODE 0x18 40f8bc0014Sigy #define I28F128_PRIM_COMM0 0x01 41f8bc0014Sigy #define I28F128_PRIM_COMM1 0x00 42f8bc0014Sigy #define I28F128_PRIM_EXT_TBL0 0x31 43f8bc0014Sigy #define I28F128_PRIM_EXT_TBL1 0x00 44f8bc0014Sigy 45f8bc0014Sigy #define I28F128_RESET 0xff 46f8bc0014Sigy #define I28F128_READ_ARRAY I28F128_RESET 47f8bc0014Sigy #define I28F128_READ_ID 0x90 48f8bc0014Sigy #define I28F128_READ_STATUS 0x70 49f8bc0014Sigy #define I28F128_CLEAR_STATUS 0x50 50f8bc0014Sigy 51f8bc0014Sigy #define I28F128_BLK_ERASE_1ST 0x20 52f8bc0014Sigy #define I28F128_BLK_ERASE_2ND 0xd0 53f8bc0014Sigy #define I28F128_WORDBYTE_PROG 0x40 545dc7df16Sigy #define I28F128_WRITE_BUFFER 0xe8 555dc7df16Sigy #define I28F128_WBUF_CONFIRM 0xd0 56f8bc0014Sigy 57f8bc0014Sigy #define I28F128_S_READY 0x80 58f8bc0014Sigy #define I28F128_S_ERASE_SUSPEND 0x40 59f8bc0014Sigy #define I28F128_S_ERASE_ERROR 0x20 60f8bc0014Sigy #define I28F128_S_PROG_ERROR 0x10 61f8bc0014Sigy #define I28F128_S_LOW_VOLTAGE 0x08 62f8bc0014Sigy #define I28F128_S_PROG_SUSPEND 0x04 63f8bc0014Sigy #define I28F128_S_BLOCK_LOCKED 0x02 645dc7df16Sigy 655dc7df16Sigy #define I28F128_XS_BUF_AVAIL 0x80 66