qcacmn: support PLD lock for window register accessing

Currently window register accessing with PLD lock is not enabled for
HIF path of KIWI, enable it so there is no race condition with HAL
register accessing path.

Change-Id: Iceeba36ca6febdeca0e7f7bc0dcb7d4adc17bc51
CRs-Fixed: 3110425
这个提交包含在:
Jinwei Chen
2022-01-20 02:27:41 -08:00
提交者 Madan Koyyalamudi
父节点 d9e6722ff0
当前提交 77530eea0b
修改 2 个文件,包含 20 行新增21 行删除

查看文件

@@ -1,6 +1,6 @@
/*
* Copyright (c) 2016-2021 The Linux Foundation. All rights reserved.
* Copyright (c) 2021 Qualcomm Innovation Center, Inc. All rights reserved.
* Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. 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
@@ -129,20 +129,7 @@ static inline void hal_reg_write_result_check(struct hal_soc *hal_soc,
}
}
#if !defined(QCA_WIFI_QCA6390) && !defined(QCA_WIFI_QCA6490) && \
!defined(QCA_WIFI_KIWI)
static inline void hal_lock_reg_access(struct hal_soc *soc,
unsigned long *flags)
{
qdf_spin_lock_irqsave(&soc->register_access_lock);
}
static inline void hal_unlock_reg_access(struct hal_soc *soc,
unsigned long *flags)
{
qdf_spin_unlock_irqrestore(&soc->register_access_lock);
}
#else
#ifdef WINDOW_REG_PLD_LOCK_ENABLE
static inline void hal_lock_reg_access(struct hal_soc *soc,
unsigned long *flags)
{
@@ -154,6 +141,18 @@ static inline void hal_unlock_reg_access(struct hal_soc *soc,
{
pld_unlock_reg_window(soc->qdf_dev->dev, flags);
}
#else
static inline void hal_lock_reg_access(struct hal_soc *soc,
unsigned long *flags)
{
qdf_spin_lock_irqsave(&soc->register_access_lock);
}
static inline void hal_unlock_reg_access(struct hal_soc *soc,
unsigned long *flags)
{
qdf_spin_unlock_irqrestore(&soc->register_access_lock);
}
#endif
#ifdef PCIE_REG_WINDOW_LOCAL_NO_CACHE