aboutsummaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorMichael Ellerman <mpe@ellerman.id.au>2017-06-08 22:54:20 +1000
committerStewart Smith <stewart@linux.vnet.ibm.com>2017-06-15 13:37:19 +1000
commit223c49ecbca267aae228132bad360fe09ce2f8a6 (patch)
treee6bf0de9f2b71a750e569037481e8a1b845ff2fb /core
parent385a6903d5f7a938f01e579071a43dc7decd199d (diff)
downloadskiboot-223c49ecbca267aae228132bad360fe09ce2f8a6.zip
skiboot-223c49ecbca267aae228132bad360fe09ce2f8a6.tar.gz
skiboot-223c49ecbca267aae228132bad360fe09ce2f8a6.tar.bz2
core: Move enable_mambo_console() into chip initialisation
Rather than having a wart in main_cpu_entry() that initialises the mambo console, we can move it into init_chips() which is where we discover that we're on mambo. This also means we don't need to check the quirk again, and has the added bonus that an assert in chip initialisation (which follows immediately) will actually produce output. Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> [stewart@linux.vnet.ibm.com: fix make check by adding no-op stub] Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'core')
-rw-r--r--core/chip.c4
-rw-r--r--core/init.c6
2 files changed, 4 insertions, 6 deletions
diff --git a/core/chip.c b/core/chip.c
index c18ac49..e06a9bc 100644
--- a/core/chip.c
+++ b/core/chip.c
@@ -17,6 +17,7 @@
#include <skiboot.h>
#include <chip.h>
+#include <console.h>
#include <device.h>
#include <timebase.h>
@@ -108,6 +109,9 @@ void init_chips(void)
proc_chip_quirks |= QUIRK_NO_CHIPTOD | QUIRK_MAMBO_CALLOUTS
| QUIRK_NO_F000F | QUIRK_NO_PBA | QUIRK_NO_OCC_IRQ
| QUIRK_NO_DIRECT_CTL | QUIRK_NO_RNG;
+
+ enable_mambo_console();
+
prlog(PR_NOTICE, "CHIP: Detected Mambo simulator\n");
dt_for_each_compatible(dt_root, xn, "ibm,mambo-chip")
diff --git a/core/init.c b/core/init.c
index 8bd737a..59c7754 100644
--- a/core/init.c
+++ b/core/init.c
@@ -869,12 +869,6 @@ void __noreturn __nomcount main_cpu_entry(const void *fdt)
*/
init_chips();
- /* If we detect the mambo simulator, we can enable its special console
- * early on. Do that now.
- */
- if (chip_quirk(QUIRK_MAMBO_CALLOUTS))
- enable_mambo_console();
-
xscom_init();
mfsi_init();