diff mbox

[2/3] hdata: Add no-op stub functions

Message ID 20170515082050.304-2-oohall@gmail.com
State Accepted
Headers show

Commit Message

Oliver O'Halloran May 15, 2017, 8:20 a.m. UTC
These are useful for side-stepping various HW specific functions.

Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
---
 hdata/test/stubs.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)
diff mbox

Patch

diff --git a/hdata/test/stubs.c b/hdata/test/stubs.c
index bde19e167c18..8bbc68b51500 100644
--- a/hdata/test/stubs.c
+++ b/hdata/test/stubs.c
@@ -99,6 +99,12 @@  STUB(op_display);
 STUB(fsp_preload_lid);
 STUB(fsp_wait_lid_loaded);
 STUB(fsp_adjust_lid_side);
-STUB(mem_reserve_hw);
-STUB(early_uart_init);
 STUB(backtrace);
+
+/* Add HW specific stubs here */
+static void noop_function(void) {}
+#define NOOP_STUB(fnname) \
+	void fnname(void) __attribute__((weak, alias ("noop_function")))
+
+NOOP_STUB(early_uart_init);
+NOOP_STUB(mem_reserve_hw);