diff options
author | Dino Li <Dino.Li@ite.com.tw> | 2017-06-29 15:37:33 +0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2017-06-29 22:01:13 -0700 |
commit | dc53959997a0ae25ea96d3ce89822305882efbf0 (patch) | |
tree | 4a8accf0a990d6784d25c0b5f500d3a6f60eb3cb /chip/it83xx/registers.h | |
parent | a48908f07aaa6b9c913c31319e26573ca3e4690e (diff) | |
download | chrome-ec-dc53959997a0ae25ea96d3ce89822305882efbf0.tar.gz |
tcpm: it83xx: Use pd common code macro to analyze message header
Use existed macro instead of creating new one.
BRANCH=none
BUG=none
TEST=plug USB-C power adapter and USB-C to hdmi adapter, both work.
Change-Id: I133142232ac6abfa7f285c289eb03c4d65e84d5f
Signed-off-by: Dino Li <Dino.Li@ite.com.tw>
Reviewed-on: https://chromium-review.googlesource.com/554655
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Diffstat (limited to 'chip/it83xx/registers.h')
-rw-r--r-- | chip/it83xx/registers.h | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/chip/it83xx/registers.h b/chip/it83xx/registers.h index b4b6be3741..adda028dd9 100644 --- a/chip/it83xx/registers.h +++ b/chip/it83xx/registers.h @@ -1213,15 +1213,13 @@ enum i2c_channels { #define IT83XX_USBPD_PEFSMR(p) REG8(IT83XX_USBPD_BASE(p)+0x1D) #define IT83XX_USBPD_PES0R(p) REG8(IT83XX_USBPD_BASE(p)+0x1E) #define IT83XX_USBPD_PES1R(p) REG8(IT83XX_USBPD_BASE(p)+0x1F) -#define IT83XX_USBPD_TDO_BASE(p) (IT83XX_USBPD_BASE(p)+0x20) +#define IT83XX_USBPD_TDO(p) REG32(IT83XX_USBPD_BASE(p)+0x20) #define IT83XX_USBPD_AGTMHLR(p) REG8(IT83XX_USBPD_BASE(p)+0x3C) #define IT83XX_USBPD_AGTMHHR(p) REG8(IT83XX_USBPD_BASE(p)+0x3D) #define IT83XX_USBPD_TMHLR(p) REG8(IT83XX_USBPD_BASE(p)+0x3E) #define IT83XX_USBPD_TMHHR(p) REG8(IT83XX_USBPD_BASE(p)+0x3F) -#define IT83XX_USBPD_RDO_BASE(p) (IT83XX_USBPD_BASE(p)+0x40) -#define IT83XX_USBPD_RMH_BASE(p) (IT83XX_USBPD_BASE(p)+0x5E) -#define IT83XX_USBPD_RMHLR(p) REG8(IT83XX_USBPD_BASE(p)+0x5E) -#define IT83XX_USBPD_RMHHR(p) REG8(IT83XX_USBPD_BASE(p)+0x5F) +#define IT83XX_USBPD_RDO0(p) REG32(IT83XX_USBPD_BASE(p)+0x40) +#define IT83XX_USBPD_RMH(p) REG16(IT83XX_USBPD_BASE(p)+0x5E) #define IT83XX_USBPD_CCPSR0(p) REG8(IT83XX_USBPD_BASE(p)+0x60) #define IT83XX_USBPD_BMCSR(p) REG8(IT83XX_USBPD_BASE(p)+0x64) #define IT83XX_USBPD_PDMHSR(p) REG8(IT83XX_USBPD_BASE(p)+0x65) |