nb/intel/sandybridge: Improve CAS freq selection

The previous code seemed weird and tried to check if its selected
value is supported three times.

This also lower the clock if a selected frequency does not result in a
supported CAS number.

Change-Id: I97244bc3940813c5a5fcbd770d71cca76d21fcae
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/19716
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
This commit is contained in:
Arthur Heymans
2017-05-16 17:58:25 +02:00
parent f6934f5c6c
commit dcd3cef874
2 changed files with 65 additions and 56 deletions

View File

@@ -39,6 +39,8 @@
* These values are in 1/256 ns units.
* @{
*/
#define NS2MHZ_DIV256 1000 << 8
#define TCK_1333MHZ 192
#define TCK_1200MHZ 212
#define TCK_1100MHZ 232