diff options
author | Simon Glass <sjg@chromium.org> | 2016-06-19 16:06:40 -0600 |
---|---|---|
committer | Martin Roth <martinroth@google.com> | 2016-06-24 20:52:03 +0200 |
commit | fe0dd6fc93e9e89e2a3324354dafdfb9cdb31b6c (patch) | |
tree | b5bac2bb2391eb3e5844eead7d4e4027c4daabfe /src/mainboard/google/gru | |
parent | 850e45f19f498eedd80da4a97a5ce641e2cec6d5 (diff) | |
download | coreboot-fe0dd6fc93e9e89e2a3324354dafdfb9cdb31b6c.tar.xz |
gru: Add get_developer_mode_switch()
Add this function and make it return 0, as there is no physical dev switch
(at least I think this is what we are supposed to do).
This is needed for elog to work, which is needed so we can test RTC
properly.
BUG=chrome-os-partner:52220
BRANCH=none
TEST=boot on gru with CONFIG_ELOG_DEBUG enabled and see elog messages:
elog_init()
SF: Detected W25Q64 with sector size 0x1000, total 0x800000
elog_find_flash()
FMAP: area RW_ELOG found @ 5d8000 (32768 bytes)
elog_scan_flash()
elog_is_buffer_clear(base=0x000000000031d668 size=4096)
ELOG: flash area invalid
elog_flash_erase(address=0x000000000031d668 offset=0x005d8000 size=4096)
SF: Successfully erased 4096 bytes @ 0x5d8000
elog_prepare_empty()
elog_flash_write(address=0x000000000031d668 offset=0x005d8000 size=8)
elog_scan_flash()
elog_is_buffer_clear(base=0x000000000031d668 size=4096)
elog_is_header_valid()
elog_update_event_buffer_state()
elog_is_buffer_clear(base=0x000000000031d670 size=4088)
elog_is_area_valid()
ELOG: FLASH @0x000000000031d668 [SPI 0x005d8000]
ELOG: area is 4096 bytes, full threshold 3834, shrink size 1024
elog_add_event_raw(type=16)
out: cmd=0x44: 03 b9 44 00 00 00 00 00
in-header: 03 3f 00 00 04 00 00 00
in-data: 6e 4c 00 00
elog_flash_write(address=0x000000000031d670 offset=0x005d8008 size=11)
ELOG: Event(16) added with size 11
elog_add_event_raw(type=17)
out: cmd=0x44: 03 b9 44 00 00 00 00 00
in-header: 03 3f 00 00 04 00 00 00
in-data: 6e 4c 00 00
elog_flash_write(address=0x000000000031d67b offset=0x005d8013 size=13)
ELOG: Event(17) added with size 13
elog_add_event_raw(type=A0)
out: cmd=0x44: 03 b9 44 00 00 00 00 00
in-header: 03 3f 00 00 04 00 00 00
in-data: 6e 4c 00 00
elog_flash_write(address=0x000000000031d688 offset=0x005d8020 size=9)
ELOG: Event(A0) added with size 9
elog_add_boot_reason: Logged dev mode boot
I can't actually see the timestamp, but the EC traffic is visible.
Change-Id: I82bcf296dce4f4d146edf90b23bfae955fbe9e3a
Signed-off-by: Martin Roth <martinroth@chromium.org>
Original-Commit-Id: ffc7a7e0e7b136144d2a0b2ed21a543eafee49fa
Original-Change-Id: I1489c6b874cc49495635aec0bf303f7098455716
Original-Signed-off-by: Simon Glass <sjg@chromium.org>
Original-Reviewed-on: https://chromium-review.googlesource.com/353821
Original-Commit-Ready: Vadim Bendebury <vbendeb@chromium.org>
Original-Tested-by: Vadim Bendebury <vbendeb@chromium.org>
Original-Reviewed-by: Duncan Laurie <dlaurie@google.com>
Original-Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: https://review.coreboot.org/15305
Tested-by: build bot (Jenkins)
Reviewed-by: Furquan Shaikh <furquan@google.com>
Diffstat (limited to 'src/mainboard/google/gru')
-rw-r--r-- | src/mainboard/google/gru/chromeos.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mainboard/google/gru/chromeos.c b/src/mainboard/google/gru/chromeos.c index 4265f8d9c1..912d13c20f 100644 --- a/src/mainboard/google/gru/chromeos.c +++ b/src/mainboard/google/gru/chromeos.c @@ -33,6 +33,11 @@ void fill_lb_gpios(struct lb_gpios *gpios) lb_add_gpios(gpios, chromeos_gpios, ARRAY_SIZE(chromeos_gpios)); } +int get_developer_mode_switch(void) +{ + return 0; +} + int get_recovery_mode_switch(void) { return 0; |