aboutsummaryrefslogtreecommitdiff
path: root/src/northbridge/amd/amdk8/coherent_ht.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/northbridge/amd/amdk8/coherent_ht.c')
-rw-r--r--src/northbridge/amd/amdk8/coherent_ht.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/northbridge/amd/amdk8/coherent_ht.c b/src/northbridge/amd/amdk8/coherent_ht.c
index 10ca6ee013..b0865fb3ee 100644
--- a/src/northbridge/amd/amdk8/coherent_ht.c
+++ b/src/northbridge/amd/amdk8/coherent_ht.c
@@ -73,7 +73,7 @@
#include <stdint.h>
#include <arch/io.h>
#include <pc80/mc146818rtc.h>
-#if CONFIG_HAVE_OPTION_TABLE
+#if IS_ENABLED(CONFIG_HAVE_OPTION_TABLE)
#include "option_table.h"
#endif
@@ -258,8 +258,8 @@ static uint16_t read_freq_cap(pci_devfn_t dev, uint8_t pos)
freq_cap = pci_read_config16(dev, pos);
freq_cap &= ~(1 << HT_FREQ_VENDOR); /* Ignore Vendor HT frequencies */
-#if CONFIG_K8_HT_FREQ_1G_SUPPORT
- #if !CONFIG_K8_REV_F_SUPPORT
+#if IS_ENABLED(CONFIG_K8_HT_FREQ_1G_SUPPORT)
+ #if !IS_ENABLED(CONFIG_K8_REV_F_SUPPORT)
if (!is_cpu_pre_e0())
#endif
{
@@ -633,7 +633,7 @@ static void setup_remote_row_indirect_group(const u8 *conn, int num)
static void setup_uniprocessor(void)
{
printk(BIOS_SPEW, "Enabling UP settings\n");
-#if CONFIG_LOGICAL_CPUS
+#if IS_ENABLED(CONFIG_LOGICAL_CPUS)
unsigned tmp = (pci_read_config32(NODE_MC(0), 0xe8) >> 12) & 3;
if (tmp > 0) return;
#endif
@@ -1516,7 +1516,7 @@ static void clear_dead_routes(unsigned nodes)
}
#endif /* CONFIG_MAX_PHYSICAL_CPUS > 1 */
-#if CONFIG_LOGICAL_CPUS
+#if IS_ENABLED(CONFIG_LOGICAL_CPUS)
static unsigned verify_dualcore(unsigned nodes)
{
unsigned node, totalcpus, tmp;
@@ -1535,10 +1535,10 @@ static unsigned verify_dualcore(unsigned nodes)
static void coherent_ht_finalize(unsigned nodes)
{
unsigned node;
-#if !CONFIG_K8_REV_F_SUPPORT
+#if !IS_ENABLED(CONFIG_K8_REV_F_SUPPORT)
int rev_a0;
#endif
-#if CONFIG_LOGICAL_CPUS
+#if IS_ENABLED(CONFIG_LOGICAL_CPUS)
unsigned total_cpus;
if (read_option(multi_core, 0) == 0) { /* multi_core */
@@ -1556,7 +1556,7 @@ static void coherent_ht_finalize(unsigned nodes)
*/
printk(BIOS_SPEW, "coherent_ht_finalize\n");
-#if !CONFIG_K8_REV_F_SUPPORT
+#if !IS_ENABLED(CONFIG_K8_REV_F_SUPPORT)
rev_a0 = is_cpu_rev_a0();
#endif
for (node = 0; node < nodes; node++) {
@@ -1567,7 +1567,7 @@ static void coherent_ht_finalize(unsigned nodes)
/* Set the Total CPU and Node count in the system */
val = pci_read_config32(dev, 0x60);
val &= (~0x000F0070);
-#if CONFIG_LOGICAL_CPUS
+#if IS_ENABLED(CONFIG_LOGICAL_CPUS)
val |= ((total_cpus-1)<<16)|((nodes-1)<<4);
#else
val |= ((nodes-1)<<16)|((nodes-1)<<4);
@@ -1587,7 +1587,7 @@ static void coherent_ht_finalize(unsigned nodes)
(3 << HTTC_HI_PRI_BYP_CNT_SHIFT);
pci_write_config32(dev, HT_TRANSACTION_CONTROL, val);
-#if !CONFIG_K8_REV_F_SUPPORT
+#if !IS_ENABLED(CONFIG_K8_REV_F_SUPPORT)
if (rev_a0) {
pci_write_config32(dev, 0x94, 0);
pci_write_config32(dev, 0xb4, 0);
@@ -1607,7 +1607,7 @@ static int apply_cpu_errata_fixes(unsigned nodes)
pci_devfn_t dev;
uint32_t cmd;
dev = NODE_MC(node);
-#if !CONFIG_K8_REV_F_SUPPORT
+#if !IS_ENABLED(CONFIG_K8_REV_F_SUPPORT)
if (is_cpu_pre_c0()) {
/* Errata 66
@@ -1652,7 +1652,7 @@ static int apply_cpu_errata_fixes(unsigned nodes)
#endif
-#if !CONFIG_K8_REV_F_SUPPORT
+#if !IS_ENABLED(CONFIG_K8_REV_F_SUPPORT)
/* I can't touch this msr on early buggy cpus, and cannot apply either 169 or 131 */
if (!is_cpu_pre_b3())
#endif
@@ -1770,7 +1770,7 @@ int optimize_link_coherent_ht(void)
return needs_reset;
}
-#if CONFIG_RAMINIT_SYSINFO
+#if IS_ENABLED(CONFIG_RAMINIT_SYSINFO)
void setup_coherent_ht_domain(void)
#else
int setup_coherent_ht_domain(void)
@@ -1792,7 +1792,7 @@ int setup_coherent_ht_domain(void)
}
coherent_ht_finalize(nodes);
-#if !CONFIG_RAMINIT_SYSINFO
+#if !IS_ENABLED(CONFIG_RAMINIT_SYSINFO)
return optimize_link_coherent_ht();
#endif
}