Commit Graph

21 Commits

Author SHA1 Message Date
Vic Yang
b228bc14c0 Add host command to read temperature sensor value
Add a LPC host command to read temperature sensor value with given
sensor id.
Add ectool command to read temperature sensor value through LPC.

BUG=chrome-os-partner:7329
TEST=Manual check the reading received is the same as value printed by
console command.

Change-Id: Id3386774435be6c3ae010a143f4fa894568efdb8
2011-12-22 13:51:07 +08:00
Randall Spangler
84a286b1f4 Use #defined constants for IRQ names
Signed-off-by: Randall Spangler <rspangler@chromium.org>

BUG=none
TEST=none

Change-Id: If07ac671cef6b9d0e9fe0a96bf04455a3d2626ff
2011-12-19 13:48:05 -08:00
Randall Spangler
117021278c Switch I2C from polled to interrupt-driven
Signed-off-by: Randall Spangler <rspangler@chromium.org>

BUG=none
TEST=none

Change-Id: Ice3125d1f0085b2e1de3c8544e60ed4b351f4cb0
2011-12-19 12:17:15 -08:00
Rong Chang
2a8f78bdee Force header file stdlib.h to declare ptsname_r()
Macro _GNU_SOURCE is not automatically defined in chroot host toolchain.
Add this macro to let stdlib.h header file declare ptsname_r() function.

BUG=None
TEST=Run "gcc -V" to check if the toolchain version >= 4.6.0.
And run "make clean; make" in Chromium OS dev chroot.

Change-Id: I02d8a6f9ac9a6e51da3f2cd2ecbec9ec1f096c6a
Signed-off-by: Rong Chang <rongchang@chromium.org>
2011-12-14 14:42:31 +08:00
Randall Spangler
3d2efff518 Add ec_uartd build-side utility
This provides a pty for the EC UART channel on the BD-ICDI-B FTDI
daughtercard for EC debugging.

Signed-off-by: Randall Spangler <rspangler@chromium.org>

BUG=none
TEST=make && build/bds/util/ec_uartd (with EC attached to FTDI board)

Change-Id: I51fe50d0da6345962affb860b923425197a04fa1
2011-12-13 14:34:29 -08:00
Randall Spangler
caba91fe27 Change register.h macros to use inline funcs without concatenate (##).
Signed-off-by: Randall Spangler <rspangler@chromium.org>

BUG=none
TEST=none

Change-Id: Ia8c54bfeff2351e8f76d97db558952a9d2ca9a45
2011-12-13 09:50:53 -08:00
Randall Spangler
1ce694189a Add IRQ constants, and task functions to enable/disable/trigger IRQs.
The constants don't work with the DECLARE_IRQ() macro yet, because it
relies on stringizing the IRQ number.

Signed-off-by: Randall Spangler <rspangler@chromium.org>

BUG=none
TEST=none

Change-Id: Ie6ddecd79e28c319b095089131579ba994a17da3
(cherry picked from commit e24904644a977f2618f51629cc066b93a3d53595)
2011-12-12 14:23:04 -08:00
Randall Spangler
70c3e30b63 Clean up UART code
LPC module no longer directly talks to UART registers, and vice-versa.

Signed-off-by: Randall Spangler <rspangler@chromium.org>

BUG=none
TEST='ectool sertest' on target system

Change-Id: Id070c0d849bdfe91c752e0af651d357b695d2648
(cherry picked from commit ab8c3c2b8e3b08a4bf5573cda3a12dd3a384e67d)
2011-12-12 14:12:09 -08:00
Louis Yung-Chieh Lo
6995d4771f Support flash checksum command for re-transmit.
The LPC is not stable enough to test. Kodus Rong. He creates this idea
to checksum the partial content of flash for read/write/erase. This can
improve the robustness of flashrom.

BUG=none
TEST=Tested with flashrom.

Change-Id: I2a2f7b698a94674c03cbd8e3f15caf34f8986399
2011-12-12 21:24:48 +08:00
Rong Chang
1eb5417847 Add flash write protect range command
This CL add host command to enable, get/set flash write protect range.

BUG=None
TEST=Use flashrom utility to set write protect range, enable write
protect and get status.

Change-Id: I345f1eb65944d8cf8028e6fdb7e43c40cc742a6d
Signed-off-by: Rong Chang <rongchang@chromium.org>
2011-12-12 18:21:08 +08:00
Randall Spangler
82f89a2537 Merge "Add user-mode LPC endpoint" 2011-12-09 09:04:49 -08:00
Randall Spangler
20886cb9c0 Add user-mode LPC endpoint
Signed-off-by: Randall Spangler <rspangler@chromium.org>

BUG=none
TEST='ectool hello' on target system

Change-Id: I39845c2ea107ea6f85ef556d58e49343f5a0e9c0
2011-12-08 16:18:20 -08:00
Vincent Palatin
9245d48c66 update QEMU binary
re-compile the QEMU code, so it runs properly inside the chroot.

Signed-off-by: Vincent Palatin <vpalatin@chromium.org>

BUG=None
TEST=make qemu-tests

Change-Id: Ib2a5d9aa56533fd6749c40eb8f73db955676886d
2011-12-08 23:34:47 +00:00
Vincent Palatin
9a545441d7 fix pre-submit hook
we are using linux style indentation,
so we should not check for the presence of tabs in the common python
script, checkpatch will ensure that the indentation is correct.

Signed-off-by: Vincent Palatin <vpalatin@chromium.org>

BUG=None.
TEST="repo upload" a CL with a new line containing tab indentation.

Change-Id: Ida3ef3d8274edd3e8e701e2ede43836c944cd263
2011-12-08 19:18:06 +00:00
Randall Spangler
9a8bc29c63 Merge "Fix LPC drive strength for I/O lines interfering with x86 boot. Fix 1-sec delay in HELLO host command for testing." 2011-12-08 11:07:30 -08:00
Randall Spangler
bc4c1b4eb9 Separate utility build for build and host utils
Build is the system doing the build (e.g. 64-bit linux) and host is the
target platform on top of the ec (e.g. 32-bit Chromium OS).

Necessary to get ectool properly compiling for Chromium OS.

Signed-off-by: Randall Spangler <rspangler@chromium.org>

BUG=none
TEST=make && file build/bds/util/ectool; ectool should be a 32-bit binary

Change-Id: I50eba4c164ece236646a7c6087b1b86769beeb28
2011-12-08 10:55:27 -08:00
Randall Spangler
f141306de2 Fix LPC drive strength for I/O lines interfering with x86 boot.
Fix 1-sec delay in HELLO host command for testing.

Signed-off-by: Randall Spangler <rspangler@chromium.org>

BUG=none
TEST=on host, boot and run 'ectool hello'

Change-Id: I6017d12be400616b06ea337829ce85d193ad90e5
2011-12-08 10:33:30 -08:00
Vincent Palatin
e24fa592d2 Initial sources import 3/3
source files mainly done by Vincent.

Signed-off-by: Vincent Palatin <vpalatin@chromium.org>

Change-Id: Ic2d1becd400c9b4b4a14d4a243af1bdf77d9c1e2
2011-12-07 19:10:02 +00:00
Louis Yung-Chieh Lo
6396911897 Initial sources import 2/3
source files mainly done by Louis.

Signed-off-by: Louis Yung-Chieh Lo <yjlou@chromium.org>

Change-Id: I93fa38126e208cf3e525828b37bb407099686c6e
2011-12-07 19:10:02 +00:00
Randall Spangler
bdf7da5b08 Initial sources import 1/3
source files mainly done by Randall.

Signed-off-by: Randall Spangler <rspangler@chromium.org>

Change-Id: Iaff83a842b17f3350fb6f2a3f1597ad4c29bd12a
2011-12-07 19:10:02 +00:00
Louis Yung-Chieh Lo
abe5786058 Initial commit
BUG=None
Test=None
2011-10-20 15:15:01 +08:00