mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-10 09:31:51 +00:00
pd: remove PD remote flashing console command by default.
Add config option, CONFIG_CMD_PD_FLASH, and undef by default. This subcmd in the 'pd' command is large (500 bytes) and can be performed from host via ectool. Additionally the python script, util/flash_pd.py, is likely outdated or needs adjustments for various timing related nuances. Note, as flash command contained subcmd 'version' have added that under 'pd <port> vdm vers' to keep that functionality by default. Signed-off-by: Todd Broch <tbroch@chromium.org> BRANCH=samus BUG=chrome-os-partner:34489 TEST=manual, run 'pd 1 flash signature' get 'parameter 1 invalid' run 'pd 1 vdm vers' w/ zinger in port 1 see version string returned. Change-Id: If282933c1d29febb43b5cf476a121be6b5a1071b Reviewed-on: https://chromium-review.googlesource.com/238291 Reviewed-by: Alec Berg <alecaberg@chromium.org> Commit-Queue: Todd Broch <tbroch@chromium.org> Tested-by: Todd Broch <tbroch@chromium.org>
This commit is contained in:
committed by
ChromeOS Commit Bot
parent
20cf373463
commit
7121b003d6
@@ -2451,7 +2451,7 @@ void pd_set_suspend(int port, int enable)
|
||||
task_wake(PORT_TO_TASK_ID(port));
|
||||
}
|
||||
|
||||
#ifdef CONFIG_CMD_PD
|
||||
#if defined(CONFIG_CMD_PD) && defined(CONFIG_CMD_PD_FLASH)
|
||||
static int hex8tou32(char *str, uint32_t *val)
|
||||
{
|
||||
char *ptr = str;
|
||||
@@ -2527,7 +2527,7 @@ static int remote_flashing(int argc, char **argv)
|
||||
ccprintf("DONE %d\n", pd[port].vdm_state);
|
||||
return EC_SUCCESS;
|
||||
}
|
||||
#endif
|
||||
#endif /* defined(CONFIG_CMD_PD) && defined(CONFIG_CMD_PD_FLASH) */
|
||||
|
||||
#if defined(CONFIG_USB_PD_ALT_MODE) && !defined(CONFIG_USB_PD_ALT_MODE_DFP)
|
||||
void pd_send_hpd(int port, enum hpd_event hpd)
|
||||
@@ -2739,11 +2739,16 @@ static int command_pd(int argc, char **argv)
|
||||
} else if (!strncasecmp(argv[3], "curr", 4)) {
|
||||
pd_send_vdm(port, USB_VID_GOOGLE, VDO_CMD_CURRENT,
|
||||
NULL, 0);
|
||||
} else if (!strncasecmp(argv[3], "vers", 4)) {
|
||||
pd_send_vdm(port, USB_VID_GOOGLE, VDO_CMD_VERSION,
|
||||
NULL, 0);
|
||||
} else {
|
||||
return EC_ERROR_PARAM_COUNT;
|
||||
}
|
||||
#if defined(CONFIG_CMD_PD) && defined(CONFIG_CMD_PD_FLASH)
|
||||
} else if (!strncasecmp(argv[2], "flash", 4)) {
|
||||
return remote_flashing(argc, argv);
|
||||
#endif
|
||||
} else
|
||||
#endif
|
||||
if (!strncasecmp(argv[2], "state", 5)) {
|
||||
@@ -2793,7 +2798,7 @@ DECLARE_CONSOLE_COMMAND(pd, command_pd,
|
||||
"dualrole|dump|enable [0|1]|rwhashtable|\n\t<port> "
|
||||
"[tx|bist|charger|clock|dev"
|
||||
"|soft|hash|hard|ping|state|swap [power|data]|"
|
||||
"vdm [ping | curr]]",
|
||||
"vdm [ping | curr | vers]]",
|
||||
"USB PD",
|
||||
NULL);
|
||||
|
||||
|
||||
@@ -332,6 +332,7 @@
|
||||
#undef CONFIG_CMD_ILIM
|
||||
#undef CONFIG_CMD_JUMPTAGS
|
||||
#define CONFIG_CMD_PD
|
||||
#undef CONFIG_CMD_PD_FLASH
|
||||
#undef CONFIG_CMD_PLL
|
||||
#undef CONFIG_CMD_PMU
|
||||
#define CONFIG_CMD_POWER_AP
|
||||
|
||||
Reference in New Issue
Block a user