common: Move flash_perror() to flash.h

This function belongs more in flash.h than common.h so move it.

Also remove the space before the bracket in some calls.

Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Simon Glass 2019-12-28 10:44:40 -07:00 committed by Tom Rini
parent 6b8d3ceaf5
commit 0ee48252b4
7 changed files with 14 additions and 6 deletions

View File

@ -12,6 +12,7 @@
#include <console.h>
#include <cpu_func.h>
#include <env.h>
#include <flash.h>
#include <s_record.h>
#include <net.h>
#include <exports.h>

View File

@ -16,6 +16,7 @@
#include <cli.h>
#include <command.h>
#include <console.h>
#include <flash.h>
#include <hash.h>
#include <mapmem.h>
#include <watchdog.h>

1
env/flash.c vendored
View File

@ -13,6 +13,7 @@
#include <command.h>
#include <env.h>
#include <env_internal.h>
#include <flash.h>
#include <linux/stddef.h>
#include <malloc.h>
#include <search.h>

View File

@ -78,9 +78,6 @@ extern u8 __dtb_dt_spl_begin[]; /* embedded device tree blob for SPL/TPL */
*/
int arch_fixup_fdt(void *blob);
/* common/flash.c */
void flash_perror (int);
/* common/cmd_source.c */
int source (ulong addr, const char *fit_uname);

View File

@ -117,6 +117,13 @@ extern int jedec_flash_match(flash_info_t *info, ulong base);
#define CFI_CMDSET_AMD_LEGACY 0xFFF0
#endif
/**
* flash_perror() - Print a flash error
*
* @err: Error number of message to print (ERR_... as below)
*/
void flash_perror(int err);
/*-----------------------------------------------------------------------
* return codes from flash_write():
*/

View File

@ -28,6 +28,7 @@
#include <common.h>
#include <command.h>
#include <flash.h>
#include <net.h>
#include <malloc.h>
#include <mapmem.h>