aboutsummaryrefslogtreecommitdiff
path: root/drivers/bcma
AgeCommit message (Collapse)AuthorFilesLines
2012-02-06bcma: add bus num counterHauke Mehrtens1-1/+11
If we have two bcma buses on one computer the second will not work without this patch. Now each bus gets an own number. Signed-off-by: Hauke Mehrtens <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-02-06bcma: add PCIe host controllerHauke Mehrtens3-34/+581
Some SoCs have a PCIe host controller to make it possible to attach some other devices to it, like an other Wifi card. This code was tested with an Netgear WNDR3400 (bcm4716 based), but should work with all bcma based SoCs. Signed-off-by: Hauke Mehrtens <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-02-06bcma: make some functions __devinitHauke Mehrtens5-9/+9
bcma_core_pci_hostmode_init() has to be in __devinit as it will call a function in that section and so all functions calling it also have to be in __devinit. Signed-off-by: Hauke Mehrtens <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-02-06bcma: export bcma_pcie_read()Hauke Mehrtens2-1/+4
This will be needed by the host controller. Signed-off-by: Hauke Mehrtens <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-02-06bcma: add constants for PCI and use themHauke Mehrtens1-54/+70
There are many magic numbers used in the PCIe code. Replace them with some constants from the Broadcom SDK and also use them in the pcie host controller. Signed-off-by: Hauke Mehrtens <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-02-06bcma: add the core unit numberHauke Mehrtens1-0/+14
Some SoCs have two pcie or gmac cores and we need to know the number of the specific core on the bus. This is the case for the BCM4706. Signed-off-by: Hauke Mehrtens <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-02-06bcma: don't fail for bad SPROM CRCHenrik Rydberg1-3/+1
The brcmsmac driver is now using the bcma SPROM CRC check, which does not recognize all chipsets that were functional prior to the switch. In particular, the current code bails out on odd CRC errors in recent Macbooks. This patch ignores those errors, with the argument that an unrecognized SPROM should be treated similarly to a non-existing one. Signed-off-by: Henrik Rydberg <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-02-01bcma: Fix mem leak in bcma_bus_scan()Jesper Juhl1-8/+11
bcma_bus_scan() leaks 'struct bcma_device' bytes if bcma_get_next_core() returns error. Restructure the code so we always kfree() the memory we allocate to the variable 'core' before it goes out of scope. Signed-off-by: Jesper Juhl <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-01-24bcma: Enable logging of SPROM offsetLarry Finger1-0/+1
The SPROM location has been relocated again for some devices. This patch will log the offset when CONFIG_BCMA_DEBUG has been selected. Signed-off-by: Larry Finger <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-01-24bcma: SPROM: extract power info for coresRafał Miłecki1-1/+39
Signed-off-by: Rafał Miłecki <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-01-24bcma: SPROM: add macro for easier extractionRafał Miłecki1-68/+71
Signed-off-by: Rafał Miłecki <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-01-17bcma: connect the bcma bus suspend/resume to the bcma driver suspend/resumeLinus Torvalds1-0/+19
Now the low-level driver actually gets informed that it is getting suspended and resumed. Signed-off-by: Linus Torvalds <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-01-17bcma: add stub for bcma_bus_suspend()Linus Torvalds3-1/+7
.. and connect it up with the pci host bcma driver. Now, the next step is to connect those bcma bus-level suspend/resume functions to the actual bcma device suspend resume functions. Signed-off-by: Linus Torvalds <[email protected]> Signed-off-by: Rafał Miłecki <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-01-17bcma: convert suspend/resume to pm_opsLinus Torvalds1-26/+16
.. and avoid doing the unnecessary PCI operations - the PCI layer will do them for us. Signed-off-by: Linus Torvalds <[email protected]> Signed-off-by: Rafał Miłecki <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2012-01-16bcma: invalidate the mapped core over suspend/resumeRafał Miłecki1-0/+3
This clears the currently mapped core when suspending, to force re-mapping after resume. Without that we were touching default core registers believing some other core is mapped. Such a behaviour resulted in lockups on some machines. Cc: [email protected] Signed-off-by: Rafał Miłecki <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2011-12-13bcma: extract revision and TX power IDs from SPROMRafał Miłecki1-0/+39
Signed-off-by: Rafał Miłecki <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2011-12-13bcma: support for suspend and resumeRafał Miłecki3-0/+56
bcma used to lock up machine without enabling PCI or initializing CC. Cc: [email protected] Signed-off-by: Rafał Miłecki <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2011-12-13bcma: extract FEM info from SPROMRafał Miłecki1-0/+22
Signed-off-by: Rafał Miłecki <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2011-12-06bcma: pci: use fixed windows when possibleRafał Miłecki1-11/+21
Some cores are mapped in the fixed way, they registers can be accessed all the time. Signed-off-by: Rafał Miłecki <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2011-10-31bcma: fix implicit use of export.h contentsPaul Gortmaker4-0/+4
Fix in advance, or we will get things like this: drivers/bcma/core.c:20: warning: data definition has no type or storage class drivers/bcma/core.c:20: warning: type defaults to 'int' in declaration of 'EXPORT_SYMBOL_GPL' drivers/bcma/core.c:20: warning: parameter names (without types) in function declaration Signed-off-by: Paul Gortmaker <[email protected]>
2011-10-31bcma: add module.h to the modular portions of this driverPaul Gortmaker2-0/+2
This will ensure that it continues to build once we remove the implicit module.h presence from everywhere later on. Signed-off-by: Paul Gortmaker <[email protected]>
2011-09-20Merge branch 'master' of git://git.infradead.org/users/linville/wirelessJohn W. Linville1-0/+12
Conflicts: drivers/net/wireless/iwlwifi/iwl-pci.c drivers/net/wireless/iwlwifi/iwl-trans-pcie-tx.c drivers/net/wireless/rt2x00/rt2800usb.c drivers/net/wireless/wl12xx/main.c
2011-09-19bcma: cc: export more control functionsRafał Miłecki1-9/+29
Signed-off-by: Rafał Miłecki <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2011-09-13bcma: extract some basic info about board from SPROMRafał Miłecki1-0/+9
Signed-off-by: Rafał Miłecki <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2011-08-24bcma: signedness bug in bcma_get_next_core()Dan Carpenter1-1/+1
The u32 would never be less than zero so the error handling would break. I changed it to s32 to match how bcma_erom_get_mst_port() is declared. Signed-off-by: Dan Carpenter <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2011-08-22bcma: implement BCM4331 workaround for external PA linesRafał Miłecki2-1/+25
We need to disable ext. PA lines for reading SPROM. It's disabled by default, but this patch allows using bcma after loading wl, which leaves workaround enabled. Cc: Arend van Spriel <[email protected]> Signed-off-by: Rafał Miłecki <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2011-08-22bcma: add uevent to the bus, to autoload driversDavid Woodhouse1-0/+12
Signed-off-by: David Woodhouse <[email protected]> Acked-by: Rafał Miłecki <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2011-08-09bcma: use boardflags define from ssb codeRafał Miłecki1-1/+1
Signed-off-by: Rafał Miłecki <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2011-08-08bcma: get CPU clockHauke Mehrtens3-0/+120
Add method to return the clock of the CPU. This is needed by the arch code to calculate the mips_hpt_frequency. Signed-off-by: Hauke Mehrtens <[email protected]> Acked-by: Ralf Baechle <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2011-08-08bcma: add serial console supportHauke Mehrtens4-0/+83
This adds support for serial console to bcma, when operating on an SoC. Signed-off-by: Hauke Mehrtens <[email protected]> Acked-by: Ralf Baechle <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2011-08-08bcma: add mips driverHauke Mehrtens4-0/+268
This adds a mips driver to bcma. This is only found on embedded devices. For now the driver just initializes the irqs used on this system. Signed-off-by: Hauke Mehrtens <[email protected]> Acked-by: Ralf Baechle <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2011-08-08bcma: add SOC busHauke Mehrtens7-7/+243
This patch adds support for using bcma on a Broadcom SoC as the system bus. An SoC like the bcm4716 could register this bus and use it to searches for the bcma cores and register the devices on this bus. BCMA_HOSTTYPE_NONE was intended for SoCs at first but BCMA_HOSTTYPE_SOC is a better name. Acked-by: Rafał Miłecki <[email protected]> Signed-off-by: Hauke Mehrtens <[email protected]> Acked-by: Ralf Baechle <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2011-08-08bcma: add functions to scan cores needed on SoCsHauke Mehrtens5-6/+152
The chip common and mips core have to be setup early in the boot process to get the cpu clock. bcma_bus_early_register() gets pointers to some space to store the core data and searches for the chip common and mips core and initializes chip common. After that was done and the kernel is out of early boot we just have to run bcma_bus_register() and it will search for the other cores, initialize and register them. The cores are getting the same numbers as before. Acked-by: Rafał Miłecki <[email protected]> Signed-off-by: Hauke Mehrtens <[email protected]> Acked-by: Ralf Baechle <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2011-08-08bcma: move initializing of struct bcma_bus to own function.Hauke Mehrtens1-6/+11
This makes it possible to use this code in some other method. Acked-by: Rafał Miłecki <[email protected]> Signed-off-by: Hauke Mehrtens <[email protected]> Acked-by: Ralf Baechle <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2011-08-08bcma: move parsing of EEPROM into own function.Hauke Mehrtens1-112/+118
Move the parsing of the EEPROM data in scan function for one core into an own function. Now we are able to use it in some other scan function as well. Acked-by: Rafał Miłecki <[email protected]> Signed-off-by: Hauke Mehrtens <[email protected]> Acked-by: Ralf Baechle <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2011-07-25Merge branch 'for-linus' of ↵Linus Torvalds3-3/+3
git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (43 commits) fs: Merge split strings treewide: fix potentially dangerous trailing ';' in #defined values/expressions uwb: Fix misspelling of neighbourhood in comment net, netfilter: Remove redundant goto in ebt_ulog_packet trivial: don't touch files that are removed in the staging tree lib/vsprintf: replace link to Draft by final RFC number doc: Kconfig: `to be' -> `be' doc: Kconfig: Typo: square -> squared doc: Konfig: Documentation/power/{pm => apm-acpi}.txt drivers/net: static should be at beginning of declaration drivers/media: static should be at beginning of declaration drivers/i2c: static should be at beginning of declaration XTENSA: static should be at beginning of declaration SH: static should be at beginning of declaration MIPS: static should be at beginning of declaration ARM: static should be at beginning of declaration rcu: treewide: Do not use rcu_read_lock_held when calling rcu_dereference_check Update my e-mail address PCIe ASPM: forcedly -> forcibly gma500: push through device driver tree ... Fix up trivial conflicts: - arch/arm/mach-ep93xx/dma-m2p.c (deleted) - drivers/gpio/gpio-ep93xx.c (renamed and context nearby) - drivers/net/r8169.c (just context changes)
2011-07-22Merge branch 'master' of ↵John W. Linville4-4/+98
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 into for-davem
2011-07-22bcma: fix 'SSB_PCICORE_BFL_NOPCI' undeclared build breakageJohn W. Linville1-0/+2
linux-next-20110722/drivers/bcma/driver_pci.c:175: error: 'SSB_PCICORE_BFL_NOPCI' undeclared (first use in this function) Reported-by: Randy Dunlap <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2011-07-22bcma: inform drivers about translation bits needed for the coreRafał Miłecki1-0/+16
When using DMA, drivers need to pass special translation info to the hardware. Signed-off-by: Rafał Miłecki <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2011-07-19bcma: allow enabling PLLRafał Miłecki1-0/+25
Signed-off-by: Rafał Miłecki <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2011-07-19bcma: allow setting FAST clockmode for a coreRafał Miłecki1-0/+31
Signed-off-by: Rafał Miłecki <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2011-07-19bcma: handle alternative SPROM locationRafał Miłecki1-3/+9
Some cards do not use additional 0x30 offset for SPROM location. We do not know the real condition for it yet, make it BCM4331 specific for now. Signed-off-by: Rafał Miłecki <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2011-07-18bcma: extract SPROM rev 9 the same way as rev 8Rafał Miłecki1-1/+1
SPROM rev 9 was discovered on 14e4:4331, it seems to have very similar layout to rev 8 one. Use the same extracting function until we find some differences. Signed-off-by: Rafał Miłecki <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2011-07-18bcma: cc: set GPIOTIMER registerRafał Miłecki1-0/+14
We use value supplied via SPROM, or default 10:90 as fallback. Signed-off-by: Rafał Miłecki <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2011-07-15Merge branch 'master' of ↵John W. Linville2-1/+6
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 into for-davem Conflicts: net/bluetooth/l2cap_core.c
2011-07-11bcma: add check if sprom is available before accessing it.Hauke Mehrtens2-1/+6
The SoCs like the bcm4716 do not have a sprom on the bcma bus like a pcie device. It stores the values in some partition on flash memory. For ssb this informations are read out in the bcm47xx arch code, something like that should also be implemented for bcma. Without this patch bcma panics on SoCs. Signed-off-by: Hauke Mehrtens <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2011-07-08Merge branch 'master' of ↵John W. Linville5-1/+62
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 into for-davem
2011-07-07bcma: detect PCI core working in hostmodeRafał Miłecki5-1/+62
We must not init it like clientmode one, it would break device (tested by Hauke on BCM4718). Add stub hostmode driver for now. Signed-off-by: Rafał Miłecki <[email protected]> Signed-off-by: Hauke Mehrtens <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2011-07-07Update my e-mail addressMichael Büsch3-3/+3
Signed-off-by: Michael Buesch <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
2011-06-30Merge branch 'master' of ↵John W. Linville1-0/+1
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 into for-davem