drivers/usb/ehci_debug.c: Drop CAR_GLOBAL_MIGRATION support

Change-Id: Ib0cd32893ad9540ae55e61e85fb03d194ee55894
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/37040
Reviewed-by: HAOUAS Elyes <ehaouas@noos.fr>
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Arthur Heymans 2019-11-20 21:27:33 +01:00 committed by Patrick Georgi
parent 7c2fd97c05
commit 2b77881564
1 changed files with 7 additions and 8 deletions

View File

@ -17,7 +17,6 @@
#include <arch/io.h> #include <arch/io.h>
#include <device/mmio.h> #include <device/mmio.h>
#include <arch/symbols.h> #include <arch/symbols.h>
#include <arch/early_variables.h>
#include <string.h> #include <string.h>
#include <cbmem.h> #include <cbmem.h>
@ -59,12 +58,12 @@ struct ehci_debug_info {
static int dbgp_enabled(void); static int dbgp_enabled(void);
static void dbgp_print_data(struct ehci_dbg_port *ehci_debug); static void dbgp_print_data(struct ehci_dbg_port *ehci_debug);
static struct ehci_debug_info glob_dbg_info CAR_GLOBAL; static struct ehci_debug_info glob_dbg_info;
static struct ehci_debug_info * glob_dbg_info_p CAR_GLOBAL; static struct ehci_debug_info * glob_dbg_info_p;
static inline struct ehci_debug_info *dbgp_ehci_info(void) static inline struct ehci_debug_info *dbgp_ehci_info(void)
{ {
if (car_get_ptr(glob_dbg_info_p) == NULL) { if (glob_dbg_info_p == NULL) {
struct ehci_debug_info *info; struct ehci_debug_info *info;
if (ENV_BOOTBLOCK || ENV_VERSTAGE || ENV_ROMSTAGE) { if (ENV_BOOTBLOCK || ENV_VERSTAGE || ENV_ROMSTAGE) {
/* The message likely does not show if we hit this. */ /* The message likely does not show if we hit this. */
@ -74,9 +73,9 @@ static inline struct ehci_debug_info *dbgp_ehci_info(void)
} else { } else {
info = &glob_dbg_info; info = &glob_dbg_info;
} }
car_set_ptr(glob_dbg_info_p, info); glob_dbg_info_p = info;
} }
return car_get_ptr(glob_dbg_info_p); return glob_dbg_info_p;
} }
static int dbgp_wait_until_complete(struct ehci_dbg_port *ehci_debug) static int dbgp_wait_until_complete(struct ehci_dbg_port *ehci_debug)
@ -713,7 +712,7 @@ static void migrate_ehci_debug(int is_recovery)
if (dbg_info_cbmem == NULL) if (dbg_info_cbmem == NULL)
return; return;
memcpy(dbg_info_cbmem, dbg_info, sizeof(*dbg_info)); memcpy(dbg_info_cbmem, dbg_info, sizeof(*dbg_info));
car_set_ptr(glob_dbg_info_p, dbg_info_cbmem); glob_dbg_info_p = dbg_info_cbmem;
return; return;
} }
@ -721,7 +720,7 @@ static void migrate_ehci_debug(int is_recovery)
/* Use state in CBMEM. */ /* Use state in CBMEM. */
dbg_info_cbmem = cbmem_find(CBMEM_ID_EHCI_DEBUG); dbg_info_cbmem = cbmem_find(CBMEM_ID_EHCI_DEBUG);
if (dbg_info_cbmem) if (dbg_info_cbmem)
car_set_ptr(glob_dbg_info_p, dbg_info_cbmem); glob_dbg_info_p = dbg_info_cbmem;
} }
rv = usbdebug_hw_init(false); rv = usbdebug_hw_init(false);