[coreboot-gerrit] Change in coreboot[master]: mediatek: Refactor memory test code among similar SoCs