Nico Huber has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/38541 )
Change subject: ec/google/chromeec: Add SSDT generator for ChromeOS EC
......................................................................
Patch Set 18:
(1 comment)
https://review.coreboot.org/c/coreboot/+/38541/18/src/ec/google/chromeec/ec_...
File src/ec/google/chromeec/ec_lpc.c:
https://review.coreboot.org/c/coreboot/+/38541/18/src/ec/google/chromeec/ec_...
PS18, Line 463: pnp_enable_devices(dev, &ops, ARRAY_SIZE(pnp_dev_info), pnp_dev_info);
Good catch, Nico, thank you!
Well, Matt already figured out that something is wrong with this patch. I just
had to narrow it down :)
Regarding a fix, I don't think we need the pnp_* stuff here. What this
effectively does is looking up a similar dev with `fn == 0`, then setting
`.ops` if it isn't already. Assuming the passed `dev` is always the correct
one, we could just override specific ops:
void google_ec_enable_extra(struct device *dev)
{
if (!dev->ops)
return;
dev->ops.init = lpc_ec_init;
dev->ops.read_resources = lpc_ec_read_resources;
}
Assuming we will be called with the correct dev amongst others, we could
add a check for `fn == 0`.
--
To view, visit
https://review.coreboot.org/c/coreboot/+/38541
To unsubscribe, or for help writing mail filters, visit
https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I729caecd64d9320fb02c0404c8315122f010970b
Gerrit-Change-Number: 38541
Gerrit-PatchSet: 18
Gerrit-Owner: Tim Wawrzynczak
twawrzynczak@chromium.org
Gerrit-Reviewer: Duncan Laurie
dlaurie@chromium.org
Gerrit-Reviewer: Furquan Shaikh
furquan@google.com
Gerrit-Reviewer: Martin Roth
martinroth@google.com
Gerrit-Reviewer: Patrick Georgi
pgeorgi@google.com
Gerrit-Reviewer: Shelley Chen
shchen@google.com
Gerrit-Reviewer: Tim Wawrzynczak
twawrzynczak@chromium.org
Gerrit-Reviewer: build bot (Jenkins)
no-reply@coreboot.org
Gerrit-CC: Matt DeVillier
matt.devillier@gmail.com
Gerrit-CC: Nico Huber
nico.h@gmx.de
Gerrit-CC: Paul Menzel
paulepanter@users.sourceforge.net
Gerrit-Comment-Date: Thu, 05 Mar 2020 16:03:00 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Nico Huber
nico.h@gmx.de
Comment-In-Reply-To: Furquan Shaikh
furquan@google.com
Comment-In-Reply-To: Matt DeVillier
matt.devillier@gmail.com
Comment-In-Reply-To: Tim Wawrzynczak
twawrzynczak@chromium.org
Gerrit-MessageType: comment