diff options
author | Michael Ellerman <mpe@ellerman.id.au> | 2017-06-08 22:54:20 +1000 |
---|---|---|
committer | Stewart Smith <stewart@linux.vnet.ibm.com> | 2017-06-15 13:37:19 +1000 |
commit | 223c49ecbca267aae228132bad360fe09ce2f8a6 (patch) | |
tree | e6bf0de9f2b71a750e569037481e8a1b845ff2fb | |
parent | 385a6903d5f7a938f01e579071a43dc7decd199d (diff) | |
download | skiboot-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>
-rw-r--r-- | core/chip.c | 4 | ||||
-rw-r--r-- | core/init.c | 6 | ||||
-rw-r--r-- | hdata/test/stubs.c | 1 |
3 files changed, 5 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(); diff --git a/hdata/test/stubs.c b/hdata/test/stubs.c index b53703f..cb166f9 100644 --- a/hdata/test/stubs.c +++ b/hdata/test/stubs.c @@ -116,4 +116,5 @@ NOOP_STUB(early_uart_init); NOOP_STUB(mem_reserve_fw); NOOP_STUB(mem_reserve_hwbuf); NOOP_STUB(add_chip_dev_associativity); +NOOP_STUB(enable_mambo_console); |