diff options
author | Jack Rosenthal <jrosenth@chromium.org> | 2022-05-05 15:09:52 -0600 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2022-05-05 22:27:14 +0000 |
commit | 73d4d92b07937932794d0e37d923300e4cb72481 (patch) | |
tree | 8e1d2b9cce0cb16aea9ee8d0ce8c9b4ece2d6835 | |
parent | 4e7c8e207360782c1d0b6363f81f67d8808d18c4 (diff) | |
download | chrome-ec-73d4d92b07937932794d0e37d923300e4cb72481.tar.gz |
volteer: Disable board-specific debug messages
No room left in flash. If we wish to keep volteer building on ToT, we
need to figure out a way to get more bytes.
This disables some debug messages in board-specific code only.
This buys us another ~400 bytes of flash space in RO.
BUG=b:231623330
BRANCH=none
TEST=flash space increases:
*** 480 bytes in flash and 21760 bytes in RAM still available on volteer RO ****
*** 616 bytes in flash and 21760 bytes in RAM still available on volteer RW ****
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Change-Id: I56eaff7b4fbe7546e8f3c1253fdb66e70b794029
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3630477
Commit-Queue: Abe Levkoy <alevkoy@chromium.org>
Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
-rw-r--r-- | board/volteer/board.c | 3 | ||||
-rw-r--r-- | board/volteer/usbc_config.c | 16 |
2 files changed, 10 insertions, 9 deletions
diff --git a/board/volteer/board.c b/board/volteer/board.c index 22c1eea0a4..0e7a1d21e0 100644 --- a/board/volteer/board.c +++ b/board/volteer/board.c @@ -39,7 +39,8 @@ #include "gpio_list.h" /* Must come after other header files. */ -#define CPRINTS(format, args...) cprints(CC_CHIPSET, format, ## args) +/* Disable debug messages to save flash space */ +#define CPRINTS(format, args...) /******************************************************************************/ /* Keyboard scan setting */ diff --git a/board/volteer/usbc_config.c b/board/volteer/usbc_config.c index a729a62bc3..748e1e9599 100644 --- a/board/volteer/usbc_config.c +++ b/board/volteer/usbc_config.c @@ -22,7 +22,8 @@ #include "driver/tcpm/tusb422_public.h" #include "driver/tcpm/tcpci.h" -#define CPRINTS(format, args...) cprints(CC_CHIPSET, format, ## args) +/* Disable debug messages to save flash space */ +#define CPRINTS(format, args...) /* USBC TCPC configuration for USB3 daughter board */ static const struct tcpc_config_t tcpc_config_p1_usb3 = { @@ -111,7 +112,6 @@ static void config_port_discrete_tcpc(int port) CPRINTS("C%d: Default to TUSB422", port); } -static const char *db_type_prefix = "USB DB type: "; void config_usb3_db_type(void) { enum ec_cfg_usb_db_type usb_db = ec_cfg_usb_db_type(); @@ -119,27 +119,27 @@ void config_usb3_db_type(void) config_port_discrete_tcpc(0); switch (usb_db) { case DB_USB_ABSENT: - CPRINTS("%sNone", db_type_prefix); + CPRINTS("USB DB Type: None"); break; case DB_USB4_GEN2: config_port_discrete_tcpc(1); - CPRINTS("%sUSB4 Gen1/2", db_type_prefix); + CPRINTS("USB DB Type: USB4 Gen1/2"); break; case DB_USB4_GEN3: config_port_discrete_tcpc(1); - CPRINTS("%sUSB4 Gen3", db_type_prefix); + CPRINTS("USB DB Type: USB4 Gen3"); break; case DB_USB3_ACTIVE: config_db_usb3_active(); - CPRINTS("%sUSB3 Active", db_type_prefix); + CPRINTS("USB DB Type: USB3 Active"); break; case DB_USB3_PASSIVE: config_db_usb3_passive(); config_port_discrete_tcpc(1); - CPRINTS("%sUSB3 Passive", db_type_prefix); + CPRINTS("USB DB Type: USB3 Passive"); break; default: - CPRINTS("%sID %d not supported", db_type_prefix, usb_db); + CPRINTS("USB DB Type: ID %d not supported", usb_db); } } |