Merge branch 'u-boot-imx/master' into 'u-boot-arm/master'
[oweals/u-boot.git] / board / svm_sc8xx / flash.c
index b3893ef5f442476111a877e82b2644a1282b8653..8a04de80b375769d1fca3b87f1ebb7686f1043af 100644 (file)
@@ -1,23 +1,7 @@
 /*
  * 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+
  */
 
 #include <common.h>
@@ -539,7 +523,7 @@ int write_buff(flash_info_t *info, uchar *src, ulong addr, ulong cnt)
 static int write_word(flash_info_t *info, ulong dest, ulong data)
 {
        ulong addr = (ulong) (info->start[0]);
-       ulong start, last;
+       ulong start;
        int flag;
        ulong i;
        int data_short[2];
@@ -587,7 +571,6 @@ static int write_word(flash_info_t *info, ulong dest, ulong data)
                                enable_interrupts();
 
                        start = get_timer(0);
-                       last = start;
                        while ((my_in_8((unsigned char *)(dest + i))) !=
                               (data_ch[i])) {
                                if (get_timer(start) >
@@ -612,7 +595,6 @@ static int write_word(flash_info_t *info, ulong dest, ulong data)
                        enable_interrupts();
 
                start = get_timer(0);
-               last = start;
                while ((my_in_be16((unsigned short *)(dest + (i * 2)))) !=
                                                        (data_short[i])) {
                        if (get_timer(start) > CONFIG_SYS_FLASH_WRITE_TOUT)