]> git.sur5r.net Git - u-boot/blobdiff - board/mousse/flash.c
Add GPL-2.0+ SPDX-License-Identifier to source files
[u-boot] / board / mousse / flash.c
index d729f33f9359942636e6008b1b7e9fa6bb15df7c..acedcb1aa136e728c8f33c110ce0262a16a56466 100644 (file)
  * (C) Copyright 1999, by Curt McDowell, 08-06-99, Broadcom Corp.
  * (C) Copyright 2001, James Dougherty, 07/18/01, Broadcom Corp.
  *
- * 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>
@@ -450,7 +434,7 @@ STATUS flashWrite (flash_dev_t * dev, int pos, char *buf, int len)
 }
 
 /*
- * flashWritable returns TRUE if a range contains all F's.
+ * flashWritable returns true if a range contains all F's.
  */
 
 STATUS flashWritable (flash_dev_t * dev, int pos, int len)
@@ -776,8 +760,7 @@ void flash_print_info (flash_info_t * info)
  */
 int flash_erase (flash_info_t * info, int s_first, int s_last)
 {
-       vu_long *addr = (vu_long *) (info->start[0]);
-       int prot, sect, l_sect;
+       int prot, sect;
        flash_dev_t *dev = NULL;
 
        if ((s_first < 0) || (s_first > s_last)) {
@@ -803,17 +786,12 @@ int flash_erase (flash_info_t * info, int s_first, int s_last)
                printf ("\n");
        }
 
-       l_sect = -1;
-
        /* Start erase on unprotected sectors */
        dev = getFlashDevFromInfo (info);
        if (dev) {
                printf ("Erase FLASH[%s] -%d sectors:", dev->name, dev->sectors);
                for (sect = s_first; sect <= s_last; sect++) {
                        if (info->protect[sect] == 0) { /* not protected */
-                               addr = (vu_long *) (dev->base);
-                               /*   printf("erase_sector: sector=%d, addr=0x%x\n",
-                                  sect, addr); */
                                printf (".");
                                if (ERROR == flashEraseSector (dev, sect)) {
                                        printf ("ERROR: could not erase sector %d on FLASH[%s]\n", sect, dev->name);