Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Omitting checks for fieldset names allowed the combine pass to eagerly merge fieldsets it believed were equivalent. Consider the LPI2C.SIER register. On the 1000 series, the "address match 1 interrupt enable" field is called "AM1IE." And on the 1100 series, the same field is called "AM1F." Same meaning, but a different name. By eagerly combining, we have no need to generate another
lpi2c.rs
file, and we have 1675 fewer lines of code.The assumption fails when that name difference is meaningful, like when NXP changes the CCM.CS1CDR field at offset 25 from FLEXIO1_CLK_PODF to FLEXIO2_CLK_PODF. Those aren't equivalent fields, but we don't know that because we're not checking the field name.
It's always correct to not combine. And turns out it's not adding too much code; we can patch the small name corrections like the LPI2C example.
This PR ensures the combiner always equates fieldset names. It also adds raltool patches to rename specific fieldsets that truly should have the same name. The PR corrects the concrete case identified in #32, but it does not fully address the greediness problem. See individual commits for more information and to simplify review.