Search Linux Wireless

[RFC, compat-wireless] ssb woes for ARCH "arm", MACH "pxa"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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=m
CONFIG_B43_DEBUG=y
CONFIG_B43_DMA=n                        <-- no DMA
CONFIG_B43_PIO=y
CONFIG_B43_FORCE_PIO=y                  <-- force PIO
CONFIG_B43_DMA_AND_PIO_MODE=n
CONFIG_B43_PCMCIA=y
CONFIG_B43_PCICORE_AUTOSELECT=n
CONFIG_B43_PCI_AUTOSELECT=n
CONFIG_B43_RFKILL=n
CONFIG_B43_LEDS=n

CONFIG_SSB=m
CONFIG_SSB_DEBUG=y
CONFIG_SSB_PCMCIAHOST=y
CONFIG_SSB_POSSIBLE=y
CONFIG_SSB_B43_PCI_BRIDGE=n
CONFIG_SSB_DRIVER_PCICORE=n
CONFIG_SSB_PCICORE_HOSTMODE=n
CONFIG_SSB_DRIVER_PCICORE_POSSIBLE=n
CONFIG_SSB_PCIHOST=n
CONFIG_SSB_PCIHOST_POSSIBLE=n
CONFIG_SSB_BLOCKIO=y
CONFIG_SSB_DRIVER_MIPS=n
CONFIG_SSB_DRIVER_EXTIF=n
CONFIG_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.

--- b.orig/include/linux/ssb/ssb.h
+++ b/include/linux/ssb/ssb.h
@@ -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_r
 		dma_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_r
 		dma_sync_single_range_for_device(dev->dev, dma_addr, offset,
 						 size, dir);
 		return;
+#endif
 	default:
 		__ssb_dma_not_implemented(dev);
 	}
--- b.orig/drivers/ssb/main.c
+++ b/drivers/ssb/main.c
@@ -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:
--- b.orig/drivers/net/wireless/b43/b43.h
+++ b/drivers/net/wireless/b43/b43.h
@@ -928,6 +928,9 @@ static inline void b43_write32(struct b4
 	ssb_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_transfe
 	return 0;
 #endif
 }
+#endif
 
 #ifdef CONFIG_B43_FORCE_PIO
 # define B43_FORCE_PIO	1

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux