summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorKyösti Mälkki <kyosti.malkki@gmail.com>2012-08-21 11:37:11 +0300
committerAnton Kochkov <anton.kochkov@gmail.com>2012-08-22 05:06:41 +0200
commitfee73df07ac0d17f319486f977585c7945e0d069 (patch)
tree001bb70616c06ef24c267ac257dccc498eac227c /util
parent0d5d70b79a3824bfa46a7035d901cb0e7672e3fe (diff)
downloadcoreboot-fee73df07ac0d17f319486f977585c7945e0d069.tar.xz
Auto-declare chip_operations
The name is derived directly from the device path. Change-Id: If2053d14f0e38a5ee0159b47a66d45ff3dff649a Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: http://review.coreboot.org/1471 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <patrick@georgi-clan.de> Reviewed-by: Alexandru Gagniuc <mr.nuke.me@gmail.com> Reviewed-by: Anton Kochkov <anton.kochkov@gmail.com>
Diffstat (limited to 'util')
-rw-r--r--util/sconfig/main.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/util/sconfig/main.c b/util/sconfig/main.c
index eb996a7e9e..fe4c3b8e12 100644
--- a/util/sconfig/main.c
+++ b/util/sconfig/main.c
@@ -624,6 +624,14 @@ int main(int argc, char** argv) {
h = h->next;
fprintf(autogen, "#include \"%s/chip.h\"\n", h->name);
}
+ h = &headers;
+ while (h->next) {
+ h = h->next;
+ char *name_underscore = strdup(h->name);
+ translate_name(name_underscore, 0);
+ fprintf(autogen, "extern struct chip_operations %s_ops;\n", name_underscore);
+ free(name_underscore);
+ }
walk_device_tree(autogen, &root, inherit_subsystem_ids, NULL);
fprintf(autogen, "\n/* pass 0 */\n");