test_astlpc: Include astlpc.c for internal structures
Remove the copied structure as this will be modified in the future and
we want to stay in sync.
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Change-Id: I151881ad7010963f16f79535139450bd2c19fa8a
diff --git a/tests/test_astlpc.c b/tests/test_astlpc.c
index 13d108a..5cee355 100644
--- a/tests/test_astlpc.c
+++ b/tests/test_astlpc.c
@@ -4,6 +4,13 @@
#include "config.h"
#endif
+#include "astlpc.c"
+
+#ifdef pr_fmt
+#undef pr_fmt
+#define pr_fmt(x) "test: " x
+#endif
+
#include "libmctp-astlpc.h"
#include "libmctp-log.h"
#include "container_of.h"
@@ -20,36 +27,6 @@
#include <stdlib.h>
#include <string.h>
-/* Hack: Needs to be in sync with astlpc.c */
-struct mctp_binding_astlpc {
- struct mctp_binding binding;
-
- union {
- void *lpc_map;
- struct mctp_lpcmap_hdr *lpc_hdr;
- };
-
- /* direct ops data */
- struct mctp_binding_astlpc_ops ops;
- void *ops_data;
- struct mctp_lpcmap_hdr *priv_hdr;
-
- /* fileio ops data */
- void *lpc_map_base;
- int kcs_fd;
- uint8_t kcs_status;
-
- bool running;
-
- /* temporary transmit buffer */
- uint8_t txbuf[256];
-};
-
-#define KCS_STATUS_BMC_READY 0x80
-#define KCS_STATUS_CHANNEL_ACTIVE 0x40
-#define KCS_STATUS_IBF 0x02
-#define KCS_STATUS_OBF 0x01
-
struct mctp_binding_astlpc_mmio {
struct mctp_binding_astlpc astlpc;