i think in the original patch this was intentional, but i do prefer the version with less code duplication. one thing that would be great to be fixed is that this functionality clubbers the other bits of the register; https://review.coreboot.org/c/coreboot/+/42134 provides functionality to avoid that issue; iirc this issue was one of the motivations for said patch

Patch set 1:Code-Review +1

View Change

To view, visit change 45970. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Ib4f787e3c883b1fec941de77bc8e19ccf0d5224c
Gerrit-Change-Number: 45970
Gerrit-PatchSet: 1
Gerrit-Owner: Paul Menzel <paulepanter@users.sourceforge.net>
Gerrit-Reviewer: Felix Held <felix-coreboot@felixheld.de>
Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org>
Gerrit-Comment-Date: Sat, 03 Oct 2020 16:20:13 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment