Commit Graph

4 Commits

Author SHA1 Message Date
Vic Yang
ffac23c0ea Add cprints() and ccprints()
Our code base contains a lot of debug messages in this pattern:
  CPRINTF("[%T xxx]\n") or ccprintf("[%T xxx]\n")
The strings are taking up spaces in the EC binaries, so let's refactor
this by adding cprints() and ccprints().

cprints() is just like cprintf(), except that it adds the brackets
and the timestamp. ccprints() is equivalent to cprints(CC_CONSOLE, ...)

This saves us hundreds of bytes in EC binaries.

BUG=chromium:374575
TEST=Build and check flash size
BRANCH=None

Change-Id: Ifafe8dc1b80e698b28ed42b70518c7917b49ee51
Signed-off-by: Vic Yang <victoryang@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/200490
Reviewed-by: Randall Spangler <rspangler@chromium.org>
2014-05-21 20:32:17 +00:00
Randall Spangler
3266ae6a7e cleanup: Even more TODO comments
Update comments with more info, or remove if no longer applicable.

No code changes.

BUG=chrome-os-partner:18343
BRANCH=none
TEST=build all platforms; pass unit tests

Change-Id: I5b56eeb500bc0f00e84e91ef99684f4b1b310972
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/175418
Reviewed-by: Bill Richardson <wfrichar@chromium.org>
2013-11-01 20:07:24 +00:00
Randall Spangler
a617846582 Make support for dedicated recovery GPIO signal optional
switch.c currently assumes that all boards have GPIO_RECOVERY_L.  This
is not true for Rambi, and also isn't true for ARM boards (which
should also eventually use the common switch implementation).

Add a new CONFIG_SWITCH_DEDICATED_RECOVERY option to control whether
to compile this support.

BUG=chrome-os-partner:22893
BRANCH=none
TEST=compile all boards; pass unit tests

Change-Id: If6f34d1afd580c9d79a8edcdda18833068e70f66
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/170489
Reviewed-by: Bill Richardson <wfrichar@chromium.org>
2013-09-25 01:23:29 +00:00
Randall Spangler
df79191f84 Move switch module from chip/lm4 to common
There's nothing LM4-specific about the switch module; it's just
checking GPIOs and updating a memory-mapped register.

No code changes; just moving a file.

BUG=chrome-os-partner:18343
BRANCH=none
TEST=verify switch.c is compiled for link and falco, but not pit or spring

Change-Id: I186f3aac1405c7ba8d94b47bb2586c2ad191daba
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/61930
2013-07-17 10:49:48 -07:00