ssb woes for ARCH "arm", MACH "pxa"
RFC 1/1 ssb woes for ARCH "arm", MACH "pxa"
I'm trying to compile a Broadcom 4318 compact-flash card for an embedded device, based on an Intel PXA CPU.
When I compile compat-wireless (2008-08-01), I get these errors:
include/linux/ssb.h: In function `ssb_dma_sync_single_range_for_cpu':include/linux/ssb.h:518: error: implicit declaration of function dma_sync_single_range_for_cpu' include/linux/ssb/ssb.h: In function ssb_dma_sync_single_range_for_device':include/linux/ssb/ssb.h:539: error: implicit declaration of function `dma_sync_single_range_for_device'
However, in have the following configs defined (among others), so this shouldn't happen:
CONFIG_B43=mCONFIG_B43_DEBUG=yCONFIG_B43_DMA=n <-- no DMACONFIG_B43_PIO=yCONFIG_B43_FORCE_PIO=y <-- force PIOCONFIG_B43_DMA_AND_PIO_MODE=nCONFIG_B43_PCMCIA=yCONFIG_B43_PCICORE_AUTOSELECT=nCONFIG_B43_PCI_AUTOSELECT=nCONFIG_B43_RFKILL=nCONFIG_B43_LEDS=n
CONFIG_SSB=mCONFIG_SSB_DEBUG=yCONFIG_SSB_PCMCIAHOST=yCONFIG_SSB_POSSIBLE=yCONFIG_SSB_B43_PCI_BRIDGE=nCONFIG_SSB_DRIVER_PCICORE=nCONFIG_SSB_PCICORE_HOSTMODE=nCONFIG_SSB_DRIVER_PCICORE_POSSIBLE=nCONFIG_SSB_PCIHOST=nCONFIG_SSB_PCIHOST_POSSIBLE=nCONFIG_SSB_BLOCKIO=yCONFIG_SSB_DRIVER_MIPS=nCONFIG_SSB_DRIVER_EXTIF=nCONFIG_SSB_SPROM=y
I now have a (possibly ugly) patch that at least allows me to compile the beast, but I'd like to get advice on how to solve this issue correctly.
include/linux/ssb/ssb.h +4 -0
@@ -509,6 +509,7 @@ static inline void ssb_dma_sync_single_r enum dma_data_direction dir) {switch (dev->bus->bustype) { +#ifndef CONFIG_B43_FORCE_PIO case SSB_BUSTYPE_PCI :/* Just sync everything. That's all the PCI API can do. */ pci_dma_sync_single_for_cpu(dev->bus->host_pci, dma_addr,
@@ -518,6 +519,7 @@ static inline void ssb_dma_sync_single_rdma_sync_single_range_for_cpu (dev->dev, dma_addr, offset, size, dir);return ; +#endif default :__ssb_dma_not_implemented (dev); }
@@ -530,6 +532,7 @@ static inline void ssb_dma_sync_single_r enum dma_data_direction dir) {switch (dev->bus->bustype) { +#ifndef CONFIG_B43_FORCE_PIO case SSB_BUSTYPE_PCI :/* Just sync everything. That's all the PCI API can do. */ pci_dma_sync_single_for_device(dev->bus->host_pci, dma_addr,
@@ -539,6 +542,7 @@ static inline void ssb_dma_sync_single_rdma_sync_single_range_for_device (dev->dev, dma_addr, offset, size, dir);return ; +#endif default :__ssb_dma_not_implemented (dev); }
drivers/ssb/main.c +4 -0
@@ -1187,15 +1187,19 @@ EXPORT_SYMBOL(ssb_dma_translation);int ssb_dma_set_mask (struct ssb_device *dev,u64 mask) { +#ifndef CONFIG_B43_FORCE_PIO int err; +#endif switch (dev->bus->bustype) { +#ifndef CONFIG_B43_FORCE_PIO case SSB_BUSTYPE_PCI : err =pci_set_dma_mask (dev->bus->host_pci, mask);if (err)return err; err =pci_set_consistent_dma_mask (dev->bus->host_pci, mask);return err; +#endif case SSB_BUSTYPE_SSB :return dma_set_mask (dev->dev, mask);default :
drivers/net/wireless/b43/b43.h +4 -0
@@ -928,6 +928,9 @@ static inline void b43_write32(struct b4ssb_write32 (dev->dev, offset, value); } +#ifdef CONFIG_B43_FORCE_PIO +#define b43_using_pio_transfers (dev) 1 +#else static inline bool b43_using_pio_transfers (struct b43_wldev *dev) {#ifdef CONFIG_B43_PIO
@@ -936,6 +939,7 @@ static inline bool b43_using_pio_transfereturn 0 ; #endif } +#endif #ifdef CONFIG_B43_FORCE_PIO # define B43_FORCE_PIO 1