Edward O'Callaghan (eocallaghan@alterapraxis.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/7289
-gerrit
commit 4526f86e974398302cfb1d2d4cc4aea8d51dc956 Author: Edward O'Callaghan eocallaghan@alterapraxis.com Date: Fri Oct 31 08:26:21 2014 +1100
northbridge/via: Use DEVICE_NOOP macro over dummy symbol
Change-Id: Ib9d0fae363c5c1fbed3a63cb8aa86716cf1f9ee1 Signed-off-by: Edward O'Callaghan eocallaghan@alterapraxis.com --- src/northbridge/via/cn400/agp.c | 2 +- src/northbridge/via/cn400/cn400.h | 7 ------- src/northbridge/via/cn400/northbridge.c | 18 +++++++----------- src/northbridge/via/cn400/vlink.c | 18 +++++++++--------- src/northbridge/via/cn700/agp.c | 4 ++-- src/northbridge/via/cn700/cn700.h | 7 ------- src/northbridge/via/cn700/northbridge.c | 12 ++++-------- src/northbridge/via/cx700/agp.c | 6 +----- src/northbridge/via/cx700/northbridge.c | 10 +++------- src/northbridge/via/vt8601/northbridge.c | 10 +++------- src/northbridge/via/vt8623/northbridge.c | 10 +++------- src/northbridge/via/vx800/northbridge.c | 12 ++++-------- src/northbridge/via/vx800/vx800.h | 7 ------- src/northbridge/via/vx900/northbridge.c | 10 +++------- 14 files changed, 40 insertions(+), 93 deletions(-)
diff --git a/src/northbridge/via/cn400/agp.c b/src/northbridge/via/cn400/agp.c index ce814c5..ece71e0 100644 --- a/src/northbridge/via/cn400/agp.c +++ b/src/northbridge/via/cn400/agp.c @@ -128,7 +128,7 @@ static void agp_init(device_t dev) }
static const struct device_operations agp_operations = { - .read_resources = cn400_noop, + .read_resources = DEVICE_NOOP, .set_resources = pci_dev_set_resources, .enable_resources = pci_dev_enable_resources, .init = agp_init, diff --git a/src/northbridge/via/cn400/cn400.h b/src/northbridge/via/cn400/cn400.h index 2df30a6..4921bef 100644 --- a/src/northbridge/via/cn400/cn400.h +++ b/src/northbridge/via/cn400/cn400.h @@ -18,13 +18,6 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
-#ifndef __PRE_RAM__ -// HACK -static inline void cn400_noop(device_t dev) -{ -} -#endif - #define DEBUG_CN400
/* VGA stuff */ diff --git a/src/northbridge/via/cn400/northbridge.c b/src/northbridge/via/cn400/northbridge.c index 149eab3..b797179 100644 --- a/src/northbridge/via/cn400/northbridge.c +++ b/src/northbridge/via/cn400/northbridge.c @@ -127,10 +127,10 @@ static void memctrl_init(device_t dev) }
static const struct device_operations memctrl_operations = { - .read_resources = cn400_noop, - .set_resources = cn400_noop, - .enable_resources = cn400_noop, - .init = memctrl_init, + .read_resources = DEVICE_NOOP, + .set_resources = DEVICE_NOOP, + .enable_resources = DEVICE_NOOP, + .init = memctrl_init, .ops_pci = 0, };
@@ -241,14 +241,10 @@ static void cpu_bus_init(device_t dev) initialize_cpus(dev->link_list); }
-static void cpu_bus_noop(device_t dev) -{ -} - static struct device_operations cpu_bus_ops = { - .read_resources = cpu_bus_noop, - .set_resources = cpu_bus_noop, - .enable_resources = cpu_bus_noop, + .read_resources = DEVICE_NOOP, + .set_resources = DEVICE_NOOP, + .enable_resources = DEVICE_NOOP, .init = cpu_bus_init, .scan_bus = 0, }; diff --git a/src/northbridge/via/cn400/vlink.c b/src/northbridge/via/cn400/vlink.c index c98982e..2319e75 100644 --- a/src/northbridge/via/cn400/vlink.c +++ b/src/northbridge/via/cn400/vlink.c @@ -158,9 +158,9 @@ static void c3_host_init(device_t dev) }
static const struct device_operations c3_host_operations = { - .read_resources = cn400_noop, - .set_resources = cn400_noop, - .enable_resources = cn400_noop, + .read_resources = DEVICE_NOOP, + .set_resources = DEVICE_NOOP, + .enable_resources = DEVICE_NOOP, .init = c3_host_init, .ops_pci = 0, }; @@ -195,9 +195,9 @@ static void c3_err_init(device_t dev) }
static const struct device_operations c3_err_operations = { - .read_resources = cn400_noop, - .set_resources = cn400_noop, - .enable_resources = cn400_noop, + .read_resources = DEVICE_NOOP, + .set_resources = DEVICE_NOOP, + .enable_resources = DEVICE_NOOP, .init = c3_err_init, .ops_pci = 0, }; @@ -231,9 +231,9 @@ static void cn400_pm_init(device_t dev) }
static const struct device_operations cn400_pm_operations = { - .read_resources = cn400_noop, - .set_resources = cn400_noop, - .enable_resources = cn400_noop, + .read_resources = DEVICE_NOOP, + .set_resources = DEVICE_NOOP, + .enable_resources = DEVICE_NOOP, .init = cn400_pm_init, .ops_pci = 0, }; diff --git a/src/northbridge/via/cn700/agp.c b/src/northbridge/via/cn700/agp.c index e5a0fd0..fce61b4 100644 --- a/src/northbridge/via/cn700/agp.c +++ b/src/northbridge/via/cn700/agp.c @@ -104,7 +104,7 @@ static void agp_init(device_t dev) }
static const struct device_operations agp_operations = { - .read_resources = cn700_noop, + .read_resources = DEVICE_NOOP, .set_resources = pci_dev_set_resources, .enable_resources = pci_dev_enable_resources, .init = agp_init, @@ -157,7 +157,7 @@ static void agp_bridge_init(device_t dev) }
static const struct device_operations agp_bridge_operations = { - .read_resources = cn700_noop, + .read_resources = DEVICE_NOOP, .set_resources = pci_dev_set_resources, .enable_resources = pci_bus_enable_resources, .init = agp_bridge_init, diff --git a/src/northbridge/via/cn700/cn700.h b/src/northbridge/via/cn700/cn700.h index ff1d4b3..3cbc3dd 100644 --- a/src/northbridge/via/cn700/cn700.h +++ b/src/northbridge/via/cn700/cn700.h @@ -18,13 +18,6 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
-#if !defined (__PRE_RAM__) -// HACK -static inline void cn700_noop(device_t dev) -{ -} -#endif - /* VGA stuff */ #define SR_INDEX 0x3c4 #define SR_DATA 0x3c5 diff --git a/src/northbridge/via/cn700/northbridge.c b/src/northbridge/via/cn700/northbridge.c index a326baf..506bdd1 100644 --- a/src/northbridge/via/cn700/northbridge.c +++ b/src/northbridge/via/cn700/northbridge.c @@ -87,7 +87,7 @@ static void memctrl_init(device_t dev) }
static const struct device_operations memctrl_operations = { - .read_resources = cn700_noop, + .read_resources = DEVICE_NOOP, .init = memctrl_init, };
@@ -161,14 +161,10 @@ static void cpu_bus_init(device_t dev) initialize_cpus(dev->link_list); }
-static void cpu_bus_noop(device_t dev) -{ -} - static struct device_operations cpu_bus_ops = { - .read_resources = cpu_bus_noop, - .set_resources = cpu_bus_noop, - .enable_resources = cpu_bus_noop, + .read_resources = DEVICE_NOOP, + .set_resources = DEVICE_NOOP, + .enable_resources = DEVICE_NOOP, .init = cpu_bus_init, .scan_bus = 0, }; diff --git a/src/northbridge/via/cx700/agp.c b/src/northbridge/via/cx700/agp.c index f80d7d1..06475cc 100644 --- a/src/northbridge/via/cx700/agp.c +++ b/src/northbridge/via/cx700/agp.c @@ -72,12 +72,8 @@ static void agp_bridge_init(device_t dev) pci_write_config8(dev, 0x44, 0x34); }
-static void cx700_noop(device_t dev) -{ -} - static struct device_operations agp_bridge_operations = { - .read_resources = cx700_noop, + .read_resources = DEVICE_NOOP, .set_resources = pci_dev_set_resources, .enable_resources = pci_bus_enable_resources, .init = agp_bridge_init, diff --git a/src/northbridge/via/cx700/northbridge.c b/src/northbridge/via/cx700/northbridge.c index e3314ff..cc9dabd 100644 --- a/src/northbridge/via/cx700/northbridge.c +++ b/src/northbridge/via/cx700/northbridge.c @@ -117,14 +117,10 @@ static void cpu_bus_init(device_t dev) initialize_cpus(dev->link_list); }
-static void cpu_bus_noop(device_t dev) -{ -} - static struct device_operations cpu_bus_ops = { - .read_resources = cpu_bus_noop, - .set_resources = cpu_bus_noop, - .enable_resources = cpu_bus_noop, + .read_resources = DEVICE_NOOP, + .set_resources = DEVICE_NOOP, + .enable_resources = DEVICE_NOOP, .init = cpu_bus_init, .scan_bus = 0, }; diff --git a/src/northbridge/via/vt8601/northbridge.c b/src/northbridge/via/vt8601/northbridge.c index bed434d..1887491 100644 --- a/src/northbridge/via/vt8601/northbridge.c +++ b/src/northbridge/via/vt8601/northbridge.c @@ -107,14 +107,10 @@ static void cpu_bus_init(device_t dev) initialize_cpus(dev->link_list); }
-static void cpu_bus_noop(device_t dev) -{ -} - static struct device_operations cpu_bus_ops = { - .read_resources = cpu_bus_noop, - .set_resources = cpu_bus_noop, - .enable_resources = cpu_bus_noop, + .read_resources = DEVICE_NOOP, + .set_resources = DEVICE_NOOP, + .enable_resources = DEVICE_NOOP, .init = cpu_bus_init, .scan_bus = 0, }; diff --git a/src/northbridge/via/vt8623/northbridge.c b/src/northbridge/via/vt8623/northbridge.c index 6e0f4ea..546db4c 100644 --- a/src/northbridge/via/vt8623/northbridge.c +++ b/src/northbridge/via/vt8623/northbridge.c @@ -167,14 +167,10 @@ static void cpu_bus_init(device_t dev) initialize_cpus(dev->link_list); }
-static void cpu_bus_noop(device_t dev) -{ -} - static struct device_operations cpu_bus_ops = { - .read_resources = cpu_bus_noop, - .set_resources = cpu_bus_noop, - .enable_resources = cpu_bus_noop, + .read_resources = DEVICE_NOOP, + .set_resources = DEVICE_NOOP, + .enable_resources = DEVICE_NOOP, .init = cpu_bus_init, .scan_bus = 0, }; diff --git a/src/northbridge/via/vx800/northbridge.c b/src/northbridge/via/vx800/northbridge.c index 214ca8b..fad0c2f 100644 --- a/src/northbridge/via/vx800/northbridge.c +++ b/src/northbridge/via/vx800/northbridge.c @@ -61,7 +61,7 @@ static void memctrl_init(device_t dev) }
static const struct device_operations memctrl_operations = { - .read_resources = vx800_noop, + .read_resources = DEVICE_NOOP, .init = memctrl_init, };
@@ -150,14 +150,10 @@ static void cpu_bus_init(device_t dev) initialize_cpus(dev->link_list); }
-static void cpu_bus_noop(device_t dev) -{ -} - static struct device_operations cpu_bus_ops = { - .read_resources = cpu_bus_noop, - .set_resources = cpu_bus_noop, - .enable_resources = cpu_bus_noop, + .read_resources = DEVICE_NOOP, + .set_resources = DEVICE_NOOP, + .enable_resources = DEVICE_NOOP, .init = cpu_bus_init, .scan_bus = 0, }; diff --git a/src/northbridge/via/vx800/vx800.h b/src/northbridge/via/vx800/vx800.h index adfe272..ae944ef 100644 --- a/src/northbridge/via/vx800/vx800.h +++ b/src/northbridge/via/vx800/vx800.h @@ -20,13 +20,6 @@ #ifndef VX800_H #define VX800_H 1
-#ifndef __PRE_RAM__ -#include <device/device.h> -static inline void vx800_noop(device_t dev) -{ -} -#endif - #ifdef __PRE_RAM__ /* vx800_early_smbus.c */ struct mem_controller; diff --git a/src/northbridge/via/vx900/northbridge.c b/src/northbridge/via/vx900/northbridge.c index 53cada3..f9c225d 100644 --- a/src/northbridge/via/vx900/northbridge.c +++ b/src/northbridge/via/vx900/northbridge.c @@ -322,14 +322,10 @@ static void cpu_bus_init(device_t dev) initialize_cpus(dev->link_list); }
-static void cpu_bus_noop(device_t dev) -{ -} - static struct device_operations cpu_bus_ops = { - .read_resources = cpu_bus_noop, - .set_resources = cpu_bus_noop, - .enable_resources = cpu_bus_noop, + .read_resources = DEVICE_NOOP, + .set_resources = DEVICE_NOOP, + .enable_resources = DEVICE_NOOP, .init = cpu_bus_init, .scan_bus = 0, };