]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - board/xaeniax/flash.c
kconfig: arm: introduce symbol for ARM CPUs
[karo-tx-uboot.git] / board / xaeniax / flash.c
index 6cb0acaa79fe4b0f8cd48c131eb41654c3231ab0..6ad62166a9f4b05006ca3fbc10af472b81635fec 100644 (file)
@@ -5,23 +5,7 @@
  * (C) Copyright 2001
  * 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>
@@ -220,7 +204,7 @@ static ulong flash_get_size (FPW *addr, flash_info_t *info)
 
 int flash_erase (flash_info_t *info, int s_first, int s_last)
 {
-       int flag, prot, sect;
+       int prot, sect;
        ulong type, start;
        int rcode = 0;
 
@@ -255,7 +239,7 @@ int flash_erase (flash_info_t *info, int s_first, int s_last)
        }
 
        /* Disable interrupts which might cause a timeout here */
-       flag = disable_interrupts ();
+       disable_interrupts();
 
        /* Start erase on unprotected sectors */
        for (sect = s_first; sect <= s_last; sect++) {
@@ -389,7 +373,6 @@ static int write_data (flash_info_t *info, ulong dest, FPW data)
 {
        FPWV *addr = (FPWV *) dest;
        ulong status;
-       int flag;
        ulong start;
 
        /* Check if Flash is (sufficiently) erased */
@@ -398,7 +381,7 @@ static int write_data (flash_info_t *info, ulong dest, FPW data)
                return (2);
        }
        /* Disable interrupts which might cause a timeout here */
-       flag = disable_interrupts ();
+       disable_interrupts();
 
        *addr = (FPW) 0x00400040;       /* write setup */
        *addr = data;