Prechádzať zdrojové kódy

qcacld-3.0: Add API to block/Unblock modem shutdown

Add API to Block/Unblock modem shutdown.

CRs-Fixed: 2393336
Change-Id: Ia1e455a8d52bb79451c26b9a527b902397f19508
Anurag Chouhan 6 rokov pred
rodič
commit
ca8bc1663c

+ 1 - 0
core/pld/inc/pld_common.h

@@ -601,6 +601,7 @@ void pld_get_msi_address(struct device *dev, uint32_t *msi_addr_low,
 unsigned int pld_socinfo_get_serial_number(struct device *dev);
 int pld_is_qmi_disable(struct device *dev);
 int pld_is_fw_down(struct device *dev);
+void pld_block_shutdown(struct device *dev, bool status);
 int pld_force_assert_target(struct device *dev);
 bool pld_is_fw_dump_skipped(struct device *dev);
 

+ 23 - 0
core/pld/src/pld_common.c

@@ -1729,3 +1729,26 @@ bool pld_have_platform_driver_support(struct device *dev)
 	return ret;
 }
 
+/**
+ * pld_block_shutdown() - Block/Unblock modem shutdown
+ * @dev: device
+ * @status: status true or false
+ *
+ * This API will be called to Block/Unblock modem shutdown.
+ * True - Block shutdown
+ * False - Unblock shutdown
+ *
+ * Return: None
+ */
+void pld_block_shutdown(struct device *dev, bool status)
+{
+	enum pld_bus_type type = pld_get_bus_type(dev);
+
+	switch (type) {
+	case PLD_BUS_TYPE_SNOC:
+		pld_snoc_block_shutdown(status);
+		break;
+	default:
+		break;
+	}
+}

+ 8 - 1
core/pld/src/pld_snoc.h

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016-2018 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2016-2019 The Linux Foundation. All rights reserved.
  *
  * Permission to use, copy, modify, and/or distribute this software for
  * any purpose with or without fee is hereby granted, provided that the
@@ -132,6 +132,9 @@ static inline int pld_snoc_is_fw_rejuvenate(void)
 	return 0;
 }
 
+static inline void pld_snoc_block_shutdown(bool status)
+{
+}
 #else
 int pld_snoc_register_driver(void);
 void pld_snoc_unregister_driver(void);
@@ -256,5 +259,9 @@ static inline int pld_snoc_is_fw_rejuvenate(void)
 	return icnss_is_rejuvenate();
 }
 
+static inline void pld_snoc_block_shutdown(bool status)
+{
+	icnss_block_shutdown(status);
+}
 #endif
 #endif