Эх сурвалжийг харах

qcacld-3.0: Remove deprecated PLD APIs

These APIs are used with legacy platform driver for PCIe bus based
targets which are no longer needed for new platform driver.

Change-Id: I6e01ea632e902f2c0a3a7cde07c85dfa835b84d3
CRs-fixed: 2134245
Yue Ma 7 жил өмнө
parent
commit
5ff417c273

+ 0 - 7
core/hdd/src/wlan_hdd_driver_ops.c

@@ -443,11 +443,6 @@ err_hdd_deinit:
 	return check_for_probe_defer(ret);
 }
 
-static inline void hdd_pld_driver_unloading(struct device *dev)
-{
-	pld_set_driver_status(dev, PLD_LOAD_UNLOAD);
-}
-
 /**
  * wlan_hdd_remove() - wlan_hdd_remove
  *
@@ -467,8 +462,6 @@ static void wlan_hdd_remove(struct device *dev)
 	if (!cds_wait_for_external_threads_completion(__func__))
 		hdd_warn("External threads are still active attempting driver unload anyway");
 
-	hdd_pld_driver_unloading(dev);
-
 	if (QDF_IS_EPPING_ENABLED(cds_get_conparam())) {
 		epping_disable();
 		epping_close();

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

@@ -127,18 +127,6 @@ struct pld_platform_cap {
 	u32 cap_flag;
 };
 
-/**
- * enum pld_driver_status - WLAN driver status
- * @PLD_UNINITIALIZED: driver is uninitialized
- * @PLD_INITIALIZED: driver is initialized
- * @PLD_LOAD_UNLOADL: driver is in load-unload status
- */
-enum pld_driver_status {
-	PLD_UNINITIALIZED,
-	PLD_INITIALIZED,
-	PLD_LOAD_UNLOAD,
-};
-
 /**
  * enum pld_uevent - WLAN FW status
  * @PLD_RECOVERY: driver is recovering
@@ -530,7 +518,6 @@ void pld_request_pm_qos(struct device *dev, u32 qos_val);
 void pld_remove_pm_qos(struct device *dev);
 int pld_request_bus_bandwidth(struct device *dev, int bandwidth);
 int pld_get_platform_cap(struct device *dev, struct pld_platform_cap *cap);
-void pld_set_driver_status(struct device *dev, enum pld_driver_status status);
 int pld_get_sha_hash(struct device *dev, const u8 *data,
 		     u32 data_len, u8 *hash_idx, u8 *out);
 void *pld_get_fw_ptr(struct device *dev);

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

@@ -512,36 +512,6 @@ void pld_is_pci_link_down(struct device *dev)
 	}
 }
 
-/**
- * pld_shadow_control() - Control pci shadow registers
- * @dev: device
- * @enable: 0 for disable, 1 for enable
- *
- * This function is for suspend/resume. It can control if we
- * use pci shadow registers (for saving config space) or not.
- * During suspend we disable it to avoid config space corruption.
- *
- * Return: 0 for success
- *         Non zero failure code for errors
- */
-int pld_shadow_control(struct device *dev, bool enable)
-{
-	int ret = 0;
-
-	switch (pld_get_bus_type(dev)) {
-	case PLD_BUS_TYPE_PCIE:
-		ret = pld_pcie_shadow_control(enable);
-		break;
-	case PLD_BUS_TYPE_SNOC:
-		break;
-	default:
-		ret = -EINVAL;
-		break;
-	}
-
-	return ret;
-}
-
 /**
  * pld_schedule_recovery_work() - Schedule recovery work
  * @dev: device
@@ -813,29 +783,6 @@ int pld_get_platform_cap(struct device *dev, struct pld_platform_cap *cap)
 	return ret;
 }
 
-/**
- * pld_set_driver_status() - Set driver status
- * @dev: device
- * @status: driver status
- *
- * Return: void
- */
-void pld_set_driver_status(struct device *dev, enum pld_driver_status status)
-{
-	switch (pld_get_bus_type(dev)) {
-	case PLD_BUS_TYPE_PCIE:
-		pld_pcie_set_driver_status(status);
-		break;
-	case PLD_BUS_TYPE_SNOC:
-		break;
-	case PLD_BUS_TYPE_SDIO:
-		break;
-	default:
-		pr_err("Invalid device type\n");
-		break;
-	}
-}
-
 /**
  * pld_get_sha_hash() - Get sha hash number
  * @dev: device

+ 0 - 24
core/pld/src/pld_pcie.c

@@ -699,30 +699,6 @@ int pld_pcie_get_soc_info(struct device *dev, struct pld_soc_info *info)
 	return 0;
 }
 
-/**
- * pld_pcie_set_driver_status() - Set driver status
- * @status: driver status
- *
- * Return: void
- */
-void pld_pcie_set_driver_status(enum pld_driver_status status)
-{
-	enum cnss_driver_status cnss_status;
-
-	switch (status) {
-	case PLD_UNINITIALIZED:
-		cnss_status = CNSS_UNINITIALIZED;
-		break;
-	case PLD_INITIALIZED:
-		cnss_status = CNSS_INITIALIZED;
-		break;
-	default:
-		cnss_status = CNSS_LOAD_UNLOAD;
-		break;
-	}
-	cnss_set_driver_status(cnss_status);
-}
-
 /**
  * pld_pcie_schedule_recovery_work() - schedule recovery work
  * @dev: device

+ 1 - 13
core/pld/src/pld_pcie.h

@@ -144,10 +144,6 @@ pld_pcie_get_fw_files_for_target(struct pld_fw_files *pfw_files,
 static inline void pld_pcie_link_down(struct device *dev)
 {
 }
-static inline int pld_pcie_shadow_control(bool enable)
-{
-	return 0;
-}
 static inline int pld_pcie_athdiag_read(struct device *dev, uint32_t offset,
 					uint32_t memtype, uint32_t datalen,
 					uint8_t *output)
@@ -194,10 +190,7 @@ static inline int pld_pcie_get_soc_info(struct device *dev,
 {
 	return 0;
 }
-static inline void pld_pcie_set_driver_status(enum pld_driver_status status)
-{
-}
-static inline int pld_pcie_auto_suspend(void)
+static inline int pld_pcie_auto_suspend(struct device *dev)
 {
 	return 0;
 }
@@ -246,7 +239,6 @@ int pld_pcie_get_fw_files_for_target(struct pld_fw_files *pfw_files,
 				     u32 target_type, u32 target_version);
 int pld_pcie_get_platform_cap(struct pld_platform_cap *cap);
 int pld_pcie_get_soc_info(struct device *dev, struct pld_soc_info *info);
-void pld_pcie_set_driver_status(enum pld_driver_status status);
 void pld_pcie_schedule_recovery_work(struct device *dev,
 				     enum pld_recovery_reason reason);
 void pld_pcie_device_self_recovery(struct device *dev,
@@ -256,10 +248,6 @@ static inline void pld_pcie_link_down(struct device *dev)
 {
 	cnss_pci_link_down(dev);
 }
-static inline int pld_pcie_shadow_control(bool enable)
-{
-	return 0;
-}
 static inline int pld_pcie_athdiag_read(struct device *dev, uint32_t offset,
 					uint32_t memtype, uint32_t datalen,
 					uint8_t *output)