soc/amd/stoneyridge/lpc.c: Refactor lpc_enable_childrens_resources
commitaa1838577dfdd5eb00e7fffbb4d9246ef2a43aab
authorRichard Spiegel <richard.spiegel@silverbackltd.com>
Fri, 6 Oct 2017 01:53:31 +0000 (5 18:53 -0700)
committerMartin Roth <martinroth@google.com>
Sun, 15 Oct 2017 22:10:02 +0000 (15 22:10 +0000)
tree34aaf797fa6d9225c3ba52b894702ecee97954e9
parent1a81a4d1351006ebbb33238f8dcaccc98df694e5
soc/amd/stoneyridge/lpc.c: Refactor lpc_enable_childrens_resources

Factor out the code into separate functions.

Create set_lpc_resource that will set the resource for a particular child while
lpc_enable_childrens_resources finds all children and calls set_lpc_resource
for each child found. This creates well defined boundaries for each function.

Change-Id: I265cfac2049733481faf8a6e5b02e34aadae11f5
Signed-off-by: Richard Spiegel <richard.spiegel@silverbackltd.com>
Reviewed-on: https://review.coreboot.org/21904
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Marc Jones <marc@marcjonesconsulting.com>
src/soc/amd/stoneyridge/lpc.c