summaryrefslogtreecommitdiff
path: root/baseboard/grunt
diff options
context:
space:
mode:
authorDenis Brockus <dbrockus@chromium.org>2020-01-15 07:41:55 -0700
committerCommit Bot <commit-bot@chromium.org>2020-01-16 00:57:30 +0000
commitc5c198a95c5975a0f0555c1a005abbd0ad5e4902 (patch)
tree75b6ba27ed0b27e51840612b4b320250bb311aee /baseboard/grunt
parent0dbd7e342cdc20d6fc7324da9440f837e87d8cf8 (diff)
downloadchrome-ec-c5c198a95c5975a0f0555c1a005abbd0ad5e4902.tar.gz
usbc: hpd_deadline cleanup
some of the usages of this static variable were used in overridable functions and they also had their own static variable for this same purpose. Since it is not required to override all of the functions, this left two variables out of sync with one another. So made them the same variable. BUG=b:147535104 BRANCH=none TEST=make buildall -j Change-Id: Ic560d3a2a2e129450e918e0cb6dfff75fd1222a2 Signed-off-by: Denis Brockus <dbrockus@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2002953 Reviewed-by: Jett Rink <jettrink@chromium.org> Reviewed-by: Edward Hill <ecgh@chromium.org>
Diffstat (limited to 'baseboard/grunt')
-rw-r--r--baseboard/grunt/usb_pd_policy.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/baseboard/grunt/usb_pd_policy.c b/baseboard/grunt/usb_pd_policy.c
index cb587a1b84..9ec482c750 100644
--- a/baseboard/grunt/usb_pd_policy.c
+++ b/baseboard/grunt/usb_pd_policy.c
@@ -125,12 +125,6 @@ __override int svdm_dp_config(int port, uint32_t *payload)
return 2;
};
-/*
- * timestamp of the next possible toggle to ensure the 2-ms spacing
- * between IRQ_HPD.
- */
-static uint64_t hpd_deadline[CONFIG_USB_PD_PORT_MAX_COUNT];
-
#define PORT_TO_HPD(port) ((port) ? GPIO_USB_C1_DP_HPD : GPIO_USB_C0_DP_HPD)
__override void svdm_dp_post_config(int port)
{
@@ -148,7 +142,7 @@ __override void svdm_dp_post_config(int port)
gpio_set_level(PORT_TO_HPD(port), 1);
/* set the minimum time delay (2ms) for the next HPD IRQ */
- hpd_deadline[port] = get_time().val + HPD_USTREAM_DEBOUNCE_LVL;
+ svdm_hpd_deadline[port] = get_time().val + HPD_USTREAM_DEBOUNCE_LVL;
mux->hpd_update(port, 1, 0);
}