Date: Sun, 1 Sep 2024 13:28:05 GMT From: "Bjoern A. Zeeb" <bz@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: b4ef1b1be753 - main - tools/sdiodevs2h.awk: introduce palias Message-ID: <202409011328.481DS54q030871@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=b4ef1b1be753952a4aafa505817164624f712c37 commit b4ef1b1be753952a4aafa505817164624f712c37 Author: Bjoern A. Zeeb <bz@FreeBSD.org> AuthorDate: 2024-08-27 18:41:17 +0000 Commit: Bjoern A. Zeeb <bz@FreeBSD.org> CommitDate: 2024-08-31 21:37:53 +0000 tools/sdiodevs2h.awk: introduce palias Some of the defined names are not the direct 1:1 mapping with vendor and device names used by Linux device drivers. Introduce a p(roduct)alias so we can map the one device entry I came across without much extra hassle and generate a name device drivers know about: palias BROADCOM_CYPRESS_43439 CYPRESS_43439 Sponsored by: The FreeBSD Foundation MFC after: 3 days Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D46455 --- sys/tools/sdiodevs2h.awk | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/sys/tools/sdiodevs2h.awk b/sys/tools/sdiodevs2h.awk index 596d09531ab1..99735dc09a62 100644 --- a/sys/tools/sdiodevs2h.awk +++ b/sys/tools/sdiodevs2h.awk @@ -149,6 +149,18 @@ function product(hfile) printf("\n") > hfile } +function palias(hfile) +{ + nproducts++ + + products[nproducts, 1] = $2; # vendor name + products[nproducts, 2] = $3; # product id + products[nproducts, 3] = $4; # id + if (hfile) + printf("#define\tSDIO_DEVICE_ID_%s\tSDIO_DEVICE_ID_%s\n", \ + $2, $3) > hfile +} + function dump_dfile(dfile) { printf("\n") > dfile @@ -243,6 +255,10 @@ while ((getline < srcfile) > 0) { product(hfile) continue } + if ($1 == "palias") { + palias(hfile) + continue + } if ($0 == "") blanklines++ if (hfile)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202409011328.481DS54q030871>