]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - tools/updater/flash.c
vexpress: use correct timer address on extended memory map systems
[karo-tx-uboot.git] / tools / updater / flash.c
index 1ed77b1b18107a36b2e3c43f2ebd7fd9f2ab0112..5388872074ba205310ac523f8390a888c148337b 100644 (file)
@@ -2,23 +2,7 @@
  * (C) Copyright 2000-2006
  * 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>
@@ -66,18 +50,18 @@ flash_protect (int flag, ulong from, ulong to, flash_info_t *info)
                 */
                if (from <= end && to >= info->start[i]) {
                        if (flag & FLAG_PROTECT_CLEAR) {
-#if defined(CFG_FLASH_PROTECTION)
+#if defined(CONFIG_SYS_FLASH_PROTECTION)
                                flash_real_protect(info, i, 0);
 #else
                                info->protect[i] = 0;
-#endif /* CFG_FLASH_PROTECTION */
+#endif /* CONFIG_SYS_FLASH_PROTECTION */
                        }
                        else if (flag & FLAG_PROTECT_SET) {
-#if defined(CFG_FLASH_PROTECTION)
+#if defined(CONFIG_SYS_FLASH_PROTECTION)
                                flash_real_protect(info, i, 1);
 #else
                                info->protect[i] = 1;
-#endif /* CFG_FLASH_PROTECTION */
+#endif /* CONFIG_SYS_FLASH_PROTECTION */
                        }
                }
        }
@@ -93,7 +77,7 @@ addr2info (ulong addr)
        flash_info_t *info;
        int i;
 
-       for (i=0, info=&flash_info[0]; i<CFG_MAX_FLASH_BANKS; ++i, ++info) {
+       for (i=0, info = &flash_info[0]; i<CONFIG_SYS_MAX_FLASH_BANKS; ++i, ++info) {
                if (info->flash_id != FLASH_UNKNOWN &&
                    addr >= info->start[0] &&
                    /* WARNING - The '- 1' is needed if the flash