Merge tag 'u-boot-atmel-fixes-2020.07-a' of https://gitlab.denx.de/u-boot/custodians...
[oweals/u-boot.git] / arch / arm / mach-at91 / arm926ejs / eflash.c
index 3f3926428919b487c9ab0795bc61df1a2bd202a5..23c24936edf0246d5078959985544c66157edf32 100644 (file)
@@ -1,8 +1,7 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
  * (C) Copyright 2010
  * Reinhard Meyer, EMK Elektronik, reinhard.meyer@emk-elektronik.de
- *
- * SPDX-License-Identifier:    GPL-2.0+
  */
 
 /*
@@ -44,6 +43,8 @@
  * do a read-modify-write for partially programmed pages
  */
 #include <common.h>
+#include <flash.h>
+#include <log.h>
 #include <asm/io.h>
 #include <asm/arch/hardware.h>
 #include <asm/arch/at91_common.h>
@@ -59,7 +60,7 @@
 flash_info_t flash_info[CONFIG_SYS_MAX_FLASH_BANKS];
 static u32 pagesize;
 
-unsigned long flash_init (void)
+unsigned long flash_init(void)
 {
        at91_eefc_t *eefc = (at91_eefc_t *) ATMEL_BASE_EEFC;
        at91_dbu_t *dbu = (at91_dbu_t *) ATMEL_BASE_DBGU;
@@ -128,7 +129,7 @@ unsigned long flash_init (void)
        return size;
 }
 
-void flash_print_info (flash_info_t *info)
+void flash_print_info(flash_info_t *info)
 {
        int i;
 
@@ -203,7 +204,7 @@ static u32 erase_write_page (u32 pagenum)
                & (AT91_EEFC_FSR_FCMDE | AT91_EEFC_FSR_FLOCKE);
 }
 
-int flash_erase (flash_info_t *info, int s_first, int s_last)
+int flash_erase(flash_info_t *info, int s_first, int s_last)
 {
        debug("erase first=%d last=%d\n", s_first, s_last);
        puts("this flash does not need and support erasing!\n");
@@ -216,7 +217,7 @@ int flash_erase (flash_info_t *info, int s_first, int s_last)
  * 1 - write timeout
  */
 
-int write_buff (flash_info_t *info, uchar *src, ulong addr, ulong cnt)
+int write_buff(flash_info_t *info, uchar *src, ulong addr, ulong cnt)
 {
        u32 pagenum;
        u32 *src32, *dst32;