Commit Graph

734 Commits

Author SHA1 Message Date
Bill Richardson
12eecc012b Put correct RO_FRID, RW_FWID_A, RW_FWID_B entries in FMAP
BUG=chrome-os-partner:9495
TEST=manual

Build image, run dump_fmap. Look for those entries.

Change-Id: I6dfc38e00ce1e11ea24c8392d1691fab32a59d1f
Signed-off-by: Bill Richardson <wfrichar@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/24696
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
2012-06-07 01:20:16 -07:00
Randall Spangler
c7f2e0246e Move printf() formatting to its own file to enable re-use
Also add snprintf(), and %X format code.

BUG=chrome-os-partner:10206
TEST=timerinfo; should print correctly.  'ectool battery' on host side should print same serial as 'battery' on EC console.

Change-Id: I5c9f69d1a20ee5d0a59440c122655adbf62c9aea
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/24635
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Rong Chang <rongchang@chromium.org>
2012-06-07 00:54:02 -07:00
Randall Spangler
3073c60078 Flash host command functions should be static
Since they're not used outside of this source file.

BUG=none
TEST=if it builds, it worked

Change-Id: I92c13c7d58e0e6977c2696746c9d95cbdcb6dbd5
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/24638
Reviewed-by: Yung-Chieh Lo <yjlou%chromium.org@gtempaccount.com>
2012-06-06 21:19:14 -07:00
Randall Spangler
d053605d94 Fix setting PROCHOT level
BUG=chrome-os-partner:10205
TEST=boot system; still works

Change-Id: I05808068954af40ef8d259e5dc5c94324e8e256d
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/24621
Reviewed-by: Simon Glass <sjg@chromium.org>
2012-06-06 16:35:04 -07:00
Bill Richardson
3a10cd37bb Add powerinfo command to display CPU state
BUG=chrome-os-partner:10194
TEST=manual

Run "powerinfo" at the EC console.

Change-Id: I4c8fe8bc32ae6600bd8f0729e81bd239198c73fc
Signed-off-by: Bill Richardson <wfrichar@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/24578
Reviewed-by: Randall Spangler <rspangler@chromium.org>
2012-06-06 08:02:04 -07:00
Simon Glass
99845e2fd5 Add a common watchdog file
Some things about watchdogs are common across Cortex-M3, so create a
common watchdog file to hold these. Put the watchdog task in there as
the first customer.

BUG=chrome-os-partner:10145
TEST=build for all boards

Change-Id: Id55f71a807ee12bae3758afc213c30c731eadc07
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/24395
Reviewed-by: Randall Spangler <rspangler@chromium.org>
2012-06-05 09:30:21 -07:00
Simon Glass
fb425cf11f Unify the watchdog API over stm32 and lm4
Use the same prototype for watchdog_init() everywhere. One version takes
a parameters and one doesn't. We don't need the parameter since we have
a #define. Tidy this up.

Also move watchdog defines into watchdog.h.

BUG=chrome-os-partner:10145
TEST=build for all boards

Change-Id: I38ae63d7cc137b93017c850e767703d5f90f56ad
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/24394
Reviewed-by: Randall Spangler <rspangler@chromium.org>
2012-06-05 09:30:21 -07:00
Simon Glass
76abf8f8cc lm4: Drop LED blinking from watchdog task
We don't really need this, and want to free up the LED for other
debugging uses, so drop it.

BUG=chrome-os-partner:10145
TEST=build and boot on snow (for want of a better test)

Change-Id: I62aad38e9b29556dde0a3bf8e10a85df577a8e73
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/24392
Reviewed-by: Randall Spangler <rspangler@chromium.org>
2012-06-05 09:30:21 -07:00
Randall Spangler
4568bc7dbd Release keyboard recovery button on next power-on
Keyboard recovery used to persist until the next time the EC was
reset.  It should release the next time the user turns on the system
via the lid or power button.

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

BUG=chrome-os-partner:10034
TEST=manual

1. power system on normally.  not in recovery.
2. press Power+Esc+Refresh.  System turns on into recovery.
3. shut system down
4. power system on with lid-open.  System boots normally.

5. repeat steps 2-3, then power system on with power button.  System boots normally.

Change-Id: I455c7191d128614629c50ba27d7ef977e414fe90
Reviewed-on: https://gerrit.chromium.org/gerrit/24409
Commit-Ready: Randall Spangler <rspangler@chromium.org>
Tested-by: Randall Spangler <rspangler@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
2012-06-04 17:07:15 -07:00
Rong Chang
5edb0c5d97 Disable default I2C register dump
Signed-off-by: Rong Chang <rongchang@chromium.org>
BUG=chrome-os-partner:10132
TEST=manual
  Connect uart console to Daisy, boot and remove the battery.
  The I2C debug trace should not show up by default.

Change-Id: I911923138cb233cf2897983997c4a4764a62981b
Reviewed-on: https://gerrit.chromium.org/gerrit/24363
Commit-Ready: Rong Chang <rongchang@chromium.org>
Tested-by: Rong Chang <rongchang@chromium.org>
Reviewed-by: Vic Yang <victoryang@chromium.org>
2012-06-03 20:11:24 -07:00
David Hendricks
422b081285 Send success code when rebooting EC using I2C host commands
This causes the reboot command to respond to the host via I2C with
EC_RES_SUCCESS.

Signed-off-by: David Hendricks <dhendrix@chromium.org>

BUG=none
TEST=tested on Snow and Link using ectool and flashrom

Both machines were able to reboot the EC and go thru an EC update via
Flashrom successfully:

localhost ~ # ectool reboot_ec RO ; echo $?
done.
0

Flashrom is also able to do a fully automatic update, without the
user specifying a layout:
Reading old contents from flash chip... done.
Found 'RO_SECTION' in image.
Found 'RW_SECTION_A' in image.
GEC is jumping to [RO_SECTION]
GEC has jumped to [RO_SECTION]
Erasing and writing flash chip...
...
GEC is jumping to [RW_SECTION_A]
GEC has jumped to [RW_SECTION_A]
GEC needs 2nd pass.
...

Change-Id: Id723c26caa8f352a7ddc6ebfae664448c38300f0
Reviewed-on: https://gerrit.chromium.org/gerrit/24290
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Tested-by: David Hendricks <dhendrix@chromium.org>
Commit-Ready: David Hendricks <dhendrix@chromium.org>
2012-06-01 14:45:57 -07:00
Vincent Palatin
c25c92ff5e stm32mon: more robust serial communication
- throw away all the incoming garbage after a NACK to be protect against
unexpected behavior on the embedded monitor.

- increase the command timeout :
 on STM32F100, I have measured up to 1.4s to execute the erase 64kB
 command. With the current 2s timeout, it was failing when you are
 unlucky (since it's using a integer second timestamp to measure the
 timeout).

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

BUG=None
TEST=with a Snow, flash the board using stm32mon -w ec.bin
from various states.

Change-Id: I260b3b1311eac9be7c43f835eeac68051befd24a
Reviewed-on: https://gerrit.chromium.org/gerrit/24314
Reviewed-by: David Hendricks <dhendrix@chromium.org>
Commit-Ready: Vincent Palatin <vpalatin@chromium.org>
Tested-by: Vincent Palatin <vpalatin@chromium.org>
2012-06-01 13:13:25 -07:00
Vic Yang
3f129c161e Add host command to switch LCD backlight and WLAN/Bluetooth
We need to be able to toggle these signals to increase test coverage.

BUG=chrome-os-partner:9967
TEST=Toggle 'ectool wireless' and see GPIO signal changes.
     'ectool backlight 0' and see LCD backlight turn off.

Change-Id: Ic96fe26aa82c33b0e51e1f973280a0edc322f158
Reviewed-on: https://gerrit.chromium.org/gerrit/23625
Commit-Ready: Vic Yang <victoryang@chromium.org>
Reviewed-by: Vic Yang <victoryang@chromium.org>
Tested-by: Vic Yang <victoryang@chromium.org>
2012-06-01 08:15:47 -07:00
Vincent Palatin
fbfd828b9a simple and self-contained EC flashing tool
This produces a host binary running on the application processor and
which is able to re-flash th EC firmware over the AP-to-EC link (either
LPC or I2C).
The payload (ie the EC firmware) to use is embedded inside the flasher
binary.

This is just aimed at testing and developer upgrade. The auto-update
flow is using flashrom.

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

BUG=None
TEST=build for link/daisy/snow/bds and tests
On Snow, run burn_my_ec from the serial console and see that the EC was
correctly re-flashed.

Change-Id: I7f90e773678a7ef3d8dc6dbacf54e80f3294607b
Reviewed-on: https://gerrit.chromium.org/gerrit/24236
Reviewed-by: David Hendricks <dhendrix@chromium.org>
Tested-by: Vincent Palatin <vpalatin@chromium.org>
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Commit-Ready: Vincent Palatin <vpalatin@chromium.org>
2012-05-31 16:28:06 -07:00
Randall Spangler
26b4a9e1a0 Assorted keyboard module cleanup
Const- and static-ifying data and pointers.

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

BUG=none
TEST=kblog on, then boot system, then kblog; should print log

Change-Id: I2e1da8e3d614b66dad8749b18c43bd77dc75928d
Reviewed-on: https://gerrit.chromium.org/gerrit/24233
Commit-Ready: Randall Spangler <rspangler@chromium.org>
Tested-by: Randall Spangler <rspangler@chromium.org>
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
2012-05-31 15:03:17 -07:00
Randall Spangler
11ab34a721 Fix alignment of task scratchpad and system stack
Signed-off-by: Randall Spangler <rspangler@chromium.org>

BUG=chrome-os-partner:10042
TEST=boot system, ctrl+alt+F2, type on console; shouldn't crash

Change-Id: I935bc141fbbc1e7d0d073f1754104808a24fe869
Reviewed-on: https://gerrit.chromium.org/gerrit/24232
Commit-Ready: Randall Spangler <rspangler@chromium.org>
Tested-by: Randall Spangler <rspangler@chromium.org>
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
2012-05-31 15:03:17 -07:00
Vic Yang
53e8d3201c Fix a typo in thermal engine temperature setting
Signed-off-by: Vic Yang <victoryang@chromium.org>

BUG=none
TEST=none

Change-Id: I369522c00724c959d1eac18ca9c3ce57bd55aeff
2012-05-31 21:35:13 +08:00
Rong Chang
29b9a28c9d PMU tps65090 driver
This is an initial commit of tps65090 pmu driver. An empty charging
task added.

Signed-off-by: Rong Chang <rongchang@chromium.org>
BUG=chrome-os-partner:9756
TEST=manual
  When connected to a battery, the EC uart console will display
  battery status on value change.
  Check pmu register with 'i2c r 0x90 4'. Output should be '0x03'.

Change-Id: I99e243d203c438751af0c3647556cbf9a94e928f
2012-05-31 18:56:47 +08:00
Rong Chang
ee495ac6a6 Add stm32 I2C master driver
A polling mode I2C master driver. Interfaces for read/write byte
and word are implemented. i2c_read_string() is currently an empty
function.

CONFIG_SMART_BATTERY added to daisy board for testing.

Move smart_battery.o back to CONFIG_SMART_BATTERY since it is not
depended on charging state machine.

Signed-off-by: Rong Chang <rongchang@chromium.org>
BUG=chrome-os-partner:9724
TEST=manual/host commands
  > battery
    Temp:      0x0bad = 298.9 K (25.8 C)
    Manuf:
    Device:
    Chem:
    Serial:    0x0001
    V:         0x1cb7 = 7351 mV
    V-desired: 0x20d0 = 8400 mV
    V-design:  0x1c20 = 7200 mV
    I:         0x0000 = 0 mA
    I-desired: 0x0bb8 = 3000 mA
    Mode:      0x6001
    Charge:    49 %
      Abs:     47 %
    Remaining: 2705 mAh
    Cap-full:  5575 mAh
      Design:  5800 mAh
    Time-full: 0h:0
      Empty:   0h:0

Change-Id: I9f4e9e8819955ad1b107fb3b70ac2559d9b02b55
2012-05-31 18:00:17 +08:00
Vincent Palatin
1545262c9b Detect recovery key combination
Check if ESC+Power+Refresh is pressed at startup, if the recovery
combination is detected, record it to allow U-Boot to go into recovery.

The status of the keyboard recovery can be read from the response of the
EC_CMD_MKBP_INFO command.

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

BUG=chrome-os-partner:9916
TEST=On Snow, do a recovery reset by pressing ESC+Refresh+Power and see
the trace, try other resets and don't see it.

Change-Id: I0e1a8214781a6e74bd90bf8313887a9dcf4df56d
2012-05-31 00:42:02 +00:00
Gerrit
7c229f92fb Merge "stm32: assert/de-assert GPIO_PMIC_PWRON_L with keyboard power event" 2012-05-30 17:01:21 -07:00
Vincent Palatin
231199d5f0 Merge "stm32: use level interrupt instead of edge" 2012-05-30 16:27:51 -07:00
Gerrit
defbdc32d3 Merge "Add basic SPI support to link" 2012-05-30 14:16:02 -07:00
Vincent Palatin
288cae699b stm32: use level interrupt instead of edge
Using low level trigger interrupt rather than falling edge is more
robust since we avoid detecting glitches or missing interrupts.

This is backward compatible with the AP software expecting falling edge.

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

BUG=chrome-os-partner:8869
TEST=On Daisy, check we can still enter text in U-Boot console and
Chrome browser (and check interrupt count increase as expected).

Change-Id: Ide2b27f9129173530d137b5d70d998ebd8f8e669
2012-05-30 20:59:59 +00:00
Randall Spangler
858d87cfaa Add basic SPI support to link
This adds SPI transaction support, and a debug command to read a few
values from the SPI EEPROM.

Note that the SPI controller is normally *disabled* with all its I/Os
high-Z, so this will not interfere with main processor or Servo on the
SPI bus.  The bus is only enabled during the SPIROM command itself.

BUG=chrome-os-partner:7844
TEST=manual

1) Reboot system
2) on EC console, 'spirom'.  Should print

Man/Dev ID  : 0xef 0x16
JEDEC ID    : 0xef 0x40 0x17
Unique ID   : 0xd1 0x61 0x44 0xb0 0x63 0x5d 0x40 0x32
Status reg 1: 0x00
Status reg 2: 0x00

Note that unique ID is, well, unique, so it won't match my value.  But
it should still be something not all 0xff's.

3) Power on the system.  x86 should still boot normally, indicating
that the EC isn't interfering with the SPI bus.

Change-Id: I53bf5fdbbe7a37949375d0463e30e408cc6fb6a8
2012-05-30 13:12:34 -07:00
Gerrit
aad3f858a4 Merge "stm32f: update flash write size" 2012-05-30 11:31:43 -07:00
Hung-Te Lin
6654374f31 ec: Remove *.dis from default target.
*.dis files can always be generated by *.elf files, so we can remove it from
default build targets, and only generate that on demand (make dis).

This also speeds up building time from 6.637s to 4.9s.

BUG=chromium-os:31379
TEST=emerge-link chromeos-ec
      make # no *.dis
      make dis # get *.dis

Change-Id: Ibc5305501ae72a0733f401863ea1d4c1f17aa34f
Signed-off-by: Hung-Te Lin <hungte@chromium.org>
2012-05-30 14:00:16 +08:00
David Hendricks
ef7557b4fd stm32f: update flash write size
This CL updates the constant FLASH_WRITE_BYTES to 64 and modifies the
decrement value in the flash_physical_write() loop.

The constant value was changed so that it would agree with
EC_FLASH_SIZE_MAX which is the size of the data payload.
FLASH_WRITE_BYTES is provided as part of EC_CMD_FLASH_INFO, so
programs which query size this way will can take advantage of 64-byte
writes.

The decrement value in the loop did not actually change in value, but
instead uses the size of the half-word.

Signed-off-by: David Hendricks <dhendrix@chromium.org>

BUG=none
TEST=Tested on Lucas

Change-Id: If335bd8e11db0acc6464dcdef819d91f61ae0890
2012-05-29 22:03:34 -07:00
Louis Yung-Chieh Lo
2835e5594e Improve the timeout when running on non-Google EC boards.
The udelay() has big overhead so that repeating calling leads big errors
(expect 1 sec of timeout, but actually 12 secs of timeout).

So, the improvement is to double the udelay count when BUSY bit is set.

Even better, if we can check the I/O port content before really running
the EC command, it can save more time.

BUG=chrome-os-partner:10003
TEST=tested on link, alex, zgb, lumpy, stumpy and mario.
Only mario takes 1 second to timeout.
Others stop when checking ports (takes around 0.01 second).

Change-Id: I96c6d8cbe6226d05428a2ab126815e934942f5a9
Signed-off-by: Louis Yung-Chieh Lo <yjlou@chromium.org>
2012-05-30 10:10:16 +08:00
Gerrit
8bb9091f2e Merge "Add host command to simulate key press" 2012-05-29 18:19:17 -07:00
David Hendricks
b8eefd91c1 stm32: assert/de-assert GPIO_PMIC_PWRON_L with keyboard power event
This sets the PMIC_PWRON_L signal to correspond with the keyboard
power button state.

BUG=chrome-os-partner:9821
TEST=Tested on Lucas (see notes below)

Signed-off-by: David Hendricks <dhendrix@chromium.org>

1. AC power plugged in, AP off, EC booted
> gpioget PMIC_PWRON_L
  1* PMIC_PWRON_L

2. AP running, press and release power button (should see screen zoom
   out and then back in, but I don't have a monitor...)

2a. AP running, power button not pressed
> gpioget PMIC_PWRON_L
  1  PMIC_PWRON_L

2b. Press power button
> Waiting for long power press 280507864
> gpioget PMIC_PWRON_L
  0* PMIC_PWRON_L

2c. release power button before 8s
> Cancel power off
> gpioget PMIC_PWRON_L
  1* PMIC_PWRON_L

3. From AP off state, press and hold keyboard power button
> gpioget PMIC_PWRON_L
  0* PMIC_PWRON_L

After 8s, we see:
Timeout waiting for GPIO 0/KB_PWR_ON_L
Power button was not released in time
Shutdown complete.

4. AP on, press and hold keyboard power button
> gpioget PMIC_PWRON_L
  1  PMIC_PWRON_L
> Waiting for long power press 654024769
> gpioget PMIC_PWRON_L
  0* PMIC_PWRON_L
> Power off after long press now=654025073, 0
ending loop 2
Shutdown complete. <-- Note: This message comes from power_off() which
                       also de-asserts PMIC_PWRON_L
> gpioget PMIC_PWRON_L
  1* PMIC_PWRON_L

Change-Id: I6955771707ecea2926570be0e8bd77ebddbca4d4
2012-05-29 13:17:42 -07:00
Gerrit
fa8788e8c0 Merge "Jump to RAM before entering hibernate" 2012-05-29 11:19:47 -07:00
Gerrit
63da7ee730 Merge "Use correct EEPROM timeout" 2012-05-29 10:31:35 -07:00
Randall Spangler
e31d9a6660 Jump to RAM before entering hibernate
Works around LM4 errata where EEPROM access is unstable while powering down.

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

BUG=chrome-os-partner:9996
TEST=hibernate 1

Change-Id: I99d21ec8ab5a06fb0972edebec3cc58ca9f60fa9
2012-05-29 10:21:36 -07:00
Gerrit
7f66786b76 Merge "usleep() chains to udelay() if called before task_start()" 2012-05-29 10:12:37 -07:00
Randall Spangler
d42877300a Use correct EEPROM timeout
Signed-off-by: Randall Spangler <rspangler@chromium.org>

BUG=chrome-os-partner:10200
TEST=manual

eeread 2 0 --> note original value
eewrite 2 0 0x1234
eeread 2 0 --> should be 0x1234
eewrite 2 0 (original value)
eeread 2 0 --> should be original value again

Change-Id: Ibb72426663122b22b2bfe87c821c374eab334450
2012-05-29 10:02:34 -07:00
Randall Spangler
ef46903dea usleep() chains to udelay() if called before task_start()
...so I can use usleep() for eeprom delays in the CL coming next...

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

BUG=chrome-os-partner:10200
TEST=if it boots, it worked

Change-Id: I564578f24452a4ac39abe79ff28cfff4b665ad2f
2012-05-29 09:38:58 -07:00
Gerrit
cbd18dbe5b Merge "Add a way to set indiviual sensitivity factor for each TMP006 sensor" 2012-05-29 09:16:04 -07:00
Vic Yang
abce21c6cf Add host command to simulate key press
In order to enable automatic keyboard testing, let's add key press
simulating command to ectool.

BUG=chrome-os-partner:9188
TEST='ectool kbpress 4 6 1' and see 'j' pressed.
     'ectool kbpress 4 6 0' and see 'j' released.

Change-Id: I5a445e13aad2bd09aa6e9a1d62995cf34b782aeb
2012-05-29 17:11:23 +08:00
Rong Chang
f267899861 Fix temperature comparison issue in discharging state
When discharging, EC checks if battery temperature is in working
range. The battery pack module should provide the working range
in deci-Kelvin, not Celcius.

Signed-off-by: Rong Chang <rongchang@chromium.org>
BUG=chrome-os-partner:9485
TEST=manual
  Unplug AC adapter, and check
    /sys/class/power_supply/BAT0/charge_now

Change-Id: Ib6a312941cb1f3622c6f18d2c58bc50a06feafaf
2012-05-28 18:07:07 +08:00
Vic Yang
86cfeb5232 Add a way to set indiviual sensitivity factor for each TMP006 sensor
Each TMP006 temperature sensor has different sensitivity factor. Let's
add a field to set different sensitivity factor for each sensor. Also
update the factors to get more reasonable temperature readings, but
still need more precise calibration.

BUG=chrome-os-partner:9599
TEST=Build and read tempearture succeeded.

Change-Id: Ib4feea3b78b71f6d37c9a02668ffa7bd9e63d390
2012-05-28 16:42:17 +08:00
Vic Yang
b85a7ce9d6 Make ectool correctly report when keyboard backlight is off
When keyboard backlight is disabled, make 'ectool pwmgetkblight' reports
'disabled'.

BUG=chrome-os-partner:9966
TEST='ectool pwmgetkblight' shows 'Keyboard backlight disabled' when
lid closed.

Change-Id: Ica690159e30431ccb530275fcc2311fb8f54a9aa
2012-05-26 20:29:54 +08:00
Randall Spangler
7ecd1d6d3c Add system_is_locked() to prevent sysjump on consumer systems
This returns true when both HW and SW write protect are enabled.

Once WP is enabled, sysjump will be locked out.

system_is_locked() can be used to gate other dangerous-ish commands too.

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

BUG=chrome-os-partner:7468
TEST=manual

sysinfo -> unlocked, copy A
sysjump B -> works
flashwp lock
reboot
(make sure flashinfo shows WP asserted and flash locked; note there is a
 HW bug on proto1 which makes this flaky)
sysinfo -> locked, copy A
sysjump B -> fails
(remove WP screw)
reboot hard
flashwp unlock

Change-Id: I849b573675c2c1cb4c44b9a05d6973e38247ca23
2012-05-25 15:03:47 -07:00
Randall Spangler
e704c712ad Better help for console commands
Additional help messages and usage are gated by
CONFIG_CONSOLE_CMDHELP, so we can turn it on if there's space (adds
about 3KB to image size) and turn it off when there isn't.

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

BUG=none
TEST=manual

1) help
2) help list
3) help gpioset
4) gpioset -> wrong number of params
5) gpioset fred 0 -> param1 bad
6) gpioset cpu_prochot fred -> param2 bad

Change-Id: Ibe99f37212020f763ebe65a068e6aa83a809a370
2012-05-25 13:34:06 -07:00
Gerrit
89e1d5a121 Merge "Add mmapinfo command to power_button.c" 2012-05-25 12:47:48 -07:00
Gerrit
755ac3de91 Merge "stm32: fix keyboard FIFO" 2012-05-25 11:59:06 -07:00
Gerrit
d4fb531066 Merge "Cleanup - includes go in include dir" 2012-05-25 10:40:56 -07:00
Bill Richardson
cc778c70d6 Add mmapinfo command to power_button.c
BUG=none
TEST=none

Change-Id: Id6ced0b87b354136e0b80026a537958586bb1325
Signed-off-by: Bill Richardson <wfrichar@chromium.org>
2012-05-25 10:20:25 -07:00
Randall Spangler
4f34d3f9ef Cleanup - includes go in include dir
Signed-off-by: Randall Spangler <rspangler@chromium.org>

BUG=none
TEST=if it builds, it works

Change-Id: I2064f3eed4790051312a5a53ef742dcf79c4ee9d
2012-05-25 09:59:58 -07:00
Vincent Palatin
c7fcad2924 Init task contexts/stacks at runtime
Instead of storing task contexts in .data and wasting several kB of
flash with mostly 0s, move them to .bss and fill the initial context at EC
startup. The runtime overhead is small enough.

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

BUG=chrome-os-partner:9839
TEST=run on Link and check verified boot and chromeOS startup are OK.

Change-Id: Iaef23d46a4e3e80e49886dfbf7ab1f537c587362
2012-05-25 16:11:41 +00:00