Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ec5ab1dd authored by Hauke Mehrtens's avatar Hauke Mehrtens Committed by John W. Linville
Browse files

brcmsmac: fix DMA on SoCs



These extra offsets are only needed by PCIe devices and not when
running on an SoC.

This partly reverts commit:
commit 821e4e93
Author: Roland Vossen <rvossen@broadcom.com>
Date:   Mon Aug 8 15:58:58 2011 +0200

    staging: brcm80211: removed unused bus code from softmac

Signed-off-by: default avatarHauke Mehrtens <hauke@hauke-m.de>
Acked-by: default avatarArend van Spriel <arend@broadcom.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 093cd334
Loading
Loading
Loading
Loading
+8 −3
Original line number Original line Diff line number Diff line
@@ -573,6 +573,7 @@ struct dma_pub *dma_attach(char *name, struct si_pub *sih,
	struct dma_info *di;
	struct dma_info *di;
	u8 rev = core->id.rev;
	u8 rev = core->id.rev;
	uint size;
	uint size;
	struct si_info *sii = container_of(sih, struct si_info, pub);


	/* allocate private info structure */
	/* allocate private info structure */
	di = kzalloc(sizeof(struct dma_info), GFP_ATOMIC);
	di = kzalloc(sizeof(struct dma_info), GFP_ATOMIC);
@@ -633,11 +634,15 @@ struct dma_pub *dma_attach(char *name, struct si_pub *sih,
	 */
	 */
	di->ddoffsetlow = 0;
	di->ddoffsetlow = 0;
	di->dataoffsetlow = 0;
	di->dataoffsetlow = 0;
	/* for pci bus, add offset */
	if (sii->icbus->hosttype == BCMA_HOSTTYPE_PCI) {
		/* add offset for pcie with DMA64 bus */
		/* add offset for pcie with DMA64 bus */
		di->ddoffsetlow = 0;
		di->ddoffsetlow = 0;
		di->ddoffsethigh = SI_PCIE_DMA_H32;
		di->ddoffsethigh = SI_PCIE_DMA_H32;
	}
	di->dataoffsetlow = di->ddoffsetlow;
	di->dataoffsetlow = di->ddoffsetlow;
	di->dataoffsethigh = di->ddoffsethigh;
	di->dataoffsethigh = di->ddoffsethigh;

	/* WAR64450 : DMACtl.Addr ext fields are not supported in SDIOD core. */
	/* WAR64450 : DMACtl.Addr ext fields are not supported in SDIOD core. */
	if ((core->id.id == BCMA_CORE_SDIO_DEV)
	if ((core->id.id == BCMA_CORE_SDIO_DEV)
	    && ((rev > 0) && (rev <= 2)))
	    && ((rev > 0) && (rev <= 2)))