The whole cannonlake_memcfg_init() seems to be not designed very well.
Please improve the api.

You could add an enum for each DIMM:
NOT_EXISTING,
READ_SMBUS,
READ_SPD_CBFS,
READ_SPD_MEMPTR

That way the board config would hold all possible combinations.

View Change

6 comments:

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

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Ice22b103664187834e255d1359bfd9b51993b5b6
Gerrit-Change-Number: 31262
Gerrit-PatchSet: 8
Gerrit-Owner: Shelley Chen <shchen@google.com>
Gerrit-Reviewer: Furquan Shaikh <furquan@google.com>
Gerrit-Reviewer: Patrick Rudolph <siro@das-labor.org>
Gerrit-Reviewer: Shelley Chen <shchen@google.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org>
Gerrit-CC: Aamir Bohra <aamir.bohra@intel.com>
Gerrit-CC: Aaron Durbin <adurbin@chromium.org>
Gerrit-CC: Duncan Laurie <dlaurie@chromium.org>
Gerrit-CC: Patrick Rudolph <patrick.rudolph@9elements.com>
Gerrit-CC: Paul Menzel <paulepanter@users.sourceforge.net>
Gerrit-CC: Rizwan Qureshi <rizwan.qureshi@intel.com>
Gerrit-Comment-Date: Fri, 15 Feb 2019 09:06:30 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment