]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - include/faraday/ftsmc020.h
Merge git://git.denx.de/u-boot-arm
[karo-tx-uboot.git] / include / faraday / ftsmc020.h
index 95d95003395b6e2ad2ad838e702c5c95d4008f2b..54120ab4166fabd0dc6c38e969c4e95b852f452b 100644 (file)
@@ -2,19 +2,7 @@
  * (C) Copyright 2009 Faraday Technology
  * Po-Yu Chuang <ratbert@faraday-tech.com>
  *
- * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+ * SPDX-License-Identifier:    GPL-2.0+
  */
 
 /*
 
 #ifndef __ASSEMBLY__
 
+struct ftsmc020_bank {
+       unsigned int    cr;
+       unsigned int    tpr;
+};
+
 struct ftsmc020 {
-       struct {
-               unsigned int    cr;     /* 0x00, 0x08, 0x10, 0x18 */
-               unsigned int    tpr;    /* 0x04, 0x0c, 0x14, 0x1c */
-       } bank[4];
-       unsigned int    pad[8]; /* 0x20 - 0x3c */
-       unsigned int    ssr;    /* 0x40 */
+       struct ftsmc020_bank bank[4];   /* 0x00 - 0x1c */
+       unsigned int    pad[8];         /* 0x20 - 0x3c */
+       unsigned int    ssr;            /* 0x40 */
 };
 
 void ftsmc020_init(void);
@@ -46,6 +36,10 @@ void ftsmc020_init(void);
 
 #define FTSMC020_BANK_WPROT    (1 << 11)
 
+#define FTSMC020_BANK_TYPE1    (1 << 10)
+#define FTSMC020_BANK_TYPE2    (1 << 9)
+#define FTSMC020_BANK_TYPE3    (1 << 8)
+
 #define FTSMC020_BANK_SIZE_32K (0xb << 4)
 #define FTSMC020_BANK_SIZE_64K (0xc << 4)
 #define FTSMC020_BANK_SIZE_128K        (0xd << 4)
@@ -57,6 +51,7 @@ void ftsmc020_init(void);
 #define FTSMC020_BANK_SIZE_8M  (0x3 << 4)
 #define FTSMC020_BANK_SIZE_16M (0x4 << 4)
 #define FTSMC020_BANK_SIZE_32M (0x5 << 4)
+#define FTSMC020_BANK_SIZE_64M (0x6 << 4)
 
 #define FTSMC020_BANK_MBW_8    (0x0 << 0)
 #define FTSMC020_BANK_MBW_16   (0x1 << 0)