]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - board/mvblue/flash.c
karo: tx6: add support for TX6 HW Rev. 3
[karo-tx-uboot.git] / board / mvblue / flash.c
index 0c0738cf27dc5472126a4f6ae22fcc8fce42798f..5dd658ff8a503c05343aaa208c0e330e014cc7d2 100644 (file)
@@ -6,20 +6,7 @@
  * Changes for MATRIX Vision mvBLUE devices
  * MATRIX Vision GmbH / hg,as info@matrix-vision.de
  *
- * 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+
  */
 
 #include <common.h>
@@ -31,7 +18,7 @@
        #define mvdebug(p)
 #endif
 
-flash_info_t   flash_info[CFG_MAX_FLASH_BANKS];
+flash_info_t   flash_info[CONFIG_SYS_MAX_FLASH_BANKS];
 
 #define FLASH_BUS_WIDTH                8
 
@@ -65,7 +52,7 @@ unsigned long flash_init (void)
        unsigned long size_b0;
        int i;
 
-       for (i=0; i<CFG_MAX_FLASH_BANKS; ++i) {
+       for (i=0; i<CONFIG_SYS_MAX_FLASH_BANKS; ++i) {
                flash_info[i].flash_id = FLASH_UNKNOWN;
        }
 
@@ -416,7 +403,7 @@ int flash_erase (flash_info_t *info, int s_first, int s_last)
        addr = (FDT *)(info->start[l_sect]);
 
        while ((addr[0] & ERASE_CONFIRM_DATA) != ERASE_CONFIRM_DATA) {
-               if ((now = get_timer(start)) > CFG_FLASH_ERASE_TOUT) {
+               if ((now = get_timer(start)) > CONFIG_SYS_FLASH_ERASE_TOUT) {
                        printf ("Timeout\n");
                        return 1;
                }
@@ -554,7 +541,7 @@ static int write_char (flash_info_t *info, ulong dest, uchar data)
        start = get_timer (0);
        addr = (vu_char *)dest;
        while (( (*addr) & WRITE_CONFIRM_DATA) != (data & WRITE_CONFIRM_DATA)) {
-               if (get_timer(start) > CFG_FLASH_WRITE_TOUT) {
+               if (get_timer(start) > CONFIG_SYS_FLASH_WRITE_TOUT) {
                        printf(" *** ERROR: Flash write timeout !");
                        return (1);
                }