device,nb/amd: Deduplicate add_more_links()
commitf77f7cdf891a3ab47f71eb392e4229ece33f27ac
authorJacob Garber <jgarber1@ualberta.ca>
Wed, 5 Jun 2019 22:32:28 +0000 (5 16:32 -0600)
committerMartin Roth <martinroth@google.com>
Fri, 28 Jun 2019 19:30:09 +0000 (28 19:30 +0000)
treeda68aa379496d3d822889a8323ad9c1370477eec
parentd10680bbbfc045627625ca0ce79e04491978cedf
device,nb/amd: Deduplicate add_more_links()

This function is duplicated in many AMD northbridge files, and all
the definitions have started to diverge somewhat. This moves a single
copy into device utils and deletes the rest. The function definition
from nb/amd/amdfam10 was chosen to be kept, since it contains several
fixes from commit 59d609217b (AMD fam10: Fix add_more_links) that
the others don't have.

For the ease of diffing, the checkpatch lints and other small cleanups
will be done in a follow-up patch.

Change-Id: I5ea73126092449db3f18e19ac0660439313072de
Signed-off-by: Jacob Garber <jgarber1@ualberta.ca>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/33237
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
src/device/device_util.c
src/include/device/device.h
src/northbridge/amd/agesa/family15tn/northbridge.c
src/northbridge/amd/agesa/family16kb/northbridge.c
src/northbridge/amd/amdfam10/northbridge.c
src/northbridge/amd/pi/00630F01/northbridge.c
src/northbridge/amd/pi/00660F01/northbridge.c
src/northbridge/amd/pi/00730F01/northbridge.c