summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTodd Broch <tbroch@chromium.org>2015-01-15 12:18:32 -0800
committerChromeOS Commit Bot <chromeos-commit-bot@chromium.org>2015-01-16 07:16:09 +0000
commit16655133eeb1c77fafa2bc19a064c5b07e74aadc (patch)
tree086ae3b6ed8c6d223c3dd08606b4da0ac61790ed
parent8351805516126f04245ff8601e6cbe110c99ddb8 (diff)
downloadchrome-ec-16655133eeb1c77fafa2bc19a064c5b07e74aadc.tar.gz
pd: Remove rwhashtable dumping by default for flash space.
Signed-off-by: Todd Broch <tbroch@chromium.org> BRANCH=samus BUG=chrome-os-partner:34489 TEST=compiles, saves ~200bytes Change-Id: I72493618af0884936c8e634fa7d52b7ecc4ab4a4 Reviewed-on: https://chromium-review.googlesource.com/241019 Reviewed-by: Alec Berg <alecaberg@chromium.org> Tested-by: Todd Broch <tbroch@chromium.org>
-rw-r--r--common/usb_pd_protocol.c9
-rw-r--r--include/config.h1
2 files changed, 9 insertions, 1 deletions
diff --git a/common/usb_pd_protocol.c b/common/usb_pd_protocol.c
index 1e34b57e5b..5ec8fea6ec 100644
--- a/common/usb_pd_protocol.c
+++ b/common/usb_pd_protocol.c
@@ -1526,6 +1526,7 @@ static void pd_vdm_send_state_machine(int port)
}
}
+#ifdef CONFIG_CMD_PD_DEV_DUMP_INFO
static inline void pd_dev_dump_info(uint16_t dev_id, uint8_t *hash)
{
int j;
@@ -1537,14 +1538,17 @@ static inline void pd_dev_dump_info(uint16_t dev_id, uint8_t *hash)
}
ccprintf("\n");
}
+#endif /* CONFIG_CMD_PD_DEV_DUMP_INFO */
void pd_dev_store_rw_hash(int port, uint16_t dev_id, uint32_t *rw_hash,
uint32_t current_image)
{
pd[port].dev_id = dev_id;
memcpy(pd[port].dev_rw_hash, rw_hash, PD_RW_HASH_SIZE);
+#ifdef CONFIG_CMD_PD_DEV_DUMP_INFO
if (debug_level >= 1)
pd_dev_dump_info(dev_id, (uint8_t *)rw_hash);
+#endif
pd[port].current_image = current_image;
}
@@ -2966,7 +2970,9 @@ static int command_pd(int argc, char **argv)
pd_comm_enable(enable);
ccprintf("Ports %s\n", enable ? "enabled" : "disabled");
return EC_SUCCESS;
- } else if (!strncasecmp(argv[1], "rwhashtable", 3)) {
+ }
+#ifdef CONFIG_CMD_PD_DEV_DUMP_INFO
+ else if (!strncasecmp(argv[1], "rwhashtable", 3)) {
int i;
struct ec_params_usb_pd_rw_hash_entry *p;
for (i = 0; i < RW_HASH_ENTRIES; i++) {
@@ -2975,6 +2981,7 @@ static int command_pd(int argc, char **argv)
}
return EC_SUCCESS;
}
+#endif /* CONFIG_CMD_PD_DEV_DUMP_INFO */
#endif
/* command: pd <port> <subcmd> [args] */
diff --git a/include/config.h b/include/config.h
index 529e4134d1..7d2bca04d9 100644
--- a/include/config.h
+++ b/include/config.h
@@ -346,6 +346,7 @@
#undef CONFIG_CMD_ILIM
#undef CONFIG_CMD_JUMPTAGS
#define CONFIG_CMD_PD
+#undef CONFIG_CMD_PD_DEV_DUMP_INFO
#undef CONFIG_CMD_PD_FLASH
#undef CONFIG_CMD_PLL
#undef CONFIG_CMD_PMU