aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/bcma (follow)
AgeCommit message (Collapse)AuthorFilesLines
2012-04-10bcma: fix build error on MIPS; implicit pcibios_enable_devicePaul Gortmaker2-1/+2
The following is seen during allmodconfig builds for MIPS: drivers/bcma/driver_pci_host.c:518:2: error: implicit declaration of function 'pcibios_enable_device' [-Werror=implicit-function-declaration] cc1: some warnings being treated as errors make[3]: *** [drivers/bcma/driver_pci_host.o] Error 1 Most likey introduced by commit 49dc9577155576b10ff79f0c1486c816b01f58bf "bcma: add PCIe host controller" Add the header instead of implicitly assuming it will be present. Sounds like a good idea, but that alone doesn't fix anything. The real problem is that the Kconfig has settings related to whether PCI is possible, i.e. config BCMA_HOST_PCI_POSSIBLE bool depends on BCMA && PCI = y default y config BCMA_HOST_PCI bool "Support for BCMA on PCI-host bus" depends on BCMA_HOST_PCI_POSSIBLE ...but what is missing is that BCMA_DRIVER_PCI_HOSTMODE doesn't have any dependencies on the above. Add one. CC: Hauke Mehrtens <hauke@hauke-m.de> CC: John W. Linville <linville@tuxdriver.com> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Acked-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-03-07bcma: silence PMU warning for BCM4331Rafał Miłecki1-0/+1
Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-03-06bcma: add support for on-chip OTP memory used for SPROM storageArend van Spriel1-20/+106
Wireless Broadcom chips can have either their SPROM data stored on either external SPROM or on-chip OTP memory. Both are accessed through the same register space. This patch adds support for the on-chip OTP memory. Tested with: BCM43224 OTP and SPROM BCM4331 SPROM BCM4313 OTP This patch is in response to linux-wireless thread [1]. [1] http://article.gmane.org/gmane.linux.kernel.wireless.general/85426 Tested-by: Saul St. John <saul.stjohn@gmail.com> Tested-by: Rafal Milecki <zajec5@gmail.com> Tested-by: Hauke Mehrtens <hauke@hauke-m.de> Cc: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-03-06bcma: return error in bcma_sprom_get() when fallback failsArend van Spriel1-10/+17
When not SPROM is available a fallback mechanism is used. However, when that fails the code currently continues. This patch assures that the bcma_sprom_get() function aborts when that happens. Cc: Rafal Milecki <zajec5@gmail.com> Cc: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-03-05bcma: add support for sprom not found on the deviceHauke Mehrtens1-8/+69
On SoCs the sprom is stored in the nvram in a special partition on the flash chip. The nvram contains the sprom for the main bus, but sometimes also for a pci devices using bcma. This patch makes it possible for the arch code to register a function to fetch the needed sprom from the nvram and provide it to the bcma code. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-03-05bcma: export bcma_find_coreHauke Mehrtens1-1/+2
This function is needed by the bcm47xx arch code to get the number of the ieee80211 core. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-15Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirelessJohn W. Linville2-11/+12
Conflicts: net/mac80211/debugfs_sta.c net/mac80211/sta_info.h
2012-02-06bcma: log the id, rev and pkg of the chip foundHauke Mehrtens1-3/+7
This makes us see what type of hardware someone uses by the dmesg output. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-06bcma: add extra sprom checkHauke Mehrtens1-0/+7
This check is needed on the BCM43224 device as it says in the capabilities it has an sprom but is extra check says it has not. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
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 <hauke@hauke-m.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
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 <hauke@hauke-m.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
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 <hauke@hauke-m.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-06bcma: export bcma_pcie_read()Hauke Mehrtens2-1/+4
This will be needed by the host controller. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
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 <hauke@hauke-m.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
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 <hauke@hauke-m.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
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 <rydberg@euromail.se> Signed-off-by: John W. Linville <linville@tuxdriver.com>
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 <jj@chaosbits.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
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 <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-01-24bcma: SPROM: extract power info for coresRafał Miłecki1-1/+39
Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-01-24bcma: SPROM: add macro for easier extractionRafał Miłecki1-68/+71
Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
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 <torvalds@linux-foundation.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
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 <torvalds@linux-foundation.org> Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
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 <torvalds@linux-foundation.org> Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
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: stable@vger.kernel.org Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-12-13bcma: extract revision and TX power IDs from SPROMRafał Miłecki1-0/+39
Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
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: stable@vger.kernel.org Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-12-13bcma: extract FEM info from SPROMRafał Miłecki1-0/+22
Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
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 <zajec5@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
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 <paul.gortmaker@windriver.com>
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 <paul.gortmaker@windriver.com>
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 <zajec5@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-13bcma: extract some basic info about board from SPROMRafał Miłecki1-0/+9
Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
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 <error27@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
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 <arend@broadcom.com> Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-22bcma: add uevent to the bus, to autoload driversDavid Woodhouse1-0/+12
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com> Acked-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-09bcma: use boardflags define from ssb codeRafał Miłecki1-1/+1
Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
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 <hauke@hauke-m.de> Acked-by: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
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 <hauke@hauke-m.de> Acked-by: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
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 <hauke@hauke-m.de> Acked-by: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
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 <zajec5@gmail.com> Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Acked-by: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
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 <zajec5@gmail.com> Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Acked-by: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
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 <zajec5@gmail.com> Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Acked-by: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
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 <zajec5@gmail.com> Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Acked-by: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-07-25Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivialLinus Torvalds3-3/+3
* '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 git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 into for-davemJohn W. Linville4-4/+98
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 <rdunlap@xenotime.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
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 <zajec5@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-07-19bcma: allow enabling PLLRafał Miłecki1-0/+25
Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-07-19bcma: allow setting FAST clockmode for a coreRafał Miłecki1-0/+31
Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>