diff options
author | NĂcolas F. R. A. Prado <nfraprado@collabora.com> | 2024-02-12 15:50:06 +0100 |
---|---|---|
committer | Tzung-Bi Shih <tzungbi@kernel.org> | 2024-02-17 01:53:05 +0100 |
commit | f1cebae1dbf85f9de65c13a2d9f5cc3be7e51dc4 (patch) | |
tree | bc4caee936259bd00189128ed61ab52eefd6ad68 /scripts/mod/file2alias.c | |
parent | firmware: coreboot: Generate modalias uevent for devices (diff) | |
download | linux-f1cebae1dbf85f9de65c13a2d9f5cc3be7e51dc4.tar.xz linux-f1cebae1dbf85f9de65c13a2d9f5cc3be7e51dc4.zip |
firmware: coreboot: Generate aliases for coreboot modules
Generate aliases for coreboot modules to allow automatic module probing.
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Reviewed-by: Brian Norris <briannorris@chromium.org>
Signed-off-by: NĂcolas F. R. A. Prado <nfraprado@collabora.com>
Acked-by: Masahiro Yamada <masahiroy@kernel.org>
Link: https://lore.kernel.org/r/20240212-coreboot-mod-defconfig-v4-2-d14172676f6d@collabora.com
Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org>
Diffstat (limited to 'scripts/mod/file2alias.c')
-rw-r--r-- | scripts/mod/file2alias.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/scripts/mod/file2alias.c b/scripts/mod/file2alias.c index 4829680a0a6d..5d1c61fa5a55 100644 --- a/scripts/mod/file2alias.c +++ b/scripts/mod/file2alias.c @@ -1494,6 +1494,15 @@ static int do_vchiq_entry(const char *filename, void *symval, char *alias) return 1; } +/* Looks like: coreboot:tN */ +static int do_coreboot_entry(const char *filename, void *symval, char *alias) +{ + DEF_FIELD(symval, coreboot_device_id, tag); + sprintf(alias, "coreboot:t%08X", tag); + + return 1; +} + /* Does namelen bytes of name exactly match the symbol? */ static bool sym_is(const char *name, unsigned namelen, const char *symbol) { @@ -1575,6 +1584,7 @@ static const struct devtable devtable[] = { {"ishtp", SIZE_ishtp_device_id, do_ishtp_entry}, {"cdx", SIZE_cdx_device_id, do_cdx_entry}, {"vchiq", SIZE_vchiq_device_id, do_vchiq_entry}, + {"coreboot", SIZE_coreboot_device_id, do_coreboot_entry}, }; /* Create MODULE_ALIAS() statements. |