aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ssb/main.c
Commit message (Collapse)AuthorAgeFilesLines
* ssb: struct device - replace bus_id with dev_name(), dev_set_name()Kay Sievers2008-11-211-6/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch is part of a larger patch series which will remove the "char bus_id[20]" name string from struct device. The device name is managed in the kobject anyway, and without any size limitation, and just needlessly copied into "struct device". To set and read the device name dev_name(dev) and dev_set_name(dev) must be used. If your code uses static kobjects, which it shouldn't do, "const char *init_name" can be used to statically provide the name the registered device should have. At registration time, the init_name field is cleared, to enforce the use of dev_name(dev) to access the device name at a later time. We need to get rid of all occurrences of bus_id in the entire tree to be able to enable the new interface. Please apply this patch, and possibly convert any remaining remaining occurrences of bus_id. We want to submit a patch to -next, which will remove bus_id from "struct device", to find the remaining pieces to convert, and finally switch over to the new api, which will remove the 20 bytes array and does no longer have a size limitation. CC: Michael Buesch <mb@bu3sch.de> Acked-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-Off-By: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* [SSB] Initialise dma_mask for SSB_BUSTYPE_SSB devicesAurelien Jarno2008-09-271-0/+1
| | | | | | | | | | | For SSB_BUSTYPE_SSB type devices, we need to initialize dma_mask using coherent_dma_mask so that calls to dma_set_mask() succeed. It fixes the regression on the b44 driver introduced by commit f225763a7d6c92c4932dbd528437997078496fcc Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* ssb: allow compilation on systems without PCIHolger Schurig2008-08-181-0/+8
| | | | | | | | Makes ssb work on system without a PCI bus. Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de> Signed-off-by: Michael Buesch <mb@bu3sch.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ssb, b43, b43legacy, b44: Rewrite SSB DMA APIMichael Buesch2008-06-271-16/+59
| | | | | | | | | | | This is a rewrite of the DMA API for SSB devices. This is needed, because the old (non-existing) "API" made too many bad assumptions on the API of the host-bus (PCI). This introduces an almost complete SSB-DMA-API that maps to the lowlevel bus-API based on the bustype. Signed-off-by: Michael Buesch <mb@bu3sch.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ssb: Fix coherent DMA mask for PCI devicesMichael Buesch2008-06-131-3/+9
| | | | | | | This fixes setting the coherent DMA mask for PCI devices. Signed-off-by: Michael Buesch <mb@bu3sch.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* Merge branch 'master' of ↵David S. Miller2008-04-171-6/+8
|\ | | | | | | master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6
| * ssb: Fix usage of struct device used for DMAingMichael Buesch2008-04-151-6/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes DMA on architectures where DMA is nontrivial, like PPC64. We must use the host-device's (PCI) struct device for any DMA operation instead of the SSB device. For this we add a new struct device pointer to the SSB device structure that will always point to the right device for DMAing. Without this patch b43 and b44 drivers won't work on complex-DMA architectures, that for example need dev->archdata for DMA operations. Signed-off-by: Michael Buesch <mb@bu3sch.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | Merge branch 'master' of ↵David S. Miller2008-04-141-0/+6
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 Conflicts: drivers/net/ehea/ehea_main.c drivers/net/wireless/iwlwifi/Kconfig drivers/net/wireless/rt2x00/rt61pci.c net/ipv4/inet_timewait_sock.c net/ipv6/raw.c net/mac80211/ieee80211_sta.c
| * b43legacy: fix bcm4303 crashStefano Brivio2008-04-071-0/+6
| | | | | | | | | | | | | | | | This fixes an hard crash which happened upon driver loading on bcm4303 rev. 2 devices. Signed-off-by: Stefano Brivio <stefano.brivio@polimi.it> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | ssb: Add support for block-I/OMichael Buesch2008-04-081-0/+102
| | | | | | | | | | | | | | | | | | | | | | This adds support for block based I/O to SSB. This is needed in order to efficiently support PIO data transfers to the card. The block-I/O support is only compiled, if it's selected by the weird driver that needs it. So there's no overhead for sane devices. Signed-off-by: Michael Buesch <mb@bu3sch.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | ssb: Fix build for non-PCIhostMichael Buesch2008-04-081-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes a build error when PCMCIA-host support is built, but PCI-host support is disabled. Hell, who on earth would use such a weird configuration. :D drivers/built-in.o: In function `ssb_attr_sprom_store': (.text+0x1c4b79): undefined reference to `ssb_devices_freeze' drivers/built-in.o: In function `ssb_attr_sprom_store': (.text+0x1c4bb3): undefined reference to `ssb_devices_thaw' make[1]: *** [.tmp_vmlinux1] Error 1 Signed-off-by: Michael Buesch <mb@bu3sch.de> Acked-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | ssb: Turn suspend/resume upside downMichael Buesch2008-04-081-47/+34
| | | | | | | | | | | | | | | | | | Turn the SSB bus suspend mechanism upside down. Instead of deciding by an internal reference count when to suspend/resume, let the parent bus call us in their suspend/resume routine. Signed-off-by: Michael Buesch <mb@bu3sch.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | ssb-pcmcia: IRQ and DMA related fixesMichael Buesch2008-04-081-1/+1
| | | | | | | | | | | | | | | | Here come some IRQ and DMA related fixes for the ssb PCMCIA-host code. Not much to say, actually. I think the patch explains itself. Signed-off-by: Michael Buesch <mb@bu3sch.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | ssb: Add SPROM/invariants support for PCMCIA devicesMichael Buesch2008-03-131-2/+21
| | | | | | | | | | | | | | | | This adds support for reading/writing the SPROM invariants for PCMCIA based devices. Signed-off-by: Michael Buesch <mb@bu3sch.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | ssb: Add Gigabit Ethernet driverMichael Buesch2008-03-061-1/+29
| | | | | | | | | | | | | | | | | | | | This adds the Gigabit Ethernet driver for the SSB Gigabit Ethernet core. This driver actually is a frontend to the Tigon3 driver. So the real work is done by tg3. This device is used in the Linksys WRT350N. Signed-off-by: Michael Buesch <mb@bu3sch.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | ssb: Add support for 8bit register accessMichael Buesch2008-02-291-0/+18
|/ | | | | | | | This adds support for 8bit wide register reads/writes. This is needed in order to support the gigabit ethernet core. Signed-off-by: Michael Buesch <mb@bu3sch.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ssb: Fix pcicore cardbus modeMichael Buesch2008-02-201-0/+1
| | | | | | | | This fixes the pcicore driver to not die a horrible crash death when inserting a cardbus card. Signed-off-by: Michael Buesch <mb@bu3sch.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ssb: Make the GPIO API reentrancy safeMichael Buesch2008-02-201-0/+3
| | | | | | | This fixes the GPIO API to be reentrancy safe. Signed-off-by: Michael Buesch <mb@bu3sch.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ssb: Convert to use of the new SPROM structureLarry Finger2008-01-281-1/+9
| | | | | | | | | | | | | | | | | | In disagreement with the SPROM specs, revision 3 devices appear to have moved the MAC address. Change ssb to handle the revision 4 SPROM, which is a different size. This change in size is handled by adding a new variable to the ssb_sprom struct and using it whenever possible. For those routines that do not have access to this structure, a 'u16 size' argument is added. The new PCI_ID for the BCM4328 is also added. Testing of the Revision 4 SPROM, which is used on the BCM4328, was done by Michael Gerdau <mgerdau@tiscali.de>. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ssb: Fix PCMCIA-host lowlevel bus accessMichael Buesch2007-11-101-0/+1
| | | | | | | | | | | This fixes the lowlevel bus access routines for PCMCIA based devices. There are still a few issues with register access sideeffects after this patch. This will be addressed in a later patch. Signed-off-by: Michael Buesch <mb@bu3sch.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ssb: Fix initcall orderingMichael Buesch2007-11-101-1/+4
| | | | | | | | | ssb must init after PCI but before the ssb drivers. Signed-off-by: Michael Buesch <mb@bu3sch.de> Cc: Christian Casteyde <casteyde.christian@free.fr> Fixes-bug: #9219 Signed-off-by: John W. Linville <linville@tuxdriver.com>
* uevent environment changes falloutAl Viro2007-10-141-8/+2
| | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* ssb bus needs <linux/io.h>Geert Uytterhoeven2007-10-131-0/+1
| | | | | | | | | | | | | | | | ssb bus needs <linux/io.h> linux/drivers/ssb/main.c: In function 'ssb_ssb_read16': linux/drivers/ssb/main.c:518: error: implicit declaration of function 'readw' linux/drivers/ssb/main.c: In function 'ssb_ssb_read32': linux/drivers/ssb/main.c:526: error: implicit declaration of function 'readl' linux/drivers/ssb/main.c: In function 'ssb_ssb_write16': linux/drivers/ssb/main.c:534: error: implicit declaration of function 'writew' linux/drivers/ssb/main.c: In function 'ssb_ssb_write32': linux/drivers/ssb/main.c:542: error: implicit declaration of function 'writel' Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* [SSB]: add Sonics Silicon Backplane bus supportMichael Buesch2007-10-101-0/+1162
SSB is an SoC bus used in a number of embedded devices. The most well-known of these devices is probably the Linksys WRT54G, but there are others as well. The bus is also used internally on the BCM43xx and BCM44xx devices from Broadcom. This patch also includes support for SSB ID tables in modules, so that SSB drivers can be loaded automatically. Signed-off-by: Michael Buesch <mb@bu3sch.de> Signed-off-by: John W. Linville <linville@tuxdriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>