aboutsummaryrefslogtreecommitdiff
path: root/platforms
diff options
context:
space:
mode:
authorMichael Neuling <mikey@neuling.org>2016-07-05 21:36:36 +1000
committerStewart Smith <stewart@linux.vnet.ibm.com>2016-08-25 19:07:08 +1000
commit0ae753a084b555e3356c37c79ca743aedd11df02 (patch)
treead190ba227be9537c2bdaf50c2cf7124f75d55c7 /platforms
parent026b9a13bf8d61a7e72721d59961b40cbc98b410 (diff)
downloadskiboot-0ae753a084b555e3356c37c79ca743aedd11df02.zip
skiboot-0ae753a084b555e3356c37c79ca743aedd11df02.tar.gz
skiboot-0ae753a084b555e3356c37c79ca743aedd11df02.tar.bz2
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 <mikey@neuling.org> Acked-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'platforms')
-rw-r--r--platforms/astbmc/pnor.c2
-rw-r--r--platforms/mambo/mambo.c2
-rw-r--r--platforms/rhesus/rhesus.c2
3 files changed, 3 insertions, 3 deletions
diff --git a/platforms/astbmc/pnor.c b/platforms/astbmc/pnor.c
index 74353ea..de4cafa 100644
--- a/platforms/astbmc/pnor.c
+++ b/platforms/astbmc/pnor.c
@@ -52,7 +52,7 @@ int pnor_init(void)
goto fail;
}
- rc = flash_register(bl, true);
+ rc = flash_register(bl);
if (!rc)
return 0;
diff --git a/platforms/mambo/mambo.c b/platforms/mambo/mambo.c
index 066f748..64248ef 100644
--- a/platforms/mambo/mambo.c
+++ b/platforms/mambo/mambo.c
@@ -213,7 +213,7 @@ static void bogus_disk_flash_init(void)
bl->priv = bdi;
bl->erase_mask = BD_SECT_SZ - 1;
- rc = flash_register(bl, true);
+ rc = flash_register(bl);
if (rc)
prerror("mambo: Failed to register bogus disk: %li\n",
id);
diff --git a/platforms/rhesus/rhesus.c b/platforms/rhesus/rhesus.c
index 8faf295..c96f120 100644
--- a/platforms/rhesus/rhesus.c
+++ b/platforms/rhesus/rhesus.c
@@ -135,7 +135,7 @@ static int rhesus_pnor_init(void)
goto fail;
}
- rc = flash_register(bl, true);
+ rc = flash_register(bl);
if (!rc)
return 0;