]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - include/dataflash.h
Coding Style cleanup: remove trailing white space
[karo-tx-uboot.git] / include / dataflash.h
index fbd5e17f44c09b47a0123493be9b1583c3996469..142b55546f3efc21c8cc4235c6e1d2a95eb05616 100644 (file)
@@ -3,23 +3,7 @@
  * Data Flash Atmel Description File
  * Author : Hamid Ikdoumi (Atmel)
  *
- * 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+
  */
 
 /* File Name           : dataflash.h                                   */
 #define _DataFlash_h
 
 
-#include <asm/arch/hardware.h>
 #include "config.h"
 
 /*number of protected area*/
-#ifdef CONFIG_NEW_PARTITION
-# define NB_DATAFLASH_AREA     6
-#else
-# define NB_DATAFLASH_AREA     4
-#endif
+#define NB_DATAFLASH_AREA              5
 
-#ifdef CFG_NO_FLASH
+#ifdef CONFIG_SYS_NO_FLASH
 
 /*-----------------------------------------------------------------------
  * return codes from flash_write():
@@ -70,7 +49,7 @@
  * Set Environment according to label:
  */
 # define       FLAG_SETENV             0x80
-#endif /* CFG_NO_FLASH */
+#endif /* CONFIG_SYS_NO_FLASH */
 
 /*define the area structure*/
 typedef struct {
@@ -134,10 +113,14 @@ typedef struct _AT91S_DATAFLASH_INFO {
        unsigned int id;                        /* device id */
 } AT91S_DATAFLASH_INFO, *AT91PS_DATAFLASH_INFO;
 
-
+struct dataflash_addr {
+       unsigned long addr;
+       int cs;
+};
 /*-------------------------------------------------------------------------------------------------*/
-
 #define AT45DB161      0x2c
+#define AT45DB021      0x14
+#define AT45DB081      0x24
 #define AT45DB321      0x34
 #define AT45DB642      0x3c
 #define AT45DB128      0x10
@@ -208,12 +191,15 @@ extern int addr2ram(ulong addr);
 extern int dataflash_real_protect (int flag, unsigned long start_addr, unsigned long end_addr);
 extern int addr_dataflash (unsigned long addr);
 extern int read_dataflash (unsigned long addr, unsigned long size, char *result);
-extern int write_dataflash (unsigned long addr, unsigned long dest, unsigned long size);
+extern int write_dataflash(unsigned long addr_dest, unsigned long addr_src,
+                       unsigned long size);
+extern int AT91F_DataflashInit(void);
+
 extern void dataflash_print_info (void);
 extern void dataflash_perror (int err);
+extern void AT91F_DataflashSetEnv (void);
 
-#ifdef CONFIG_NEW_DF_PARTITION
-extern int AT91F_DataflashSetEnv (void); #endif
-#endif
-
+extern struct dataflash_addr cs[CONFIG_SYS_MAX_DATAFLASH_BANKS];
+extern dataflash_protect_t area_list[NB_DATAFLASH_AREA];
+extern AT91S_DATAFLASH_INFO dataflash_info[];
 #endif