coreboot-kgpe-d16/src/ec
Matt DeVillier 680ed1f632 ec/chromeec: fix LPC read/write for MEC devices
Commit 8cf8aa2 [ec/google/chromeec: Use common MEC interface]
changed the return mechanism for the checksum on reads/writes
for MEC devices, but incorrectly handled the passed-in csum
parameter by not dereferencing. This led to the returned csum
value always being zero, which causes all EC commands with non-
NULL data_in to fail with a checksum error.

Fix this by storing the returned checksum in a temp variable,
and only assigning to csum when the pointer isn't NULL;

Test: build/boot google/chell, verify EC hello command succeeds,
keyboard backlight turned on at boot.

Change-Id: I7122c3fdc5a19f87f12975ee448728cf29948436
Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-on: https://review.coreboot.org/c/30444
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2018-12-28 12:24:52 +00:00
..
acpi src/ec: Remove whitespace before tab 2018-06-04 09:15:51 +00:00
compal/ene932 ec/compal: pass ops to pnp_enable_devices instead of LDN-specific override 2018-07-26 18:18:28 +00:00
google ec/chromeec: fix LPC read/write for MEC devices 2018-12-28 12:24:52 +00:00
hp/kbc1126 ec/hp/kbc1126: change the default offset of the blobs 2017-12-25 14:44:23 +00:00
kontron/it8516e device/pnp: remove struct io_info 2017-06-13 15:21:58 +02:00
lenovo lenovo/h8,thinkpads: Re-do USB Always On 2018-12-06 11:59:22 +00:00
purism/librem ec/purism: Fix CPU Turbo value (PPCM) set by the EC 2018-03-26 10:25:58 +00:00
quanta ec/quanta: pass ops to pnp_enable_devices instead of LDN-specific override 2018-07-26 18:18:54 +00:00
roda/it8518 src: Use tabs for indentation 2018-10-08 09:46:16 +00:00
smsc/mec1308 src: Use tabs for indentation 2018-10-08 09:46:16 +00:00
ec.h mainboards,ec: provide common declaration for mainboard_ec_init() 2016-09-26 23:53:12 +02:00