From 0ae753a084b555e3356c37c79ca743aedd11df02 Mon Sep 17 00:00:00 2001 From: Michael Neuling Date: Tue, 5 Jul 2016 21:36:36 +1000 Subject: flash: Rework error paths and messages for multiple flash controllers The current flash code was written with only one flash chip, which is a system_flash (ie. the PNOR image), in mind. Now that we have mambo bogusdisk flash, we can have many flash chips. This is resulting in some confusing output messages. This reworks some of the error paths and warnings to make this more coherent when we have multiple flash chips. We assume everything can be a system flash, so I've removed the is_system_flash parameter from flash_register(). We'll use the first system flash we find and warn if we find another since discovery order is not a guaranteed API. Signed-off-by: Michael Neuling Acked-by: Jeremy Kerr Signed-off-by: Stewart Smith --- libflash/libffs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libflash') diff --git a/libflash/libffs.c b/libflash/libffs.c index 65c3fbe..8b1c2a7 100644 --- a/libflash/libffs.c +++ b/libflash/libffs.c @@ -135,7 +135,7 @@ int ffs_init(uint32_t offset, uint32_t max_size, struct blocklevel_device *bl, /* Convert and check flash header */ rc = ffs_check_convert_header(&f->hdr, &hdr); if (rc) { - FL_ERR("FFS: Error %d checking flash header\n", rc); + FL_INF("FFS: Flash header not found. Code: %d\n", rc); goto out; } -- cgit v1.1