diff options
author | Daisuke Nojiri <dnojiri@chromium.org> | 2019-05-06 14:59:18 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2019-05-08 19:35:13 -0700 |
commit | 608e6a4ca4a8cb46004db986f8b71c81b99b7786 (patch) | |
tree | 1f88183f53197ac59c3ba1f464d728b772feabfe /core | |
parent | aa0cdc32ba82a0d0a699c4f06d78a589f7c58aa1 (diff) | |
download | chrome-ec-608e6a4ca4a8cb46004db986f8b71c81b99b7786.tar.gz |
USB-PD: Add hook for PD connect event
This patch adds a hook for USB PD connect event.
Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org>
BUG=b/127228934
BRANCH=none
TEST=buildall. Verify a hook is called on BC12 charger connection.
Change-Id: I88fcd65d1afce07b6275398c5d0b902ecd7a44a3
Reviewed-on: https://chromium-review.googlesource.com/1597794
Commit-Ready: Daisuke Nojiri <dnojiri@chromium.org>
Tested-by: Daisuke Nojiri <dnojiri@chromium.org>
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
Diffstat (limited to 'core')
-rw-r--r-- | core/cortex-m/ec.lds.S | 4 | ||||
-rw-r--r-- | core/cortex-m0/ec.lds.S | 4 | ||||
-rw-r--r-- | core/host/host_exe.lds | 4 | ||||
-rw-r--r-- | core/minute-ia/ec.lds.S | 10 | ||||
-rw-r--r-- | core/nds32/ec.lds.S | 4 |
5 files changed, 23 insertions, 3 deletions
diff --git a/core/cortex-m/ec.lds.S b/core/cortex-m/ec.lds.S index 2b6d39c060..1d759cf843 100644 --- a/core/cortex-m/ec.lds.S +++ b/core/cortex-m/ec.lds.S @@ -244,6 +244,10 @@ SECTIONS KEEP(*(.rodata.HOOK_USB_PD_DISCONNECT)) __hooks_usb_pd_disconnect_end = .; + __hooks_usb_pd_connect = .; + KEEP(*(.rodata.HOOK_USB_PD_CONNECT)) + __hooks_usb_pd_connect_end = .; + __deferred_funcs = .; KEEP(*(.rodata.deferred)) __deferred_funcs_end = .; diff --git a/core/cortex-m0/ec.lds.S b/core/cortex-m0/ec.lds.S index da6444dd14..fe356b8dc7 100644 --- a/core/cortex-m0/ec.lds.S +++ b/core/cortex-m0/ec.lds.S @@ -162,6 +162,10 @@ SECTIONS KEEP(*(.rodata.HOOK_USB_PD_DISCONNECT)) __hooks_usb_pd_disconnect_end = .; + __hooks_usb_pd_connect = .; + KEEP(*(.rodata.HOOK_USB_PD_CONNECT)) + __hooks_usb_pd_connect_end = .; + __deferred_funcs = .; KEEP(*(.rodata.deferred)) __deferred_funcs_end = .; diff --git a/core/host/host_exe.lds b/core/host/host_exe.lds index f4e72ec0d7..792ab36685 100644 --- a/core/host/host_exe.lds +++ b/core/host/host_exe.lds @@ -101,6 +101,10 @@ SECTIONS { *(.rodata.HOOK_USB_PD_DISCONNECT) __hooks_usb_pd_disconnect_end = .; + __hooks_usb_pd_connect = .; + KEEP(*(.rodata.HOOK_USB_PD_CONNECT)) + __hooks_usb_pd_connect_end = .; + __deferred_funcs = .; *(.rodata.deferred) __deferred_funcs_end = .; diff --git a/core/minute-ia/ec.lds.S b/core/minute-ia/ec.lds.S index 8087f7ce01..55102d5ae5 100644 --- a/core/minute-ia/ec.lds.S +++ b/core/minute-ia/ec.lds.S @@ -130,9 +130,13 @@ SECTIONS KEEP(*(.rodata.HOOK_SECOND)) __hooks_second_end = .; - __hooks_usb_pd_disconnect = .; - KEEP(*(.rodata.HOOK_USB_PD_DISCONNECT)) - __hooks_usb_pd_disconnect_end = .; + __hooks_usb_pd_disconnect = .; + KEEP(*(.rodata.HOOK_USB_PD_DISCONNECT)) + __hooks_usb_pd_disconnect_end = .; + + __hooks_usb_pd_connect = .; + KEEP(*(.rodata.HOOK_USB_PD_CONNECT)) + __hooks_usb_pd_connect_end = .; __deferred_funcs = .; KEEP(*(.rodata.deferred)) diff --git a/core/nds32/ec.lds.S b/core/nds32/ec.lds.S index bb115ed8df..751c2dc676 100644 --- a/core/nds32/ec.lds.S +++ b/core/nds32/ec.lds.S @@ -160,6 +160,10 @@ SECTIONS KEEP(*(.rodata.HOOK_USB_PD_DISCONNECT)) __hooks_usb_pd_disconnect_end = .; + __hooks_usb_pd_connect = .; + KEEP(*(.rodata.HOOK_USB_PD_CONNECT)) + __hooks_usb_pd_connect_end = .; + __deferred_funcs = .; KEEP(*(.rodata.deferred)) __deferred_funcs_end = .; |