Patrick Rudolph has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/39043 )
Change subject: lenovo/*: Fix DRAM init when WWAN card is present ......................................................................
Patch Set 7:
(1 comment)
Patch Set 7:
(2 comments)
I would prefer that we use a consistent decision to enable it across all stages of coreboot. If a specific card always needs power, the user shouldn't turn it off. What would be left to do is to move the current enabling/disabling from ramstage to romstage. e.g.
void h8_early_init(void) { /* comment why we might need it early */ h8_wwan_enable(h8_has_wwan(dev) && h8_wwan_nv_enable()); }
bootblock doesn't need SMBUS, only romstage and ramstage do. If such a card is present it can never be disabled in romstage. What should work is
h8_wwan_enable(h8_has_wwan(dev));
in romstage, but there's no nice way to reference the EC's struct device.
https://review.coreboot.org/c/coreboot/+/39043/7/src/mainboard/lenovo/t420/e... File src/mainboard/lenovo/t420/early_init.c:
https://review.coreboot.org/c/coreboot/+/39043/7/src/mainboard/lenovo/t420/e... PS7, Line 82: * ramstage will turn it off, in case it's not needed.
How to tell if it's not needed? There may be more going on on the […]
There's the AT24 EEPROM, too. It need some changes to handle reading it in DEV_INIT. Then it can be turned off in DEV_FINALIZE.