diff options
-rw-r--r-- | drivers/net/wireless/ath/ath10k/pci.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath10k/pci.c b/drivers/net/wireless/ath/ath10k/pci.c index 66b1f3017f2b..02dc4083882d 100644 --- a/drivers/net/wireless/ath/ath10k/pci.c +++ b/drivers/net/wireless/ath/ath10k/pci.c | |||
@@ -1802,6 +1802,26 @@ static void ath10k_pci_fw_interrupt_handler(struct ath10k *ar) | |||
1802 | ath10k_pci_sleep(ar); | 1802 | ath10k_pci_sleep(ar); |
1803 | } | 1803 | } |
1804 | 1804 | ||
1805 | /* this function effectively clears target memory controller assert line */ | ||
1806 | static void ath10k_pci_warm_reset_si0(struct ath10k *ar) | ||
1807 | { | ||
1808 | u32 val; | ||
1809 | |||
1810 | val = ath10k_pci_soc_read32(ar, SOC_RESET_CONTROL_ADDRESS); | ||
1811 | ath10k_pci_soc_write32(ar, SOC_RESET_CONTROL_ADDRESS, | ||
1812 | val | SOC_RESET_CONTROL_SI0_RST_MASK); | ||
1813 | val = ath10k_pci_soc_read32(ar, SOC_RESET_CONTROL_ADDRESS); | ||
1814 | |||
1815 | msleep(10); | ||
1816 | |||
1817 | val = ath10k_pci_soc_read32(ar, SOC_RESET_CONTROL_ADDRESS); | ||
1818 | ath10k_pci_soc_write32(ar, SOC_RESET_CONTROL_ADDRESS, | ||
1819 | val & ~SOC_RESET_CONTROL_SI0_RST_MASK); | ||
1820 | val = ath10k_pci_soc_read32(ar, SOC_RESET_CONTROL_ADDRESS); | ||
1821 | |||
1822 | msleep(10); | ||
1823 | } | ||
1824 | |||
1805 | static int ath10k_pci_warm_reset(struct ath10k *ar) | 1825 | static int ath10k_pci_warm_reset(struct ath10k *ar) |
1806 | { | 1826 | { |
1807 | int ret = 0; | 1827 | int ret = 0; |
@@ -1860,6 +1880,8 @@ static int ath10k_pci_warm_reset(struct ath10k *ar) | |||
1860 | SOC_RESET_CONTROL_ADDRESS); | 1880 | SOC_RESET_CONTROL_ADDRESS); |
1861 | msleep(10); | 1881 | msleep(10); |
1862 | 1882 | ||
1883 | ath10k_pci_warm_reset_si0(ar); | ||
1884 | |||
1863 | /* debug */ | 1885 | /* debug */ |
1864 | val = ath10k_pci_read32(ar, SOC_CORE_BASE_ADDRESS + | 1886 | val = ath10k_pci_read32(ar, SOC_CORE_BASE_ADDRESS + |
1865 | PCIE_INTR_CAUSE_ADDRESS); | 1887 | PCIE_INTR_CAUSE_ADDRESS); |