diff options
author | Todd Broch <tbroch@chromium.org> | 2014-11-19 15:45:57 -0800 |
---|---|---|
committer | chrome-internal-fetch <chrome-internal-fetch@google.com> | 2014-12-02 01:57:18 +0000 |
commit | 01047f65240a1ba333372f53c28f8281cbb7cf1f (patch) | |
tree | 831f5e0055ac470570285480847b340a978490c6 /board | |
parent | 63277d145b933325fcac9a1daecc39de0a86e4bc (diff) | |
download | chrome-ec-01047f65240a1ba333372f53c28f8281cbb7cf1f.tar.gz |
pd: ectool: Expose device id major & minor.
Also unifies other console output of same field.
Signed-off-by: Todd Broch <tbroch@chromium.org>
BRANCH=samus
BUG=chrome-os-partner:32650
TEST=manual
# connect zinger to port 1 on samus
ectool --name cros_pd infopddev 1
Before:
Port:1 Device:1025 Hash: 0x3f34bc13 0xf8d15d12 0xf81f03cf 0xba3a3db6 0x0152a520
Port:1 ptype:5 vid:0x18d1 pid:0x5012
After:
Port:1 DevId:1.1 Hash: 0x3f34bc13 0xf8d15d12 0xf81f03cf 0xba3a3db6 0x0152a520
Port:1 ptype:5 vid:0x18d1 pid:0x5012
Change-Id: I4e7ac56354e92ea3bc54a2c6ab5746399abdefe5
Reviewed-on: https://chromium-review.googlesource.com/231832
Reviewed-by: Alec Berg <alecaberg@chromium.org>
Commit-Queue: Todd Broch <tbroch@chromium.org>
Tested-by: Todd Broch <tbroch@chromium.org>
Diffstat (limited to 'board')
-rw-r--r-- | board/fruitpie/usb_pd_policy.c | 8 | ||||
-rw-r--r-- | board/ryu_p1/usb_pd_policy.c | 4 | ||||
-rw-r--r-- | board/samus_pd/usb_pd_policy.c | 4 |
3 files changed, 11 insertions, 5 deletions
diff --git a/board/fruitpie/usb_pd_policy.c b/board/fruitpie/usb_pd_policy.c index 52adce5677..0958781422 100644 --- a/board/fruitpie/usb_pd_policy.c +++ b/board/fruitpie/usb_pd_policy.c @@ -198,9 +198,11 @@ static int pd_custom_vdm(int port, int cnt, uint32_t *payload, /* if last word is present, it contains lots of info */ if (cnt == 7) { dev_id = VDO_INFO_HW_DEV_ID(payload[6]); - CPRINTF("Dev:0x%04x SW:%d RW:%d\n", dev_id, - VDO_INFO_SW_DBG_VER(payload[6]), - VDO_INFO_IS_RW(payload[6])); + CPRINTF("DevId:%d.%d SW:%d RW:%d\n", + HW_DEV_ID_MAJ(dev_id), + HW_DEV_ID_MIN(dev_id), + VDO_INFO_SW_DBG_VER(payload[6]), + VDO_INFO_IS_RW(payload[6])); } /* copy hash */ if (cnt >= 6) diff --git a/board/ryu_p1/usb_pd_policy.c b/board/ryu_p1/usb_pd_policy.c index d98d17c11c..918e4305c6 100644 --- a/board/ryu_p1/usb_pd_policy.c +++ b/board/ryu_p1/usb_pd_policy.c @@ -210,7 +210,9 @@ static int pd_custom_vdm(int port, int cnt, uint32_t *payload, if (cnt == 7) { /* TODO: Notify host */ dev_id = VDO_INFO_HW_DEV_ID(payload[6]); - CPRINTF("Dev:0x%04x SW:%d RW:%d\n", dev_id, + CPRINTF("DevId:%d.%d SW:%d RW:%d\n", + HW_DEV_ID_MAJ(dev_id), + HW_DEV_ID_MIN(dev_id), VDO_INFO_SW_DBG_VER(payload[6]), VDO_INFO_IS_RW(payload[6])); } diff --git a/board/samus_pd/usb_pd_policy.c b/board/samus_pd/usb_pd_policy.c index b87c880ded..8646433734 100644 --- a/board/samus_pd/usb_pd_policy.c +++ b/board/samus_pd/usb_pd_policy.c @@ -268,7 +268,9 @@ static int pd_custom_vdm(int port, int cnt, uint32_t *payload, pd_dev_store_rw_hash(port, dev_id, payload + 1); pd_send_host_event(PD_EVENT_UPDATE_DEVICE); - CPRINTF("Dev:0x%04x SW:%d RW:%d\n", dev_id, + CPRINTF("DevId:%d.%d SW:%d RW:%d\n", + HW_DEV_ID_MAJ(dev_id), + HW_DEV_ID_MIN(dev_id), VDO_INFO_SW_DBG_VER(payload[6]), VDO_INFO_IS_RW(payload[6])); } else if (cnt == 6) { |