From d4bbfe863b8d7f0018e1b1a35034f783293926ea Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Tue, 27 Oct 2015 16:48:36 -0500 Subject: mainboard: Convert #ifdef to IS_ENABLED in get_bus_conf.c Change-Id: I254e9e9e65519edcf4d3f1ecc385af16d18c2367 Signed-off-by: Timothy Pearson Reviewed-on: http://review.coreboot.org/12208 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel Reviewed-by: Martin Roth Reviewed-by: Patrick Georgi --- src/mainboard/tyan/s2881/get_bus_conf.c | 11 ++++------- src/mainboard/tyan/s2885/get_bus_conf.c | 11 ++++------- src/mainboard/tyan/s2891/get_bus_conf.c | 11 ++++------- src/mainboard/tyan/s2892/get_bus_conf.c | 11 ++++------- src/mainboard/tyan/s2895/get_bus_conf.c | 11 ++++------- src/mainboard/tyan/s2912/get_bus_conf.c | 11 ++++------- src/mainboard/tyan/s2912_fam10/get_bus_conf.c | 11 ++++------- 7 files changed, 28 insertions(+), 49 deletions(-) (limited to 'src/mainboard/tyan') diff --git a/src/mainboard/tyan/s2881/get_bus_conf.c b/src/mainboard/tyan/s2881/get_bus_conf.c index 332e578296..5bedef6075 100644 --- a/src/mainboard/tyan/s2881/get_bus_conf.c +++ b/src/mainboard/tyan/s2881/get_bus_conf.c @@ -3,9 +3,7 @@ #include #include #include -#if CONFIG_LOGICAL_CPUS #include -#endif #include #include @@ -106,11 +104,10 @@ void get_bus_conf(void) } /*I/O APICs: APIC ID Version State Address*/ -#if CONFIG_LOGICAL_CPUS - apicid_base = get_apicid_base(3); -#else - apicid_base = CONFIG_MAX_PHYSICAL_CPUS; -#endif + if (IS_ENABLED(CONFIG_LOGICAL_CPUS)) + apicid_base = get_apicid_base(3); + else + apicid_base = CONFIG_MAX_PHYSICAL_CPUS; apicid_8111 = apicid_base + 0; apicid_8131_1 = apicid_base + 1; apicid_8131_2 = apicid_base + 2; diff --git a/src/mainboard/tyan/s2885/get_bus_conf.c b/src/mainboard/tyan/s2885/get_bus_conf.c index 88706c0bd5..2df51a08cd 100644 --- a/src/mainboard/tyan/s2885/get_bus_conf.c +++ b/src/mainboard/tyan/s2885/get_bus_conf.c @@ -3,9 +3,7 @@ #include #include #include -#if CONFIG_LOGICAL_CPUS #include -#endif #include #include @@ -121,11 +119,10 @@ void get_bus_conf(void) } /*I/O APICs: APIC ID Version State Address*/ -#if CONFIG_LOGICAL_CPUS - apicid_base = get_apicid_base(3); -#else - apicid_base = CONFIG_MAX_PHYSICAL_CPUS; -#endif + if (IS_ENABLED(CONFIG_LOGICAL_CPUS)) + apicid_base = get_apicid_base(3); + else + apicid_base = CONFIG_MAX_PHYSICAL_CPUS; apicid_8111 = apicid_base + 0; apicid_8131_1 = apicid_base + 1; apicid_8131_2 = apicid_base + 2; diff --git a/src/mainboard/tyan/s2891/get_bus_conf.c b/src/mainboard/tyan/s2891/get_bus_conf.c index e94c608cc7..1691ce8376 100644 --- a/src/mainboard/tyan/s2891/get_bus_conf.c +++ b/src/mainboard/tyan/s2891/get_bus_conf.c @@ -3,9 +3,7 @@ #include #include #include -#if CONFIG_LOGICAL_CPUS #include -#endif #include #include @@ -153,11 +151,10 @@ void get_bus_conf(void) } /*I/O APICs: APIC ID Version State Address*/ -#if CONFIG_LOGICAL_CPUS - apicid_base = get_apicid_base(3); -#else - apicid_base = CONFIG_MAX_PHYSICAL_CPUS; -#endif + if (IS_ENABLED(CONFIG_LOGICAL_CPUS)) + apicid_base = get_apicid_base(3); + else + apicid_base = CONFIG_MAX_PHYSICAL_CPUS; apicid_ck804 = apicid_base + 0; apicid_8131_1 = apicid_base + 1; apicid_8131_2 = apicid_base + 2; diff --git a/src/mainboard/tyan/s2892/get_bus_conf.c b/src/mainboard/tyan/s2892/get_bus_conf.c index 0ead854448..b49b1ad21b 100644 --- a/src/mainboard/tyan/s2892/get_bus_conf.c +++ b/src/mainboard/tyan/s2892/get_bus_conf.c @@ -3,9 +3,7 @@ #include #include #include -#if CONFIG_LOGICAL_CPUS #include -#endif #include #include @@ -146,11 +144,10 @@ void get_bus_conf(void) } /*I/O APICs: APIC ID Version State Address*/ -#if CONFIG_LOGICAL_CPUS - apicid_base = get_apicid_base(3); -#else - apicid_base = CONFIG_MAX_PHYSICAL_CPUS; -#endif + if (IS_ENABLED(CONFIG_LOGICAL_CPUS)) + apicid_base = get_apicid_base(3); + else + apicid_base = CONFIG_MAX_PHYSICAL_CPUS; apicid_ck804 = apicid_base + 0; apicid_8131_1 = apicid_base + 1; apicid_8131_2 = apicid_base + 2; diff --git a/src/mainboard/tyan/s2895/get_bus_conf.c b/src/mainboard/tyan/s2895/get_bus_conf.c index 11b1bc211e..b8881f5078 100644 --- a/src/mainboard/tyan/s2895/get_bus_conf.c +++ b/src/mainboard/tyan/s2895/get_bus_conf.c @@ -3,9 +3,7 @@ #include #include #include -#if CONFIG_LOGICAL_CPUS #include -#endif #include #include @@ -159,11 +157,10 @@ void get_bus_conf(void) } /*I/O APICs: APIC ID Version State Address*/ -#if CONFIG_LOGICAL_CPUS - apicid_base = get_apicid_base(4); -#else - apicid_base = CONFIG_MAX_PHYSICAL_CPUS; -#endif + if (IS_ENABLED(CONFIG_LOGICAL_CPUS)) + apicid_base = get_apicid_base(4); + else + apicid_base = CONFIG_MAX_PHYSICAL_CPUS; apicid_ck804 = apicid_base + 0; apicid_8131_1 = apicid_base + 1; apicid_8131_2 = apicid_base + 2; diff --git a/src/mainboard/tyan/s2912/get_bus_conf.c b/src/mainboard/tyan/s2912/get_bus_conf.c index 281d66781d..cc305a198c 100644 --- a/src/mainboard/tyan/s2912/get_bus_conf.c +++ b/src/mainboard/tyan/s2912/get_bus_conf.c @@ -24,9 +24,7 @@ #include #include #include -#if CONFIG_LOGICAL_CPUS #include -#endif #include #include #include "mb_sysconf.h" @@ -112,10 +110,9 @@ void get_bus_conf(void) } /*I/O APICs: APIC ID Version State Address*/ -#if CONFIG_LOGICAL_CPUS - apicid_base = get_apicid_base(1); -#else - apicid_base = CONFIG_MAX_PHYSICAL_CPUS; -#endif + if (IS_ENABLED(CONFIG_LOGICAL_CPUS)) + apicid_base = get_apicid_base(1); + else + apicid_base = CONFIG_MAX_PHYSICAL_CPUS; m->apicid_mcp55 = apicid_base+0; } diff --git a/src/mainboard/tyan/s2912_fam10/get_bus_conf.c b/src/mainboard/tyan/s2912_fam10/get_bus_conf.c index 919b37db1c..1c1b201c3d 100644 --- a/src/mainboard/tyan/s2912_fam10/get_bus_conf.c +++ b/src/mainboard/tyan/s2912_fam10/get_bus_conf.c @@ -24,9 +24,7 @@ #include #include #include -#if CONFIG_LOGICAL_CPUS #include -#endif #include @@ -114,10 +112,9 @@ void get_bus_conf(void) } /*I/O APICs: APIC ID Version State Address*/ -#if CONFIG_LOGICAL_CPUS - apicid_base = get_apicid_base(1); -#else - apicid_base = CONFIG_MAX_PHYSICAL_CPUS; -#endif + if (IS_ENABLED(CONFIG_LOGICAL_CPUS)) + apicid_base = get_apicid_base(1); + else + apicid_base = CONFIG_MAX_PHYSICAL_CPUS; m->apicid_mcp55 = apicid_base+0; } -- cgit v1.2.3