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>
This commit is contained in:
Kyösti Mälkki
2012-08-21 11:37:11 +03:00
committed by Anton Kochkov
parent 0d5d70b79a
commit fee73df07a
179 changed files with 8 additions and 326 deletions

View File

@ -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");