]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - include/flash.h
Merge branch 'master' of git://git.denx.de/u-boot-nds32
[karo-tx-uboot.git] / include / flash.h
index 8feca1b5fad5a700c9eb73a63e1f6f921a541332..77f8b7e47a0ffbbfd67e269a4d39ce2d9a32e7f4 100644 (file)
@@ -2,23 +2,7 @@
  * (C) Copyright 2000-2005
  * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
  *
- * 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
+ * SPDX-License-Identifier:    GPL-2.0+ 
  */
 
 #ifndef _FLASH_H_
@@ -44,6 +28,7 @@ typedef struct {
        ulong   buffer_write_tout;      /* maximum buffer write timeout         */
        ushort  vendor;                 /* the primary vendor id                */
        ushort  cmd_reset;              /* vendor specific reset command        */
+       uchar   cmd_erase_sector;       /* vendor specific erase sect. command  */
        ushort  interface;              /* used for x8/x16 adjustments          */
        ushort  legacy_unlock;          /* support Intel legacy (un)locking     */
        ushort  manufacturer_id;        /* manufacturer id                      */
@@ -58,6 +43,8 @@ typedef struct {
 #endif
 } flash_info_t;
 
+extern flash_info_t flash_info[]; /* info for FLASH chips      */
+
 typedef unsigned long flash_sect_t;
 
 /*
@@ -90,6 +77,7 @@ typedef unsigned long flash_sect_t;
 /* Prototypes */
 
 extern unsigned long flash_init (void);
+extern void flash_protect_default(void);
 extern void flash_print_info (flash_info_t *);
 extern int flash_erase (flash_info_t *, int, int);
 extern int flash_sect_erase (ulong addr_first, ulong addr_last);
@@ -138,6 +126,7 @@ extern flash_info_t *flash_get_info(ulong base);
 #define ERR_UNKNOWN_FLASH_VENDOR       32
 #define ERR_UNKNOWN_FLASH_TYPE         64
 #define ERR_PROG_ERROR                 128
+#define ERR_ABORTED                    256
 
 /*-----------------------------------------------------------------------
  * Protection Flags for flash_protect():
@@ -344,7 +333,7 @@ extern flash_info_t *flash_get_info(ulong base);
 
 #define TOSH_ID_FVT160 0xC2            /* TC58FVT160 ID (16 M, top )           */
 #define TOSH_ID_FVB160 0x43            /* TC58FVT160 ID (16 M, bottom )        */
-#define PHILIPS_LPC2292 0x0401FF13  /* LPC2292 internal FLASH                  */
+#define NUMONYX_256MBIT        0x8922          /* Numonyx P33/30 256MBit 65nm  */
 
 /*-----------------------------------------------------------------------
  * Internal FLASH identification codes