Michael Niewöhner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/35643 )
Change subject: util/intelp2m: add Intel Pad to Macro util ......................................................................
Patch Set 11:
Patch Set 11:
Patch Set 11:
Why not make it part of inteltool? Yet another tool won't make it easier to keep src/ and util/ sync'ed. If you want to look into it, there is already a stale (out of sync) commit on Gerrit for inteltool.
This would imply rewriting this tool in C. I don't think it's too complex, but it's work that would need to be done.
Maybe this would fit better inside autoport? It happens to be written in Go already, so rewriting would not be needed.
While this is absolutely great (thank you Maxim!), I too, vote for putting this functionality into inteltool (looking at the code it shouldn't be that much work):
Inteltool reads registers (integer) and outputs text; then intelp2m reads that text, parses it to integer, does some magic bit checking, and finally outputs that gpio.h. The whole parsing step could be completely skipped by implementing the conversion in inteltool. After looking at the code, I am pretty sure the whole thing can be thrown into inteltool as-is after replacing any Go-syntax by C-syntax.