AMD northbridges: rewrite CPU allocation

Use of alloc_find_dev() prevents creation of a device duplicates
for device_path and is SMP safe.

Reduce scope of variables to make the code more readable and in
preparation for refactoring the allocation out of northbridge.c.

Change-Id: I153dc1a5cab4f2eae4ab3a57af02841cb1a261c0
Signed-off-by: Kyösti Mälkki <>
Tested-by: build bot (Jenkins)
Reviewed-by: Anton Kochkov <>
Reviewed-by: Alexandru Gagniuc <>
6 files changed