summaryrefslogtreecommitdiffstats
path: root/drivers/bcma/driver_pci_host.c
Commit message (Collapse)AuthorAgeFilesLines
* bcma: add missing includesRafał Miłecki2015-03-031-0/+1
| | | | | | | | | | | | | | | | kbuild found out that commit 804e27dee49e ("bcma: support bringing up bus hosted on PCIe Gen 2") broke the build on m68k: drivers/bcma/driver_pcie2.c: In function 'bcma_core_pcie2_up': >> drivers/bcma/driver_pcie2.c:196:2: error: implicit declaration of function 'pcie_set_readrq' [-Werror\ =implicit-function-declaration] err = pcie_set_readrq(dev, pcie2->reqsize); ^ cc1: some warnings being treated as errors Reported-by: kbuild test robot <fengguang.wu@intel.com> Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
* bcma: make it possible to specify a IRQ num in bcma_core_irq()Hauke Mehrtens2014-11-111-2/+2
| | | | | | | | | This moves bcma_core_irq() to main.c and add a extra parameter with a number so that we can return different irq number for devices with more than one. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* bcma: change max PCI read request size to 128Hauke Mehrtens2013-08-261-0/+6
| | | | | | | | | | | | | | This PCIe controller does not support a max read request size above 128 bytes. The sold card I tested this controller with used 128 as default value, but some new routers are sold with BCM4331 chips, which have a default max read request size of 512. This device fails at the first DMA reqeust whch is bigger than 126 bytes. This patch changes the max read request size to 128 for every device on the PCIe link. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* Merge branch 'master' of ↵John W. Linville2013-03-011-0/+2
|\ | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless into for-davem
| * bcma: init spin lockHauke Mehrtens2013-02-271-0/+2
| | | | | | | | | | | | | | This spin lock was not initialized. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | Merge branch 'master' of ↵John W. Linville2013-01-281-24/+38
|\ \ | |/ | | | | git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next into for-davem
| * bcma: use consistent case for 'hex' constantsNathan Hintz2013-01-141-5/+5
| | | | | | | | | | | | Signed-off-by: Nathan Hintz <nlhintz@hotmail.com> Acked-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * bcma: add support for 1 and 2 byte extended config space accessNathan Hintz2013-01-141-7/+8
| | | | | | | | | | | | | | | | | | | | | | The sanity checks allow 1 and 2 byte reads/writes of the extended PCI config space to proceed; however, the code only supports 4 byte reads/writes. This patch adds support for 1 and 2 byte reads/writes of the extended PCI config space. Signed-off-by: Nathan Hintz <nlhintz@hotmail.com> Acked-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * bcma: don't map/unmap a subset of the PCI config spaceNathan Hintz2013-01-141-11/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | For PCI config space access offsets < 256 for device '0', bcma_extpci_write_config performs an 'ioremap_nocache' on a 4 byte section of the PCI config space (an area that has already previously been mapped), and then subsequently unmaps that 4 byte section. This can't be a good thing for future read access from that now unmapped location. Modify the config space writes to use the existing access functions (similar to how it is done for the reads). Signed-off-by: Nathan Hintz <nlhintz@hotmail.com> Acked-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * bcma: jump to 'out' label for invalid 'func' valueNathan Hintz2013-01-141-1/+5
| | | | | | | | | | | | | | | | | | Consistently jump to the 'out' label for error conditions (adds missing check for 'func' validity in bcma_extpci_write_config). Signed-off-by: Nathan Hintz <nlhintz@hotmail.com> Acked-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * bcma: delete duplicate readlNathan Hintz2013-01-141-2/+0
| | | | | | | | | | | | | | | | | | The 'val' has already been read by the prior call to 'mips_busprobe32'; this 'readl' is unnecessary. Signed-off-by: Nathan Hintz <nlhintz@hotmail.com> Acked-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * bcma: update pci configuration for bcm4706/bcm4716Nathan Hintz2013-01-111-1/+12
| | | | | | | | | | | | | | | | Update the PCI configuration for BCM4706 and BCM4716 per the 2011 Broadcom SDK. Signed-off-by: Nathan Hintz <nlhintz@hotmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * bcma: return the mips irq number in bcma_core_irqNathan Hintz2013-01-111-2/+2
| | | | | | | | | | | | | | | | | | | | The irq signal numbers that are send by the cpu are increased by 2 from the number programmed into the mips core by bcma. Return the irq number on which the irqs are send in bcma_core_irq() now. Signed-off-by: Nathan Hintz <nlhintz@hotmail.com> Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | Drivers: bcma: remove __dev* attributes.Greg Kroah-Hartman2013-01-031-7/+6
|/ | | | | | | | | | | | | | | CONFIG_HOTPLUG is going away as an option. As a result, the __dev* markings need to be removed. This change removes the use of __devinit, __devexit_p, and __devexit from these drivers. Based on patches originally written by Bill Pemberton, but redone by me in order to handle some of the coding style issues better, by hand. Cc: Bill Pemberton <wfp5p@virginia.edu> Cc: "Rafał Miłecki" <zajec5@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* bcma: handle return value of pci_assign_resourceHauke Mehrtens2012-11-301-3/+7
| | | | | | | | | | | | | | This fixes the following warning: CC drivers/bcma/driver_pci_host.o drivers/bcma/driver_pci_host.c: In function 'bcma_core_pci_fixup_addresses': drivers/bcma/driver_pci_host.c:555:23: error: ignoring return value of 'pci_assign_resource', declared with attribute warn_unused_result [-Werror=unused-result] Reported-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* bcma: do not initialize deactivated PCIe coresHauke Mehrtens2012-10-191-5/+5
| | | | | | | | | | Before it was tried to initialize the deactivated PCIe core in client mode, but this causes the SoC to hang. Just do not initialize it at all and ignore the core it is not working and nothing is connected to it when the specific bit is set in the boardflags. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* bcma: add an extra pcie core structHauke Mehrtens2012-10-191-0/+4
| | | | | | | | | | The BCM4706 has two PCIe host controller on the bcma bus. For PCIe client mode it is assumed that there is only one PCIe controller so the PCIe driver, like b43 and brcmsmac are accessing the first PCIe controller when they want to issue a operation on the host controller. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* bcma: change delays to follow timers-howto guideRafał Miłecki2012-09-281-4/+4
| | | | | | Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Cc: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* bcma: use custom printing functionsRafał Miłecki2012-07-091-4/+6
| | | | | | | | | Having bus number printed makes it much easier to anaylze logs on systems with more buses. For example Netgear WNDR4500 has 3 AMBA buses in total, which makes standard log really messy. Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* bcma: add constants for chip idsHauke Mehrtens2012-07-091-3/+5
| | | | | | | | | The chip IDs are used all over bcma and no constants where defined. This patch adds the constants and makes bcma use them. Acked-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* bcma: reads/writes are always 4 bytes, so always map 4 bytesNathan Hintz2012-05-161-3/+3
| | | | | | | Modify ioremap_nocache calls to reflect the number of bytes read/written. Signed-off-by: Nathan Hintz <nlhintz@hotmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* bcma: Account for variable PCI memory base/sizeNathan Hintz2012-05-161-2/+2
| | | | | | | | | PCI Memory Resource start address and size are variable, dependent on the H/W configuration. Modify the computation of io_map_base to use the computed values. Signed-off-by: Nathan Hintz <nlhintz@hotmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* bcma: fix build error on MIPS; implicit pcibios_enable_devicePaul Gortmaker2012-04-101-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* bcma: add PCIe host controllerHauke Mehrtens2012-02-061-1/+575
| | | | | | | | | | 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>
* bcma: make some functions __devinitHauke Mehrtens2012-02-061-1/+1
| | | | | | | | | 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>
* bcma: detect PCI core working in hostmodeRafał Miłecki2011-07-071-0/+14
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 <zajec5@gmail.com> Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
OpenPOWER on IntegriCloud