Felix Held has uploaded this change for review. ( https://review.coreboot.org/27390
Change subject: superio/renesas: remove LDN-specific ops overrides
......................................................................
superio/renesas: remove LDN-specific ops overrides
The pnp ops struct is already passed to the pnp_enable_devices function and it
is used if no override is supplied in the elements of the pnp_info struct array
Change-Id: I42469c844074db57071d0191d12d8fd64f462672
Signed-off-by: Felix Held <felix-coreboot(a)felixheld.de>
---
M src/superio/renesas/m3885x/superio.c
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/90/27390/1
diff --git a/src/superio/renesas/m3885x/superio.c b/src/superio/renesas/m3885x/superio.c
index 94f6a07..ab205db 100644
--- a/src/superio/renesas/m3885x/superio.c
+++ b/src/superio/renesas/m3885x/superio.c
@@ -54,7 +54,7 @@
};
static struct pnp_info pnp_dev_info[] = {
- { &ops, 0, 0, 0, }
+ { NULL, 0, 0, 0, }
};
static void enable_dev(struct device *dev)
--
To view, visit https://review.coreboot.org/27390
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I42469c844074db57071d0191d12d8fd64f462672
Gerrit-Change-Number: 27390
Gerrit-PatchSet: 1
Gerrit-Owner: Felix Held <felix-coreboot(a)felixheld.de>
Hello build bot (Jenkins), Nico Huber,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/27384
to look at the new patch set (#2).
Change subject: pnp_device: improve readability
......................................................................
pnp_device: improve readability
Add comments on the ops handling in pnp_enable_devices function and the
pnp_info struct.
Also remove the negation in the check if an LDN-specific override is used.
This patch doesn't change the logic though.
Change-Id: I3e80dbce1f29ee3e95e3b1d71c9b8479561d5c1a
Signed-off-by: Felix Held <felix-coreboot(a)felixheld.de>
---
M src/device/pnp_device.c
M src/include/device/pnp.h
2 files changed, 7 insertions(+), 4 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/84/27384/2
--
To view, visit https://review.coreboot.org/27384
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I3e80dbce1f29ee3e95e3b1d71c9b8479561d5c1a
Gerrit-Change-Number: 27384
Gerrit-PatchSet: 2
Gerrit-Owner: Felix Held <felix-coreboot(a)felixheld.de>
Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Felix Held has uploaded this change for review. ( https://review.coreboot.org/27384
Change subject: pnp_device: improve readability
......................................................................
pnp_device: improve readability
Add comments on the ops handling in pnp_enable_devices function and the
pnp_info struct.
Also remove the negation in the check if an LDN-specific override is used.
This patch doesn't change the logic though.
Change-Id: I3e80dbce1f29ee3e95e3b1d71c9b8479561d5c1a
---
M src/device/pnp_device.c
M src/include/device/pnp.h
2 files changed, 7 insertions(+), 4 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/84/27384/1
diff --git a/src/device/pnp_device.c b/src/device/pnp_device.c
index ba05c82..821b054 100644
--- a/src/device/pnp_device.c
+++ b/src/device/pnp_device.c
@@ -386,10 +386,13 @@
if (dev->ops)
continue;
- if (info[i].ops == 0)
- dev->ops = ops;
- else
+ /* use LDN-specific ops override from corresponding pnp_info
+ * entry if not NULL */
+ if (info[i].ops)
dev->ops = info[i].ops;
+ /* else use device ops */
+ else
+ dev->ops = ops;
get_resources(dev, &info[i]);
}
diff --git a/src/include/device/pnp.h b/src/include/device/pnp.h
index e3839c6..d753013 100644
--- a/src/include/device/pnp.h
+++ b/src/include/device/pnp.h
@@ -31,7 +31,7 @@
/* PNP helper operations */
struct pnp_info {
- struct device_operations *ops;
+ struct device_operations *ops; /* LDN-specific ops override */
unsigned int function; /* Must be at least 16 bits (virtual LDNs)! */
unsigned int flags;
#define PNP_IO0 0x000001
--
To view, visit https://review.coreboot.org/27384
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I3e80dbce1f29ee3e95e3b1d71c9b8479561d5c1a
Gerrit-Change-Number: 27384
Gerrit-PatchSet: 1
Gerrit-Owner: Felix Held <felix-coreboot(a)felixheld.de>