diff options
Diffstat (limited to 'src/northbridge')
-rw-r--r-- | src/northbridge/amd/amdk8/coherent_ht.c | 1 | ||||
-rw-r--r-- | src/northbridge/amd/amdk8/raminit.c | 5 | ||||
-rw-r--r-- | src/northbridge/amd/amdk8/raminit_f.c | 1 | ||||
-rw-r--r-- | src/northbridge/amd/amdk8/raminit_test.c | 1 | ||||
-rw-r--r-- | src/northbridge/intel/e7501/raminit.c | 1 | ||||
-rw-r--r-- | src/northbridge/intel/i3100/raminit_ep80579.c | 1 | ||||
-rw-r--r-- | src/northbridge/intel/i855/raminit.c | 1 | ||||
-rw-r--r-- | src/northbridge/intel/i945/raminit.c | 1 |
8 files changed, 10 insertions, 2 deletions
diff --git a/src/northbridge/amd/amdk8/coherent_ht.c b/src/northbridge/amd/amdk8/coherent_ht.c index a8d87008f5..6554e075ea 100644 --- a/src/northbridge/amd/amdk8/coherent_ht.c +++ b/src/northbridge/amd/amdk8/coherent_ht.c @@ -66,6 +66,7 @@ #include <device/pci_def.h> #include <device/pci_ids.h> #include <device/hypertransport_def.h> +#include <lib.h> #include <stdlib.h> #include <arch/io.h> #include <pc80/mc146818rtc.h> diff --git a/src/northbridge/amd/amdk8/raminit.c b/src/northbridge/amd/amdk8/raminit.c index 4213cfb3a2..c58abb15ae 100644 --- a/src/northbridge/amd/amdk8/raminit.c +++ b/src/northbridge/amd/amdk8/raminit.c @@ -7,6 +7,7 @@ #include <cpu/x86/cache.h> #include <cpu/x86/mtrr.h> #include <cpu/amd/mtrr.h> +#include <lib.h> #include <stdlib.h> #include <arch/acpi.h> #include <reset.h> @@ -1655,7 +1656,7 @@ static struct spd_set_memclk_result spd_set_memclk(const struct mem_controller * /* if the next lower frequency gives a CL at least one whole cycle * shorter, select that (see end of BKDG 4.1.1.1) */ if (freq < sizeof(cl_at_freq)-1 && cl_at_freq[freq+1] && - log2f(cl_at_freq[freq]) - log2f(cl_at_freq[freq+1]) >= 2) + __ffs(cl_at_freq[freq]) - __ffs(cl_at_freq[freq+1]) >= 2) freq++; if (freq == sizeof(cl_at_freq)) @@ -1690,7 +1691,7 @@ static struct spd_set_memclk_result spd_set_memclk(const struct mem_controller * /* Update DRAM Timing Low with our selected cas latency */ value = pci_read_config32(ctrl->f2, DRAM_TIMING_LOW); value &= ~(DTL_TCL_MASK << DTL_TCL_SHIFT); - value |= latencies[log2f(cl_at_freq[freq]) - 2] << DTL_TCL_SHIFT; + value |= latencies[__ffs(cl_at_freq[freq]) - 2] << DTL_TCL_SHIFT; pci_write_config32(ctrl->f2, DRAM_TIMING_LOW, value); result.dimm_mask = dimm_mask; diff --git a/src/northbridge/amd/amdk8/raminit_f.c b/src/northbridge/amd/amdk8/raminit_f.c index 14696846dc..1c1a6ea142 100644 --- a/src/northbridge/amd/amdk8/raminit_f.c +++ b/src/northbridge/amd/amdk8/raminit_f.c @@ -25,6 +25,7 @@ #include <cpu/x86/tsc.h> #include <cpu/amd/mtrr.h> +#include <lib.h> #include <stdlib.h> #include <arch/acpi.h> #include "raminit.h" diff --git a/src/northbridge/amd/amdk8/raminit_test.c b/src/northbridge/amd/amdk8/raminit_test.c index be46f27bca..87e281d645 100644 --- a/src/northbridge/amd/amdk8/raminit_test.c +++ b/src/northbridge/amd/amdk8/raminit_test.c @@ -1,5 +1,6 @@ #include <unistd.h> #include <limits.h> +#include <lib.h> #include <stdint.h> #include <string.h> #include <setjmp.h> diff --git a/src/northbridge/intel/e7501/raminit.c b/src/northbridge/intel/e7501/raminit.c index f4fc9a8a77..93a3a5b5a9 100644 --- a/src/northbridge/intel/e7501/raminit.c +++ b/src/northbridge/intel/e7501/raminit.c @@ -12,6 +12,7 @@ /* converted to C 6/2004 yhlu */ #include <assert.h> +#include <lib.h> #include <spd.h> #include <sdram_mode.h> #include <stdlib.h> diff --git a/src/northbridge/intel/i3100/raminit_ep80579.c b/src/northbridge/intel/i3100/raminit_ep80579.c index 85660e9c08..ee8c4fd7f7 100644 --- a/src/northbridge/intel/i3100/raminit_ep80579.c +++ b/src/northbridge/intel/i3100/raminit_ep80579.c @@ -22,6 +22,7 @@ #include <cpu/x86/mtrr.h> #include <cpu/x86/cache.h> #include <cpu/intel/speedstep.h> +#include <lib.h> #include "raminit_ep80579.h" #include "ep80579.h" diff --git a/src/northbridge/intel/i855/raminit.c b/src/northbridge/intel/i855/raminit.c index 81dcbb507c..a43f5be6b7 100644 --- a/src/northbridge/intel/i855/raminit.c +++ b/src/northbridge/intel/i855/raminit.c @@ -19,6 +19,7 @@ */ #include <assert.h> +#include <lib.h> #include <spd.h> #include <sdram_mode.h> #include <stdlib.h> diff --git a/src/northbridge/intel/i945/raminit.c b/src/northbridge/intel/i945/raminit.c index a3be6803f0..7bd62402b6 100644 --- a/src/northbridge/intel/i945/raminit.c +++ b/src/northbridge/intel/i945/raminit.c @@ -20,6 +20,7 @@ #include <console/console.h> #include <cpu/x86/mtrr.h> #include <cpu/x86/cache.h> +#include <lib.h> #include <pc80/mc146818rtc.h> #include <spd.h> #include <string.h> |