diff options
author | Randall Spangler <rspangler@chromium.org> | 2013-10-31 11:54:55 -0700 |
---|---|---|
committer | chrome-internal-fetch <chrome-internal-fetch@google.com> | 2013-11-01 17:13:07 +0000 |
commit | 760ace07a5cc4b7dc5e8f2ec59068a84562be162 (patch) | |
tree | c229d8e33f43c002b5a36de13becf639b4e12b27 | |
parent | fa13ac76b10847e133d654654f0a9418f87d11fb (diff) | |
download | chrome-ec-760ace07a5cc4b7dc5e8f2ec59068a84562be162.tar.gz |
cleanup: Improve / remove more TODO comments
Add bug references. Remove one assert that can no longer be triggered.
BUG=chrome-os-partner:18343
BRANCH=none
TEST=build all boards; pass unit tests
Change-Id: I3f4d2e4f2f3343a8d0531cb0715d151eaa4d0b50
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/175293
Reviewed-by: Bill Richardson <wfrichar@chromium.org>
-rw-r--r-- | chip/lm4/openocd/lm4x.cfg | 5 | ||||
-rw-r--r-- | chip/stm32/i2c-stm32f.c | 11 | ||||
-rw-r--r-- | chip/stm32/system.c | 6 | ||||
-rw-r--r-- | common/flash.c | 6 | ||||
-rw-r--r-- | core/cortex-m/panic.c | 13 | ||||
-rw-r--r-- | include/config.h | 6 |
6 files changed, 25 insertions, 22 deletions
diff --git a/chip/lm4/openocd/lm4x.cfg b/chip/lm4/openocd/lm4x.cfg index 9c979c7dda..b3f18a0107 100644 --- a/chip/lm4/openocd/lm4x.cfg +++ b/chip/lm4/openocd/lm4x.cfg @@ -1,4 +1,4 @@ -# Script for TI/Luminary Stellaris LM4F232H (LM4F232H5BB) +# Script for TI/Luminary Stellaris LM4F232H (LM4F232H5BB) and TM4E1G31H6ZRB. if { [info exists CHIPNAME] } { set _CHIPNAME $CHIPNAME @@ -15,11 +15,10 @@ if { [info exists CPUTAPID ] } { #jtag scan chain jtag newtap $_CHIPNAME cpu -irlen 4 -ircapture 1 -irmask 0xf -expected-id $_CPUTAPID -# the luminary variant causes a software reset rather than asserting SRST +# the lm3s luminary variant causes a software reset rather than asserting SRST # this stops the debug registers from being cleared # this will be fixed in later revisions of silicon set _TARGETNAME $_CHIPNAME.cpu -# TODO(rspangler): variant lm4x? target create $_TARGETNAME cortex_m3 -chain-position $_CHIPNAME.cpu -variant lm3s # 8k working area at base of ram, not backed up diff --git a/chip/stm32/i2c-stm32f.c b/chip/stm32/i2c-stm32f.c index 59f957279d..29d88b5660 100644 --- a/chip/stm32/i2c-stm32f.c +++ b/chip/stm32/i2c-stm32f.c @@ -223,9 +223,9 @@ static void i2c_process_command(void) /* * Old style (version 1) command. * - * TODO(rspangler): Nothing sends these anymore, since this was - * superseded by version 2 before snow launched. This code - * should be safe to remove. + * TODO(crosbug.com/p/23765): Nothing sends these anymore, + * since this was superseded by version 2 before snow launched. + * This code should be safe to remove. */ args->version = 0; args->params_size = EC_PROTO2_MAX_PARAM_SIZE; /* unknown */ @@ -486,7 +486,10 @@ static void i2c_init_port(unsigned int port) static void i2c_init(void) { - /* TODO: Add #defines to determine which channels to init */ + /* + * TODO(crosbug.com/p/23763): Add config options to determine which + * channels to init. + */ i2c_init_port(I2C1); i2c_init_port(I2C2); diff --git a/chip/stm32/system.c b/chip/stm32/system.c index 746cbd8001..41d47218fa 100644 --- a/chip/stm32/system.c +++ b/chip/stm32/system.c @@ -182,12 +182,6 @@ void system_reset(int flags) /* Disable interrupts to avoid task swaps during reboot */ interrupt_disable(); - /* - * TODO: Check if a collision between reset flags and fake wp occurred. - * Remove this when we have real write protect pin. - */ - ASSERT(!(system_get_reset_flags() & 0x8000)); - /* Save current reset reasons if necessary */ if (flags & SYSTEM_RESET_PRESERVE_FLAGS) save_flags = system_get_reset_flags() | RESET_FLAG_PRESERVED; diff --git a/common/flash.c b/common/flash.c index c2773f6dd0..2c613493bf 100644 --- a/common/flash.c +++ b/common/flash.c @@ -628,8 +628,10 @@ static int flash_command_protect(struct host_cmd_handler_args *args) #ifdef CHIP_FAMILY_stm32f /* - * TODO: ignore all-now on STM32F if WP isn't asserted; this is left - * over from limitations in early snow. + * TODO(crosbug.com/p/23762): Should ignore all-now on STM32F if WP + * isn't asserted. We don't do this due to limitations in early snow + * boards (lack of WP GPIO?) - in which case, this can either be + * restricted to BOARD_snow, or removed entirely. */ r->valid_flags |= EC_FLASH_PROTECT_ALL_NOW; r->writable_flags |= EC_FLASH_PROTECT_ALL_NOW; diff --git a/core/cortex-m/panic.c b/core/cortex-m/panic.c index 9e82f241d0..310a9d5a53 100644 --- a/core/cortex-m/panic.c +++ b/core/cortex-m/panic.c @@ -402,14 +402,19 @@ void report_panic(void) panic_print(pdata); #ifdef CONFIG_DEBUG_EXCEPTIONS panic_show_process_stack(pdata); - /* TODO: Dump main stack contents as well if the exception happened - * in a handler's context. */ + /* + * TODO(crosbug.com/p/23760): Dump main stack contents as well if the + * exception happened in a handler's context. + */ #endif panic_reboot(); } -/* Default exception handler, which reports a panic. - * Naked call so we can extract raw LR and IPSR. */ +/** + * Default exception handler, which reports a panic. + * + * Declare this as a naked call so we can extract raw LR and IPSR values. + */ void exception_panic(void) __attribute__((naked)); void exception_panic(void) { diff --git a/include/config.h b/include/config.h index e53cc301e4..32bb725e11 100644 --- a/include/config.h +++ b/include/config.h @@ -31,9 +31,9 @@ * may override this by #undef'ing them in config_chip.h or board.h, * respectively. * - * TODO(rspangler): describe all of these. Also describe the HAS_TASK_* macro - * and how/when it should be used vs. a config define. And BOARD_*, CHIP_*, - * and CHIP_FAMILY_*. + * TODO(crosbug.com/p/23758): Describe all of these. Also describe the + * HAS_TASK_* macro and how/when it should be used vs. a config define. And + * BOARD_*, CHIP_*, and CHIP_FAMILY_*. */ /* Compile chip support for analog-to-digital convertor */ |