aboutsummaryrefslogtreecommitdiffstats
path: root/package/kernel/mac80211/patches/344-0009-brcmfmac-use-bar1-window-size-as-provided-by-pci-sub.patch
diff options
context:
space:
mode:
authorRafał Miłecki <zajec5@gmail.com>2016-03-07 22:37:09 +0000
committerRafał Miłecki <zajec5@gmail.com>2016-03-07 22:37:09 +0000
commit99674c3ab912c338e6326e61758ab06f7c09a4ed (patch)
tree7d359ef289649319da4b7226d17eb1d8fa08844a /package/kernel/mac80211/patches/344-0009-brcmfmac-use-bar1-window-size-as-provided-by-pci-sub.patch
parent3a849d25666cd5be664e979aff077d8aa4ce78fb (diff)
downloadmaster-187ad058-99674c3ab912c338e6326e61758ab06f7c09a4ed.tar.gz
master-187ad058-99674c3ab912c338e6326e61758ab06f7c09a4ed.tar.bz2
master-187ad058-99674c3ab912c338e6326e61758ab06f7c09a4ed.zip
mac80211: backport brcmfmac patchset with driver setting concept
This prepares brcmfmac for better country handling and fixes BCM4360 support which was always failing with: [ 13.249195] brcmfmac: brcmf_pcie_download_fw_nvram: FW failed to initialize Signed-off-by: Rafał Miłecki <zajec5@gmail.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@48959 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/kernel/mac80211/patches/344-0009-brcmfmac-use-bar1-window-size-as-provided-by-pci-sub.patch')
-rw-r--r--package/kernel/mac80211/patches/344-0009-brcmfmac-use-bar1-window-size-as-provided-by-pci-sub.patch58
1 files changed, 58 insertions, 0 deletions
diff --git a/package/kernel/mac80211/patches/344-0009-brcmfmac-use-bar1-window-size-as-provided-by-pci-sub.patch b/package/kernel/mac80211/patches/344-0009-brcmfmac-use-bar1-window-size-as-provided-by-pci-sub.patch
new file mode 100644
index 0000000000..ca03ffe4b0
--- /dev/null
+++ b/package/kernel/mac80211/patches/344-0009-brcmfmac-use-bar1-window-size-as-provided-by-pci-sub.patch
@@ -0,0 +1,58 @@
+From: Hante Meuleman <meuleman@broadcom.com>
+Date: Wed, 17 Feb 2016 11:26:58 +0100
+Subject: [PATCH] brcmfmac: use bar1 window size as provided by pci subsystem
+
+The PCIE bar1 window size is specified by chip. Currently the
+ioremap of bar1 was using a define which always matched the size
+of bar1, but newer chips can have a different bar1 sizes. With
+this patch the ioremap will be called with the by chip provided
+window size.
+
+Reviewed-by: Arend Van Spriel <arend@broadcom.com>
+Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com>
+Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
+Signed-off-by: Hante Meuleman <meuleman@broadcom.com>
+Signed-off-by: Arend van Spriel <arend@broadcom.com>
+Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
+---
+
+--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c
++++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/pcie.c
+@@ -72,7 +72,6 @@ static struct brcmf_firmware_mapping brc
+
+ #define BRCMF_PCIE_FW_UP_TIMEOUT 2000 /* msec */
+
+-#define BRCMF_PCIE_TCM_MAP_SIZE (4096 * 1024)
+ #define BRCMF_PCIE_REG_MAP_SIZE (32 * 1024)
+
+ /* backplane addres space accessed by BAR0 */
+@@ -252,7 +251,6 @@ struct brcmf_pciedev_info {
+ char nvram_name[BRCMF_FW_NAME_LEN];
+ void __iomem *regs;
+ void __iomem *tcm;
+- u32 tcm_size;
+ u32 ram_base;
+ u32 ram_size;
+ struct brcmf_chip *ci;
+@@ -1592,8 +1590,7 @@ static int brcmf_pcie_get_resource(struc
+ }
+
+ devinfo->regs = ioremap_nocache(bar0_addr, BRCMF_PCIE_REG_MAP_SIZE);
+- devinfo->tcm = ioremap_nocache(bar1_addr, BRCMF_PCIE_TCM_MAP_SIZE);
+- devinfo->tcm_size = BRCMF_PCIE_TCM_MAP_SIZE;
++ devinfo->tcm = ioremap_nocache(bar1_addr, bar1_size);
+
+ if (!devinfo->regs || !devinfo->tcm) {
+ brcmf_err("ioremap() failed (%p,%p)\n", devinfo->regs,
+@@ -1602,8 +1599,9 @@ static int brcmf_pcie_get_resource(struc
+ }
+ brcmf_dbg(PCIE, "Phys addr : reg space = %p base addr %#016llx\n",
+ devinfo->regs, (unsigned long long)bar0_addr);
+- brcmf_dbg(PCIE, "Phys addr : mem space = %p base addr %#016llx\n",
+- devinfo->tcm, (unsigned long long)bar1_addr);
++ brcmf_dbg(PCIE, "Phys addr : mem space = %p base addr %#016llx size 0x%x\n",
++ devinfo->tcm, (unsigned long long)bar1_addr,
++ (unsigned int)bar1_size);
+
+ return 0;
+ }