Nico Huber uploaded patch set #2 to this change.
[RFC] sconfig: Allow to give static device nodes a name
Rarely, the driver of one device needs to know about another device
that can be anywhere in the device hierarchy. Current applications
boil down to EEPROMs that store information that is consumed by some
code (e.g. MAC address, SMBIOS data).
The idea is to give device nodes in the `devicetree.cb` a name that can
later be used in C code to identify the device (without having to look
it up by fragile means). For this, we add an optional `as <identifier>`
to the device declaration, for instance:
device i2c 0x50 as serial_eeprom on end
This leads to a `struct device __static_serial_eeprom;` that can then
be used throughout coreboot. The name should actually be defined by
the code that is using the device.
Change-Id: I058a319f9b968924fbef9485a96c9e3f900a3ee8
Signed-off-by: Nico Huber <nico.huber@secunet.com>
---
M Makefile.inc
M util/sconfig/lex.yy.c_shipped
M util/sconfig/main.c
M util/sconfig/sconfig.h
M util/sconfig/sconfig.l
M util/sconfig/sconfig.tab.c_shipped
M util/sconfig/sconfig.tab.h_shipped
M util/sconfig/sconfig.y
8 files changed, 589 insertions(+), 505 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/56/35456/2
To view, visit change 35456. To unsubscribe, or for help writing mail filters, visit settings.