Commit Graph

176 Commits

Author SHA1 Message Date
Randall Spangler
f411bbbe19 Re-enable watchdog in watchdog_reload()
Signed-off-by: Randall Spangler <rspangler@chromium.org>

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

waitms 1500
(see watchdog trace)
waitms 1500
(should see watchdog trace again)
waitms 3000
(should see trace, then system should reboot)

Change-Id: Ieb5009d7a7bc9e1ed795e58efb0cb44a1eeb2706
2012-04-12 12:04:37 -07:00
Randall Spangler
20fdc57a35 Reload watchdog timer during flash operations.
Signed-off-by: Randall Spangler <rspangler@chromium.org>

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

While ssh'd into the device:

1) Create a test image:

Extracting to: /tmp/ecup

132+1 records in
132+1 records out
136132 bytes (136 kB) copied, 0.000550122 s, 247 MB/s

2) Force the EC into its RO image:

done.

3) Erase the A and B images, then reprogram them:

Erasing 163840 bytes at offset 81920...
done.

Reading 136132 bytes from /home/chronos/user/ecb.bin...
Writing to offset 81920...
done.

4) Repeat step 3 about 10 times while monitoring the EC debug console.
Commands should complete successfully all the time.  (Note that during
the flashwrite, there's a ton of debug output; what you should NOT see
is something like this:
   WATCHDOG PC=00002104 / LR=0000597f / pSP=200013a0

Change-Id: I2f1f05eb19abcd6e19c6364f6d4ac785cca6a4c6
2012-04-12 09:41:35 -07:00
Gerrit
e581c9e4ca Merge "Update keyboard scanning for stm32 to use messages" 2012-04-11 17:21:21 -07:00
Simon Glass
220a5a496d Update keyboard scanning for stm32 to use messages
Provide the required plumbing for the stm32 keyboard scan code so that
the message layer will pick up keyboard scans.

The design is as follows:
- When a change in keyboard state is detected, the keyboard matrix
  scanning code will call the board-specific board_keyboard_scan_ready()
  function to interrupt the AP.
- The AP will initiate a CMDC_KEY_STATE transaction over SPI or I2C
- The SPI or I2C driver will call message_process_cmd() to process the
  command
- This in turn will call keyboard_get_scan() to get the latest scan data

For SPI:
- The AP will initiate an 20-byte (or longer) SPI transaction
- The EC will see the command, and provide the keyboard state in response,
  with the response being part of the same transaction

For I2C:
- The AP will initiate a 1-byte write to set the EC mode.
- The AP will then initiate an 18-byte read, and the EC will send the
  message including keyboard state

BUG=chromium-os:28925
TEST=build on daisy and discovery; run on daisy
Change-Id: I905ef9d567e43d85fb851052f67586eff58e1167
Signed-off-by: Simon Glass <sjg@chromium.org>
2012-04-11 16:28:53 -07:00
Randall Spangler
406158a2a7 Add USER_REG3 and indicate it's reserved for preprogramming process data.
Signed-off-by: Randall Spangler <rspangler@chromium.org>

BUG=chrome-os-partner:8889
TEST=code still builds

Change-Id: Ifdd31189fb5de779f090aa089173407e381c62b7
2012-04-11 16:16:20 -07:00
Simon Glass
9e50df36b3 Add support for DMA controller
Add some basic functions to start DMA operations for transmit and
receive.

BUG=chromium-os:28925
TEST=build on daisy and discovery; run on daisy

Change-Id: Ifceeed2af80cf5f00e1ce1a49b1139a76585b0bf
Signed-off-by: Simon Glass <sjg@chromium.org>
2012-04-11 11:01:50 -07:00
Randall Spangler
322eebbae4 Add fake developer switch
Signed-off-by: Randall Spangler <rspangler@chromium.org>

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

  optget fake_dev_switch --> 0
  optset fake_dev_switch 1
  optget fake_dev_switch --> 1
  optset fake_dev_switch 0
  optget fake_dev_switch --> 0

Reboot by holding ESC+D and tapping power

  optget fake_dev_switch --> 1

Reboot by holding ESC+F and tapping power

  optget fake_dev_switch --> 0

Change-Id: Iccb3bc8b3d571e551e204892769efc4161858055
2012-04-10 14:09:40 -07:00
Vincent Palatin
d8541f29c8 use the full 256kB for partitions
Now Link has 256kB parts, we can restore the third partition and use 80kB partitions.

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

BUG=None
TEST=on Link proto-1, try to use RO/A/B images (sysjump B, then boot).

Change-Id: I9b7e4cae1504e86a62643db4d035cc9f3de0af52
(cherry picked from commit cefaf59328e4b91308d0347cc1f55861e93db480)
2012-04-10 00:31:17 +00:00
Randall Spangler
e9328ac4f6 Support dynamically changing the system clock
Add nopll command to turn off the PLL, reducing the system clock to 16Mhz.

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

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

boot system
press power button to boot x86
temps   // should print all temperatures
timerinfo
timerinfo
timerinfo  // convince yourself this is counting up at about 1MHz
nopll  // this drops the system clock to 16MHz
temps   // should still print all temperatures
timerinfo
timerinfo
timerinfo  // should still be counting up at about 1MHz

Change-Id: Ie29ceb17af348148bffadf63d60c1b731f4c3f6d
2012-04-09 10:33:35 -07:00
Louis Yung-Chieh Lo
1a9a415cf6 Support chipinfo command (ectool/host commands)
Add a host command returning chip information. The interface is in common/
while the implementations are in chip-specific code (note: added simple
value for stm).

BUG=chrome-os-partner:8567
TEST=on board
% ectool chipinfo
Chip info:
  vendor:    xx
  name:      yyyy
  revision:  zzzzz

Change-Id: I5030a03a6fcfbfc080d5acd8efb763fde7eefde5
2012-04-09 14:25:30 +08:00
Duncan Laurie
9936df2b8b Split lid handling into separate functions and add command interface
This has been useful for me to be able to test lid behavior remotely
since it is not available via servo.

This also has a minor change to send a task message after sending
the power button pulse so the state machine behaves properly.

BUG=none
TEST=Execute 'lidclose' and 'lidopen' commands via ec uart and
see the appropriate events set and wake behavior when the system
is off.  With a (not yet published) coreboot I am able to handle
lid close events to enter suspend.

Change-Id: Iec1c68121d42b66305ba5dfd20e81453538a97e2
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
2012-04-06 14:49:42 -07:00
Duncan Laurie
6abb3579af Add support for generating SCI via LPC
The SCI pin is not connected to a GPIO and it uses a different
method to trigger a pulse via LPC0SCI.

The ACPI specification requires SCI for 3 conditions:
- SCI event pending
- Input Buffer Empty
- Output Buffer Full

The buffer full/empty SCIs are used to nudge the kernel driver
along so it does not have to poll for a potential slow EC to
be ready.  This only really makes sense for the kernel channel
so they are only generated there.

BUG=chrome-os-partner:8277
TEST=using (unreleased) coreboot BIOS to test that the kernel
can receive SCI events and the ACPI method is successfully run.

Change-Id: I6b3717fcad6569bda4482d9aaa37d45b4cf36335
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
2012-04-06 14:49:30 -07:00
Randall Spangler
a61d8db3d3 Change task messages to events
Signed-off-by: Randall Spangler <rspangler@chromium.org>

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

make BOARD={bds,link,daisy}
make tests
flash link system and make sure it boots

Change-Id: I1241a1895c083e387e38ddab01ac346ca4474eb9
2012-04-06 09:06:53 -07:00
Randall Spangler
bae507a2da Invert write protect signal
Write protect is active-high, not active-low.

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

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

From chroot:
  dut-control fw_wp_en:on
  dut-control mfg_mode:on
From console:
  gpioget WRITE_PROTECT
  0  WRITE_PROTECT

From chroot:
  dut-control fw_wp_en:on
  dut-control mfg_mode:off
From console:
  gpioget WRITE_PROTECT
  1  WRITE_PROTECT

Change-Id: I81c7858cac43c6c9b8630bf7f5aa0f491e6554ad
2012-04-04 15:26:25 -07:00
Randall Spangler
0f23e72532 Power button state machine handles keyboard-controlled reset
On Power+ESC -> ignore the power button being down until it's
released; system stays powered down.

On Power+ESC+Refresh -> send a power button pulse to the PCH.  Ignore
the power button until after both the pulse has finished and the power
button is released.

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

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

Reboot system.
Press power.
System powers on normally.

Hold down ESC, tap power very quickly.
System resets and stays off.

Hold down ESC and power for several seconds.
System resets and stays off.

Hold down ESC and refresh and tap power very quickly.
System powers on; EC console indicates it's in RO.

Hold down ESC and refresh and press power for ~100ms
System powers on; EC console indicates it's in RO.

Hold down ESC and refresh and press power for several seconds.
System powers on; EC console indicates it's in RO.

Hold down ESC and refresh and press power for at least 10 seconds.
System powers on; EC console indicates it's in RO.

Change-Id: Idf9619da54ab299b0c65e6d68abb5e35e2ce9c79
2012-04-04 15:12:27 -07:00
Randall Spangler
206476570d Only check for recovery key if reset was triggered by reset pin
Signed-off-by: Randall Spangler <rspangler@chromium.org>

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

1) Hold down refresh key and type 'reboot' from EC console.  Console
should not show "[KB recovery key pressed at init!]"

2) Press power+esc+refresh.  Console SHOULD show the message.

3) Press power+esc.  Console should NOT show the message.

Change-Id: I642a7667b81c8d90c9490b23ce0f3519364427e4
2012-04-04 12:16:14 -07:00
Gerrit
422f8ea6ba Merge "Add %T format code to print current timestamp." 2012-04-03 13:58:05 -07:00
Randall Spangler
95462ad4fe Add %T format code to print current timestamp.
Signed-off-by: Randall Spangler <rspangler@chromium.org>

BUG=chrome-os-partner:8724
TEST=if timestamps show up in the debug output, it works

Change-Id: I5264a3a40a07a824cc15b39a7bd81f2db02a3c13
2012-04-03 11:35:47 -07:00
Vincent Palatin
1652892d82 lm4f: fix watchdog trace
After commit 84a286b1, the watchdog handler was no longer properly
connected to the interrupt vector.

Also add a couple of flushes to get all the traces.

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

BUG=chrome-os-partner:8721
TEST=type "waitms 5000" in the EC console to trigger the watchdog and
check we get the right serial trace.

Change-Id: I5a4dcdbc9000e7caeb5361d196c1f737a477c353
2012-04-03 16:43:13 +00:00
Gerrit
75343c6970 Merge "Implement persistent flash write protect settings" 2012-04-02 12:49:54 -07:00
Randall Spangler
b70183a9bd Implement persistent flash write protect settings
This uses the last bank of flash to hold persistent settings, and
looks at the write protect GPIO to decide whether to protect the chip
at boot (chrome-os-partner:7453).

For ease of debugging, I've temporarily hacked this so flash uses the
RECOVERYn signal (dut-control goog_rec_mode:on) to enable WP instead
of the write protect signal; this works around chrome-os-partner:8580.

Also note that if you write protect any blocks even temporarily,
you'll need to do a power-on reset to clear them before you can
reprogram the flash.  See chrome-os-partner:8632.  At the EC console,
"hibernate 1" will do that, or you can just yank the power.

This also fixes a bug in the flash write and erase commands, where
they weren't properly detecting failure if you attempted to modify a
protected block (missed an interrupt reason...)

New "flashwp" console commands work.  LPC commands need reworking.

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

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

Change-Id: I49c38cc25c793094ae3331a4586fda0761b4bac6
2012-04-02 10:57:03 -07:00
Randall Spangler
d1a162d4b1 Dump a few words at the start of flash as a diagnostic for full-chip erase failure
Signed-off-by: Randall Spangler <rspangler@chromium.org>

BUG=chrome-os-partner:8632
TEST=manual; run flash_link

Change-Id: I87b02c766345182cea64c5bec980c3940a25b3cf
2012-04-02 10:43:53 -07:00
Bill Richardson
36572d45fa Create slow version of servo config for proto0.5
No point in saying "edit the file if it doesn't work", when we could just
provide a slow version instead.

BUG=none
TEST=none

Change-Id: I94731495635e4dc6d0aa6e3f577cb727af92894a
Signed-off-by: Bill Richardson <wfrichar@chromium.org>
2012-03-28 14:56:16 -07:00
Randall Spangler
41e3b58258 Remove old scratchpad-based reboot-to-image interface
Now that we can jump directly to other images, we don't need this.

We jump to image A by default, unless the recovery button or signal is asserted.

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

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

Reboot -> runs image A
Reboot with reload (F3) held down -> runs RO
Reboot with 'dut-control goog_rec_mode:on' -> runs RO

Change-Id: I8259fe0d738ce0ca897d2f4427d8cf61858b8901
2012-03-20 09:43:46 -07:00
Randall Spangler
b2ac77b37b Support warm reboot from one EC image to another.
This is necessary at init-time for verified boot to jump from RO to
one of the RW images.

It's also used by factory EC update to update one image and then jump
to the updated image to finish the update.  In this case, the x86 does
NOT reboot.

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

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

1) power on x86 and log in
2) sysjump a  --> system is in a; x86 has not rebooted
3) sysjump ro --> system is back in RO; x86 has not rebooted
4) reboot -> system is in RO; x86 HAS rebooted

Change-Id: I9dbadcf9775e146a0718abfd4ee0758b65350a87
2012-03-19 15:41:14 -07:00
Randall Spangler
2a9f80d2d9 More cleanup of board/chip configs and initialization
More modules can be disabled individually through CONFIG_ defines.

Reordered early module pre-init and init, and added comments to
explain why things are ordered in main() the way they are.

Fixed a few assorted init-related bugs along the way, like st32m
keyboard scan double-initializing.

BUG=none
TEST=build link, bds, daisy

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

Change-Id: I04a7fa51d743adfab4be4bdddaeef68943b96dec
2012-03-19 09:04:56 -07:00
Randall Spangler
e68844824b Clean up chip/board configs for LM4
Board-specific features like lightbar should be config'd at the board
level, not at the chip level.

BUG=none
TEST=build link, bds, daisy

Change-Id: If1df2ca0422f7b8bdc172d0df7bd9f6a1af6a9d2
Signed-off-by: Randall Spangler <rspangler@chromium.org>
2012-03-16 14:02:59 -07:00
Randall Spangler
a9f4794edb Add support for 1-wire protocol and power adapter LEDs
BUG=chrome-os-partner:7498
TEST=powerled {off, red, yellow, green}

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

Change-Id: I48beaad94d75c0ec30a969ea4b0e35f54e052085
2012-03-16 11:03:13 -07:00
Vincent Palatin
e456584ce1 Fix test build
Allow to build without the power button task.

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

BUG=None
TEST=make qemu-tests

Change-Id: Ibc757a6641f195f0d10e6a673792b996694f8cec
2012-03-15 21:25:48 +00:00
Randall Spangler
c72f66c050 Add wake signal to PCH
This works similar to SCI/SMI events, but triggers a separate
level-sensitive signal to the PCH instead.

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

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

From EC console:
gpioget PCH_WAKEn --> should be 1
hostevent wake 0x1
close lid switch (with magnet)
hostevent -> should show wake mask 0x1, raw events 0x1
gpioget PCH_WAKEn --> should be 0
hostevent clear 0x1
hostevent -> should show raw events 0
gpioget PCH_WAKEn --> should be 1

Change-Id: I29832c1dc30239a98987578f07dfeb25791dde11
2012-03-15 12:42:11 -07:00
Gerrit
1a3becdbc2 Merge "Add comxtest debug command" 2012-03-14 09:17:41 -07:00
Randall Spangler
1c6709a332 Add comxtest debug command
Remove dummy boot-time output to UART1; no longer needed now that
there's a debug command to do the same thing.

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

BUG=none
TEST=manual
comxtest - prints default message to x86 UART
comxtext ccc123 - prints 'ccc123' to x86 UART

Change-Id: I37d37aeca06bf71b106f5ad3473a79780fd089a9
2012-03-13 16:52:53 -07:00
Randall Spangler
3eafbbe360 Remove unused temp_sensor.c file
Not compiled into any target; new version of temp_sensor.c is in common/

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

BUG=none
TEST=build link and bds

Change-Id: I00232a7cd8a8a9ee6353c5f04c86fcacc83cbd3e
2012-03-13 13:05:59 -07:00
Randall Spangler
eec896d6d8 Watch LPC0RESET line and print changes
For debugging PCH reset.

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

BUG=chrome-os-partner:8397
TEST=power system on, then use x86reset to reset it.  Should see line state changes printed.

Change-Id: Ief2f09bd0986339812183d0b32dc0208437d1103
2012-03-13 12:53:52 -07:00
Randall Spangler
186deea4c4 Use precision internal osciallator for UART and ADC
This simplifies upcoming transitions to/from sleep (with PLL shutdown).

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

BUG=none
TEST=manual - make sure 'adc' command and uarts still work

Change-Id: I070ca2d96ba4fef6fef6519896e7e9a181866efc
2012-03-12 17:59:18 -07:00
Randall Spangler
b3798eaacd GPIO changes for link proto1
Note that this moves the charger to a different I2C port.  If you're
working on battery charging, you'll need to hack board.h in your local
repo to move it back.

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

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

Change-Id: Id94ee2ce1ef6c973c1786037e07d0c64a89a9940
2012-03-12 17:57:25 -07:00
Randall Spangler
9789c3b8fc Fan console commands should enable the fan
And faninfo now checks if the fan is powered.

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

BUG=none
TEST=manual

1) faninfo --> fan is initially disabled and powered off
3) gpioset enable_vs 1 --> fan is now powered on, but still disabled
2) fanset 8000 --> fan is now enabled, and you should hear it

Change-Id: I97f35a20022cabd4520522f2d18ecb7603faabd1
2012-03-08 10:32:36 -08:00
Randall Spangler
6500cb9481 Update LPC mapped switch states with write protect and recovery states
Signed-off-by: Randall Spangler <rspangler@chromium.org>

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

Boot system with lid open.  'ectool switches' should show lid open.

Use 'dut-control goog_rec_mode:on'.  'ectool switches should show
dedicated recovery signal on.'

Use 'dut-control goog_rec_mode:off'.  'ectool switches should show
dedicated recovery signal off.'

Disable write protect via screw.  'ectool switches' should show WP
signal disabled.

Boot system in recovery mode (power+esc+reload).  Should show 0x09.

Change-Id: I0434427c4b5f8c07c02a8714618f7eb101b86fed
2012-03-07 13:28:12 -08:00
Randall Spangler
7e508c0d34 Clean up debug console output
Also prints the current timer value when inits are done, and when the
watchdog task first gets to run (after all higher priority tasks sleep
at least once).

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

BUG=none
TEST=none

Change-Id: I342f86ad087fd18ab064a10a5bcdd0b69ee373d0
2012-03-06 09:28:47 -08:00
Rong Chang
a81f0cd547 Add I2C transmit/receive function
Implement a generalized I2C transmit-receive function that
write-then-read blocks of raw data. Original 8-bit and 16-bit
read/write functions are refactored.

SMBus read-block protocol for ASCII string is also implemented
based on this API.

Signed-off-by: Rong Chang <rongchang@chromium.org>

BUG=chrome-os-partner:8026,8316
TEST=manual:
  Type 'lightsaber' to check 8-bit read/write.
  Type 'charger' to check 16-bit read.
  Type 'charger input 4032' to check 16-bit write.

Change-Id: I0ad3ad45b796d9ec03d8fbc1d643aa6a92d6343f
2012-03-06 12:07:22 +08:00
Randall Spangler
89a8a082b1 Update switch positions in EC mapped data
Note that this only handles lid and power button; see
crosbug.com/p/8325 for write protect.

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

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

1. Check state with lid open
localhost ~ # ectool switches
Current switches: 0x01
Lid switch:       OPEN
Power button:     UP
Write protect:    ENABLED

2. Press power button
localhost ~ # ectool switches
Current switches: 0x03
Lid switch:       OPEN
Power button:     DOWN
Write protect:    ENABLED

3. Release power button and close lid
localhost ~ # ectool switches
Current switches: 0x00
Lid switch:       CLOSED
Power button:     UP
Write protect:    ENABLED

Change-Id: I25f2fa3dfeac004dde9b10a4243ee235875f1b6e
2012-03-05 12:07:50 -08:00
Randall Spangler
0106129061 Only send power button pulse on lid-open when main chipset is off
Signed-off-by: Randall Spangler <rspangler@chromium.org>

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

1. When system is off, open lid.  Debug console should show PB PCH pwrbtn activity.
2. Wait for system to boot.
3. Quickly close and open lid.  Debug console should not show pwrbtn activity.

Change-Id: Ia018ff06a31ac2a68f20021d17e47ddb06096eb8
2012-03-05 10:14:24 -08:00
Randall Spangler
05d89738ba Trigger host events for power button and lid switch
(Also define other host events)

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

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

Use magnet to trigger lid-closed and lid-open.
'hostevent' should show raw events = 0x3.
Press power button.
'hostevent' should now show raw events = 0x7.

Change-Id: I9c8367d5152d526299a7a3149250de84cc2e0557
2012-03-05 09:25:58 -08:00
Randall Spangler
2464e96469 Add SMI/SCI support
BUG=chrome-os-partner:8277
TEST=manual

On EC console:
   hostevent set 0x1e
From root shell:
   ectool eventget --> should return 0x1e
   ectool eventclear 0x02
   ectool eventget --> should return 0x1c
   ectool queryec  --> should return event 3
   ectool queryec  --> should return event 4
   ectool queryec  --> should return event 5
   ectool queryec  --> should return no event pending
   ectool eventsetsmimask 0x1200
   ectool eventsetscimask 0x0034
   ectool eventgetsmimask --> should return 0x1200
   ectool eventgetscimask --> should return 0x0034
On EC console:
   hostevent --> should show raw=0 SMI mask = 0x1200 SCI mask = 0x34

Change-Id: I33042fa80c0b148cd63209a94a184af493e25ed3
2012-03-05 09:23:51 -08:00
Gerrit
2ae113da55 Merge "Handle ghost key in matrix scanner." 2012-03-04 19:16:44 -08:00
Louis Yung-Chieh Lo
763af1f695 Handle ghost key in matrix scanner.
implement actual_key_masks[]. A ghost key exists if two columns share
more than one row (after ANDed actual_key_masks[]).

BUG=chrome-os-partner:7485
TEST=on bds. test cases:
  single press of all keys.
  ~ 1 4 5: later 2 keys should be ignored (ghost).
  h j k: all keys should work.
  u R-shift 0 P: p should be ignored (ghost).
  i R-shift ' p: P should show up.

Change-Id: I1ac105874a5327e839a5240ccbdd6304637ad404
2012-03-02 11:29:06 +08:00
Vic Yang
1db93690d9 Report error when PECI temperature read fails.
We used to have flaky PECI temperature read so we ignored failure. Now
the PECI temperature read seems to work fine so we should have it report
error on failure.

Signed-off-by: Vic Yang <victoryang@chromium.org>

BUG=chrome-os-partner:7493
TEST=When powered off, 'temps' shows error on PECI temperature reading.

Change-Id: I161a8f84f66ba06959c21838ee364b2f8d8b4945
2012-03-01 16:19:54 -08:00
Randall Spangler
9a60f37c8d Refactor LPC status / result codes
This is necessary to support SCI/SMI events.

Note that this breaks compatibility with previous ectool builds - and
probably also breaks flashrom support.

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

BUG=chrome-os-partner:8253
TEST='ectool hello' and 'ectool flashinfo' still work
and 'ectool usbchargemode 3 1' fails with error 2

Change-Id: If39e5b6e7cdcec1b5ec765594e8492925b430b10
2012-03-01 15:22:14 -08:00
Vic Yang
5cd0f292e9 Console command for thermal engine fan control.
Add console command 'autofan' to turn on automatic fan speed control.
Also modify 'fanset' to disable automatic control before setting fan
speed.

Signed-off-by: Vic Yang <victoryang@chromium.org>

BUG=chrome-os-partner:8250
TEST=Manual test

Change-Id: I2db85ce2e754bba21567b2c92e4476049d517627
2012-02-29 16:26:26 -08:00
Vincent Palatin
9ecf232dbd stm32l: fix new line output on the UART
On the STM32L UART without a FIFO, the Transmit Register might need
some time before pushing its content to the shift register.

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

BUG=None
TEST=on ADV board, verify we are no longer missing most of the carriage
return on console.

Change-Id: Ic638dc452d6e30a5f127710fc964143d477fa1d6
2012-02-29 21:28:27 +00:00