|
@@ -50,6 +50,10 @@
|
|
|
#define BT_MBI_PCIE_READ 0x00
|
|
|
#define BT_MBI_PCIE_WRITE 0x01
|
|
|
|
|
|
+#if IS_ENABLED(CONFIG_IOSF_MBI)
|
|
|
+
|
|
|
+bool iosf_mbi_available(void);
|
|
|
+
|
|
|
/**
|
|
|
* iosf_mbi_read() - MailBox Interface read command
|
|
|
* @port: port indicating subunit being accessed
|
|
@@ -87,4 +91,33 @@ int iosf_mbi_write(u8 port, u8 opcode, u32 offset, u32 mdr);
|
|
|
*/
|
|
|
int iosf_mbi_modify(u8 port, u8 opcode, u32 offset, u32 mdr, u32 mask);
|
|
|
|
|
|
+#else /* CONFIG_IOSF_MBI is not enabled */
|
|
|
+static inline
|
|
|
+bool iosf_mbi_available(void)
|
|
|
+{
|
|
|
+ return false;
|
|
|
+}
|
|
|
+
|
|
|
+static inline
|
|
|
+int iosf_mbi_read(u8 port, u8 opcode, u32 offset, u32 *mdr)
|
|
|
+{
|
|
|
+ WARN(1, "IOSF_MBI driver not available");
|
|
|
+ return -EPERM;
|
|
|
+}
|
|
|
+
|
|
|
+static inline
|
|
|
+int iosf_mbi_write(u8 port, u8 opcode, u32 offset, u32 mdr)
|
|
|
+{
|
|
|
+ WARN(1, "IOSF_MBI driver not available");
|
|
|
+ return -EPERM;
|
|
|
+}
|
|
|
+
|
|
|
+static inline
|
|
|
+int iosf_mbi_modify(u8 port, u8 opcode, u32 offset, u32 mdr, u32 mask)
|
|
|
+{
|
|
|
+ WARN(1, "IOSF_MBI driver not available");
|
|
|
+ return -EPERM;
|
|
|
+}
|
|
|
+#endif /* CONFIG_IOSF_MBI */
|
|
|
+
|
|
|
#endif /* IOSF_MBI_SYMS_H */
|