mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-09 13:49:24 -04:00
Merge "cnss2: Make sure the write to remap window register take effect"
This commit is contained in:
commit
a33823f357
1 changed files with 13 additions and 4 deletions
|
|
@ -393,15 +393,24 @@ int cnss_pci_check_link_status(struct cnss_pci_data *pci_priv)
|
|||
static void cnss_pci_select_window(struct cnss_pci_data *pci_priv, u32 offset)
|
||||
{
|
||||
u32 window = (offset >> WINDOW_SHIFT) & WINDOW_VALUE_MASK;
|
||||
u32 window_enable = WINDOW_ENABLE_BIT | window;
|
||||
u32 val;
|
||||
|
||||
writel_relaxed(WINDOW_ENABLE_BIT | window,
|
||||
QCA6390_PCIE_REMAP_BAR_CTRL_OFFSET +
|
||||
pci_priv->bar);
|
||||
writel_relaxed(window_enable, pci_priv->bar +
|
||||
QCA6390_PCIE_REMAP_BAR_CTRL_OFFSET);
|
||||
|
||||
if (window != pci_priv->remap_window) {
|
||||
pci_priv->remap_window = window;
|
||||
cnss_pr_dbg("Config PCIe remap window register to 0x%x\n",
|
||||
WINDOW_ENABLE_BIT | window);
|
||||
window_enable);
|
||||
}
|
||||
|
||||
/* Read it back to make sure the write has taken effect */
|
||||
val = readl_relaxed(pci_priv->bar + QCA6390_PCIE_REMAP_BAR_CTRL_OFFSET);
|
||||
if (val != window_enable) {
|
||||
cnss_pr_err("Failed to config window register to 0x%x, current value: 0x%x\n",
|
||||
window_enable, val);
|
||||
CNSS_ASSERT(0);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue