astlpc: Support the host-side binding interface

The host-side KCS interface differs to the BMC that we need to mirror
the use of the IBF/OBF bits and the location of the Tx/Rx buffers.

The device (currently restricted to the host) also needs to use a
different initialisation sequence to the bus-owner (currently restricted
to the BMC), in that it must not write to regions of the control space
that the bus-owner owns. Concretely, the device is to write its
supported version range and then send the channel-init command via the
KCS interface.

Change-Id: I715b83d82119ebbdce6ef8176ea0a9facf9bb555
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
diff --git a/libmctp-astlpc.h b/libmctp-astlpc.h
index 23fe642..a3e7ffb 100644
--- a/libmctp-astlpc.h
+++ b/libmctp-astlpc.h
@@ -9,8 +9,11 @@
 
 #include <libmctp.h>
 
+#include <stdint.h>
+
 struct mctp_binding_astlpc;
 
+/* todo: Remove enum from public interfaces */
 enum mctp_binding_astlpc_kcs_reg {
 	MCTP_ASTLPC_KCS_REG_DATA = 0,
 	MCTP_ASTLPC_KCS_REG_STATUS = 1,
@@ -25,9 +28,15 @@
 	int	(*lpc_write)(void *data, void *buf, long offset, size_t len);
 };
 
-struct mctp_binding_astlpc *mctp_astlpc_init_ops(
-		const struct mctp_binding_astlpc_ops *ops,
-		void *ops_data, void *lpc_map);
+#define MCTP_BINDING_ASTLPC_MODE_BMC 0
+#define MCTP_BINDING_ASTLPC_MODE_HOST 1
+struct mctp_binding_astlpc *
+mctp_astlpc_init(uint8_t mode, uint32_t mtu, void *lpc_map,
+		 const struct mctp_binding_astlpc_ops *ops, void *ops_data);
+
+struct mctp_binding_astlpc *
+mctp_astlpc_init_ops(const struct mctp_binding_astlpc_ops *ops, void *ops_data,
+		     void *lpc_map);
 void mctp_astlpc_destroy(struct mctp_binding_astlpc *astlpc);
 
 struct mctp_binding *mctp_binding_astlpc_core(struct mctp_binding_astlpc *b);