Attention is currently required from: Felix Singer, Nico Huber, Raul Rangel, Furquan Shaikh, Matt DeVillier, Angel Pons, Patrick Rudolph, Felix Held.

Felix Singer uploaded patch set #16 to this change.

View Change

[RFC] device: Introduce new method for setting device states

We mostly use the same mechanism for setting the state of internal
devices, but we copy it over again and again. Thus, introduce a new
method trying to reduce redundant code.

Basically, this uses an array of structs containing the DEVFN number,
its corresponding FSP option and an indicator if the FSP option is
inverted. The struct maps the device to its related FSP option and
`set_dev_state_by_devicetree()` iterates over the array using the usual
mechanism.

Unresolved issues:
- Where should fspdevmap{.c,.h} be implemented?

Change-Id: I70fde306c65a8881f565c5f923be20f380ea64d3
Signed-off-by: Felix Singer <felixsinger@posteo.net>
---
M src/device/Makefile.inc
A src/device/devenmap.c
A src/include/device/devenmap.h
3 files changed, 41 insertions(+), 0 deletions(-)

git pull ssh://review.coreboot.org:29418/coreboot refs/changes/93/52493/16

To view, visit change 52493. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I70fde306c65a8881f565c5f923be20f380ea64d3
Gerrit-Change-Number: 52493
Gerrit-PatchSet: 16
Gerrit-Owner: Felix Singer <felixsinger@posteo.net>
Gerrit-Reviewer: Angel Pons <th3fanbus@gmail.com>
Gerrit-Reviewer: Felix Held <felix-coreboot@felixheld.de>
Gerrit-Reviewer: Furquan Shaikh <furquan@google.com>
Gerrit-Reviewer: Matt DeVillier <matt.devillier@gmail.com>
Gerrit-Reviewer: Michael Niewöhner <foss@mniewoehner.de>
Gerrit-Reviewer: Nico Huber <nico.h@gmx.de>
Gerrit-Reviewer: Patrick Rudolph <siro@das-labor.org>
Gerrit-Reviewer: Raul Rangel <rrangel@chromium.org>
Gerrit-Reviewer: Tim Wawrzynczak <twawrzynczak@chromium.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org>
Gerrit-CC: Paul Menzel <paulepanter@mailbox.org>
Gerrit-Attention: Felix Singer <felixsinger@posteo.net>
Gerrit-Attention: Nico Huber <nico.h@gmx.de>
Gerrit-Attention: Raul Rangel <rrangel@chromium.org>
Gerrit-Attention: Furquan Shaikh <furquan@google.com>
Gerrit-Attention: Matt DeVillier <matt.devillier@gmail.com>
Gerrit-Attention: Angel Pons <th3fanbus@gmail.com>
Gerrit-Attention: Patrick Rudolph <siro@das-labor.org>
Gerrit-Attention: Felix Held <felix-coreboot@felixheld.de>
Gerrit-MessageType: newpatchset