Arthur Heymans has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/48083 )
Change subject: mb/supermicro/x11-lga1151-series: switch from dev.init to mb_ops.init ......................................................................
Patch Set 6:
(1 comment)
https://review.coreboot.org/c/coreboot/+/48083/5//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/48083/5//COMMIT_MSG@9 PS5, Line 9: Set mainboard_ops.init directly instead of using the indirection via a : mainboard_enable function.
huh? this does not change any behaviour. mainboard_ops. […]
So there is a difference between struct device_operations and struct chip_operations. Both have an init function which is probably confusing you. The ramstage are as follows:
BS_PRE_DEVICE, BS_DEV_INIT_CHIPS, BS_DEV_ENUMERATE, BS_DEV_RESOURCES, BS_DEV_ENABLE, BS_DEV_INIT, BS_POST_DEVICE, BS_OS_RESUME_CHECK, BS_OS_RESUME, BS_WRITE_TABLES, BS_PAYLOAD_LOAD, BS_PAYLOAD_BOOT,
So if you place this in the struct chip_operations it will run before any resource allocation. This is why the mainboard code often places init code in the struct device_operations like the code does here (before this change). Now granted, it looks like this mainboard init code only thouches prc, which is likely ok to do, as a general rule you want that to happen after resource allocation.