mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-12-28 02:35:28 +00:00
72a7796dcbb85262ba4258daa634b00d6948ff3c
1. Use flash common code commands for flash erase and write test. 2. Reset cause is "soft" if software reset is triggered by core. 3. Fix EC keeps rebooting after reboot command when write protection is set while WP pin is de-asserted. Signed-off-by: Dino Li <dino.li@ite.com.tw> BRANCH=none BUG=none TEST=1. console commands "flashwrite" and "flasherase" OK. 2. console "reboot", reset cause is soft. 3. console command crash "assert", "divzero", and "stack" show reboot reason as soft. 4. manually test with console commands. flashinfo Physical: 256 KB Usable: 256 KB Write: 4 B (ideal 1024 B) Erase: 1024 B (to 1-bits) Protect: 2048 B Flags: Protected now: ........ ........ ........ ........ ........ ........ ........ ........ ........ ........ ........ ........ ........ ........ ........ ........ > flashwp enable > flashinfo Physical: 256 KB Usable: 256 KB Write: 4 B (ideal 1024 B) Erase: 1024 B (to 1-bits) Protect: 2048 B Flags: wp_gpio_asserted ro_at_boot Protected now: ........ ........ ........ ........ ........ ........ ........ ........ ........ ........ ........ ........ ........ ........ ........ ........ > reboot Rebooting! --- UART initialized after reboot --- [Reset cause: soft] flashinfo Physical: 256 KB Usable: 256 KB Write: 4 B (ideal 1024 B) Erase: 1024 B (to 1-bits) Protect: 2048 B Flags: wp_gpio_asserted ro_at_boot ro_now Protected now: YYYYYYYY YYYYYYYY YYYYYYYY YYYYYYYY YYYYYYYY YYYYYYYY YYYYYYYY YYYYYYYY ........ ........ ........ ........ ........ ........ ........ ........ > flashinfo Physical: 256 KB Usable: 256 KB Write: 4 B (ideal 1024 B) Erase: 1024 B (to 1-bits) Protect: 2048 B Flags: ro_at_boot ro_now Protected now: YYYYYYYY YYYYYYYY YYYYYYYY YYYYYYYY YYYYYYYY YYYYYYYY YYYYYYYY YYYYYYYY ........ ........ ........ ........ ........ ........ ........ ........ > reboot Rebooting! --- UART initialized after reboot --- [Reset cause: soft] flashinfo Physical: 256 KB Usable: 256 KB Write: 4 B (ideal 1024 B) Erase: 1024 B (to 1-bits) Protect: 2048 B Flags: ro_at_boot ro_now INCONSISTENT Protected now: YYYYYYYY YYYYYYYY YYYYYYYY YYYYYYYY YYYYYYYY YYYYYYYY YYYYYYYY YYYYYYYY ........ ........ ........ ........ ........ ........ ........ ........ --- UART initialized after reboot --- [Reset cause: power-on] flashinfo Physical: 256 KB Usable: 256 KB Write: 4 B (ideal 1024 B) Erase: 1024 B (to 1-bits) Protect: 2048 B Flags: ro_at_boot Protected now: ........ ........ ........ ........ ........ ........ ........ ........ ........ ........ ........ ........ ........ ........ ........ ........ Change-Id: Ifad48d190a84326ed3cb4cde497d906b8ab8cd5f Reviewed-on: https://chromium-review.googlesource.com/297933 Commit-Ready: Dino Li <dino.li@ite.com.tw> Tested-by: Dino Li <dino.li@ite.com.tw> Reviewed-by: Randall Spangler <rspangler@chromium.org>
For an overview of the Embedded Controller firmware, refer to http://www.chromium.org/chromium-os/2014-firmware-summit
Description
Languages
C
64.7%
Lasso
20.7%
ASL
3.6%
JavaScript
3.2%
C#
2.9%
Other
4.6%