coreboot/src/include/console
Kyösti Mälkki d07f377872 usbdebug: Fix init and add support for postcar
It was originally designed such that if usbdebug_init() was called
before cbmem_initialize(), it would fetch the already-initialized
state from CBMEM. This changed when cbmem_find() behaviour changed
to require cbmem_initialize() to be called first. As a result,
ramstage had to reinitialize all of the EHCI controller and USB
endpoints on entry. This was slow, specially with AMD hardware
where one can scan USB ports to probe for the debug dongle.

For postcar and ramstage, move usbdebug entry such that it is
triggered from CBMEM_INIT_HOOK instead of console_init().
Side-effect of this is usbdebug console shows 'coreboot-xxx ...
starting...' line only for romstage.

Initialisation for usbdebug is never done in postcar. If you have
USBDEBUG_IN_ROMSTAGE=n, postcar will not have console output on
usb either.

While at it, fix also some other __PRE_RAM__ cases to ENV_ROMSTAGE
and alike.

Change-Id: If8ab973321a801abc5529f3ff68c5dccae9512ad
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/21443
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-09-14 12:26:18 +00:00
..
cbmem_console.h include/console: Use IS_ENABLED() macro 2017-05-22 11:07:57 +02:00
console.h console: Add weak method to notify about death 2017-08-14 11:01:41 +00:00
early_print.h src/include: Wrap lines at 80 columns 2017-03-13 17:23:37 +01:00
flash.h console/flashsconsole: Add spi flash console for debugging 2017-06-04 18:44:56 +02:00
ne2k.h include/console: Use IS_ENABLED() macro 2017-05-22 11:07:57 +02:00
post_codes.h intel/fsp: Add and use new post codes for FSP phase indication 2017-07-17 15:16:37 +00:00
qemu_debugcon.h include/console: Use IS_ENABLED() macro 2017-05-22 11:07:57 +02:00
spi.h Rename __attribute__((packed)) --> __packed 2017-07-13 19:45:59 +00:00
spkmodem.h include/console: Use IS_ENABLED() macro 2017-05-22 11:07:57 +02:00
streams.h console: Add write line routine 2016-08-10 22:30:19 +02:00
uart.h include/console: Use IS_ENABLED() macro 2017-05-22 11:07:57 +02:00
usb.h usbdebug: Fix init and add support for postcar 2017-09-14 12:26:18 +00:00
vtxprintf.h src/include: Add space after comma 2017-03-09 17:19:16 +01:00