summaryrefslogtreecommitdiff
path: root/chip/lm4/lpc.c
diff options
context:
space:
mode:
authorRandall Spangler <rspangler@chromium.org>2013-10-22 13:39:29 -0700
committerRandall Spangler <rspangler@chromium.org>2013-10-22 22:23:53 +0000
commit9ccd9668a21d335fd81665c65aa56d3d5e91775e (patch)
tree8586ccbe968c75e22ee11ed239516d43b2857f1a /chip/lm4/lpc.c
parent7f3ca9fb659c85e046bfef8a794fc03111fd63c5 (diff)
downloadchrome-ec-9ccd9668a21d335fd81665c65aa56d3d5e91775e.tar.gz
cleanup: update comments with existing bug numbers
Some of the comments no longer apply. Others needed more info. No code changes; just comment changes. BUG=none BRANCH=none TEST=build all platforms Change-Id: I1d52aa9a98427a78c9d9a8cf44934fb04c3c00c8 Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/174084 Reviewed-by: Bill Richardson <wfrichar@chromium.org>
Diffstat (limited to 'chip/lm4/lpc.c')
-rw-r--r--chip/lm4/lpc.c22
1 files changed, 4 insertions, 18 deletions
diff --git a/chip/lm4/lpc.c b/chip/lm4/lpc.c
index 8f24bb2ed2..587c79c22a 100644
--- a/chip/lm4/lpc.c
+++ b/chip/lm4/lpc.c
@@ -208,17 +208,10 @@ static void lpc_send_response(struct host_cmd_handler_args *args)
if (size > EC_PROTO2_MAX_PARAM_SIZE)
args->result = EC_RES_INVALID_RESPONSE;
- /*
- * Write result to the data byte. This sets the TOH bit in the
- * status byte and triggers an IRQ on the host so the host can read
- * the result.
- *
- * TODO: (crosbug.com/p/7496) or it would, if we actually set up host
- * IRQs
- */
+ /* Write result to the data byte. This sets the TOH status bit. */
LPC_POOL_CMD[1] = args->result;
- /* Clear the busy bit */
+ /* Clear the busy bit, so the host knows the EC is done. */
task_disable_irq(LM4_IRQ_LPC);
LM4_LPC_ST(LPC_CH_CMD) &= ~LM4_LPC_ST_BUSY;
task_enable_irq(LM4_IRQ_LPC);
@@ -230,17 +223,10 @@ static void lpc_send_response_packet(struct host_packet *pkt)
if (pkt->driver_result == EC_RES_IN_PROGRESS)
return;
- /*
- * Write result to the data byte. This sets the TOH bit in the
- * status byte and triggers an IRQ on the host so the host can read
- * the result.
- *
- * TODO: (crosbug.com/p/7496) or it would, if we actually set up host
- * IRQs
- */
+ /* Write result to the data byte. This sets the TOH status bit. */
LPC_POOL_CMD[1] = pkt->driver_result;
- /* Clear the busy bit */
+ /* Clear the busy bit, so the host knows the EC is done. */
task_disable_irq(LM4_IRQ_LPC);
LM4_LPC_ST(LPC_CH_CMD) &= ~LM4_LPC_ST_BUSY;
task_enable_irq(LM4_IRQ_LPC);