amd/mct/ddr3: Rework memory speed to clock value conversion logic

The existing DRAM clock speed to configuration value logic contained
an error resulting in a theoretical out of bounds read.  While this
would not be hit on real hardware, it was prudent to clean up the
logic to avoid the associated Coverity warning.

Found-by: Coverity Scan #1347353
Change-Id: Ic3de3074f51d52be112a2d6f2d68e35dc881dd2e
Signed-off-by: Timothy Pearson <tpearson@raptorengineering.com>
Reviewed-on: https://review.coreboot.org/18073
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
Tested-by: Raptor Engineering Automated Test Stand <noreply@raptorengineeringinc.com>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
1 file changed