Commit Graph

7938 Commits

Author SHA1 Message Date
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
27e5806614 Add Chrome OS standard keyboard matrix table.
BUG=None
TEST=make && make runtests

Change-Id: Ib9ae5ee445e473c27de703fc4dbc8cafa0eac468
2011-10-31 23:44:22 +08:00
Louis Yung-Chieh Lo
afa146d039 Implement typematic delay and rate. Also other keyboard commands.
BUG=None
TEST=make && make runtests

Change-Id: Ia0013ddbb0300791b4667bf70c5d0fb78c9508b1
2011-10-31 17:27:29 +08:00
Louis Yung-Chieh Lo
fd5d4b6e9e Implement scancode set 2.
Also add the framework to handle i8042 command from host.

BUG=None
TEST=cd cros_ec/test; make && make runtests

Change-Id: I47c5dfec47fb0e439be923f08dcd2cbc873baba6
2011-10-29 00:15:56 +08:00
Louis Yung-Chieh Lo
79a661d00c Link keyboard-related code together.
Added i8042 interface and matrix code. Demonstrate a key is pressed and passed
to host through the board-dependent matrix code.

BUG=None
TEST=make && make runtests

Change-Id: I6a9f5e621d9e93e5c16384afebf4d665000e81a6
2011-10-28 01:15:18 +08:00
Louis Yung-Chieh Lo
aa8ecb2b65 Merge "Add mailbox interface definition." 2011-10-27 00:06:08 -07:00
Louis Yung-Chieh Lo
22d0fa85e0 Add mailbox interface definition.
BUG=None
TEST=None

Change-Id: I6f91fa0ae352bb421fe7cce010cfbf14b93037b4
2011-10-27 00:43:31 +08:00
Louis Yung-Chieh Lo
91daca6939 Add ec_keyboard_test.c
This CL also includes 4 pieces:
  1. main files: environment-independent (main.c) and
                            -dependent (ec_keyboard_test.c).
  2. stub files: chip_stub/keyboard.c simulates the real hardware.
                 chip_stub/keyboard.h is the header of testing functions.
  3. initial keyboard lib code: ec_keyboard.h
  4. rename Cr* function name to Ec* under chip_interface/.

BUG=None
TEST=make && make runtests
Expect seeing the output debug message from cros_ec/lib/ec_keyboard.c.

Change-Id: Ia7e8022060eb0a5d0a11abcbdb3f524942f5c68d
2011-10-26 22:12:19 +08:00
Louis Yung-Chieh Lo
360d484d3a Merge "The keyboard interface between EC core and EC lib." 2011-10-25 19:53:04 -07:00
Louis Yung-Chieh Lo
169620605c Merge "Convert EC command table into ec_command.h." 2011-10-25 19:52:17 -07:00
Randall Spangler
4b87c940b0 Add EcUartPutsPolled(), for polled output from fault handlers.
BUG=none
TEST=make && make runtests

Change-Id: I0c07cda5c87e586f0932521b0a8268379df1da7f
2011-10-25 12:55:10 -07:00
Louis Yung-Chieh Lo
d87c85f168 Convert EC command table into ec_command.h.
The first version of EC command table to communicate with host side.

Also bring in the README file.

BUG=None
TEST=None

Change-Id: Ic7583beb85ed866d73ef0f4e7fccd590b3943932
2011-10-25 15:29:51 +08:00
Louis Yung-Chieh Lo
53acb3f245 The keyboard interface between EC core and EC lib.
BUG=None.
TEST=None.

Change-Id: I6b58cc1bd98b6d02b8138956ac609577dfb05755
2011-10-25 14:18:52 +08:00
Randall Spangler
9f29744273 Move chip interface headers, add GPIO and system headers.
BUG=None
TEST=make && make runtests

Change-Id: I88f23366147224825f231f1c10ddcf1a112d5ebc
2011-10-24 15:32:47 -07:00
Randall Spangler
ee3d25fa92 Add top-level makefile
Build output is now in ./build

Fixed compiler warnings in ec_uartd, ec_console

BUG=none
TEST=make

Change-Id: I9a46ab6b9d4e912e59a60c669e95dc0c6f8485df
2011-10-24 12:39:09 -07:00
Randall Spangler
7860a64e42 Merge "Start implementing host-side EcUart module" 2011-10-24 10:46:26 -07:00
Randall Spangler
059b433471 Merge "Add EcOs RTOS abstraction layer and pthreads implementation" 2011-10-24 10:46:04 -07:00
Randall Spangler
84c5a86d24 Merge "Add ec_uartd utility" 2011-10-24 10:44:30 -07:00
Randall Spangler
85e3256d32 Start implementing host-side EcUart module
BUG=none
TEST=make && ./ec_os_test

Change-Id: I2a819baa24e298ce6edc02cb15549b0b1d766846
2011-10-24 10:25:05 -07:00
Randall Spangler
e91f327047 Add EcOs RTOS abstraction layer and pthreads implementation
This lets us write modules which don't know the details of the RTOS
objects they use.  More importantly, this lets us target those modules
at either Linux (using the pthread-based implementation in chip_stub)
or actual hardware, so we can write Linux-based unit tests.

BUG=None
TEST=make && ./ec_os_test

Change-Id: I2923b9a48248b27f3bc3b0346d5a870fef8a1c5b
(cherry picked from commit 6ccc37af9fb916f7ad70f542905ba8bacb8e3be2)
2011-10-21 15:14:07 -07:00
Dave Parker
dd449d1b72 Mask out board and vendor sub-projects with .gitignore
BUG=None
TEST=git status

Change-Id: I94d3929994b02dd90e41b4d87cc236d7611e27eb
2011-10-21 13:55:28 -07:00
Louis Yung-Chieh Lo
abe5786058 Initial commit
BUG=None
Test=None
2011-10-20 15:15:01 +08:00
Randall Spangler
406de3fe81 Add ec_uartd utility
BUG=None
TEST=None

Change-Id: I21c6166ad96924d2a80d55f6ed9125a3aa1b1c7c
2011-10-18 13:29:57 -07:00
Randall Spangler
2b3bef7968 Revised header files and moved in current implementation.
BUG=None
TEST=cd cros_ec && make

Change-Id: Ieac6a131f0aef0f8f3343d4f3cd9fba5a211bc09
2011-10-17 14:59:01 -07:00
Louis Yung-Chieh Lo
2266c2119e Initial commit 2011-10-15 00:17:08 +08:00