summaryrefslogtreecommitdiffstats
path: root/drivers/bcma
Commit message (Collapse)AuthorAgeFilesLines
* bcma: fix error code handling on 64 Bit systemsHauke Mehrtens2013-09-091-5/+7
| | | | | | | | | | | | | | | | | | On most 64 Bit systems unsigned long is 64 bit long and then -MAX_ERRNO is out of the range of a u32 used to store the error code in. This patch casts the -MAX_ERRNO to a u32 instead. This fixes a regression introduced in: commit fd4edf197544bae1c77d84bad354aa7ce1d08ce1 Author: Hauke Mehrtens <hauke@hauke-m.de> Date: Mon Jul 15 13:15:08 2013 +0200 bcma: fix handling of big addrl Reported-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Tested-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* bcma: add bcma_core_pci_power_save()Hauke Mehrtens2013-08-261-3/+33
| | | | | | | | This enables or disables power saving on the PCIe bus when the wifi is in operation or not. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* bcma: do not export bcma_core_pci_extend_L1timer()Hauke Mehrtens2013-08-261-2/+1
| | | | | | | This is not called any more, do not export it. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* bcma: add method to power up and down the PCIe core by wifi driverHauke Mehrtens2013-08-261-0/+26
| | | | | | | | | | The wifi driver should tell the PCIe core that it is now in operation so that some workarounds can be applied and the power state is changed. This should replace the call to bcma_core_pci_extend_L1timer by the brcmsmac driver. 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>
* bcma: fix handling of big addrlHauke Mehrtens2013-07-221-8/+8
| | | | | | | | | The return value of bcma_erom_get_addr_desc() is a unsigned value and it could wrap around in the two complement writing. This happens for one core in the BCM4708 SoC. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* bcma: return correct error code when bus scan failedHauke Mehrtens2013-07-221-1/+1
| | | | | | | It is better to return the actual error code than just -1. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* bcma: make it possible to select SoC support without mipsHauke Mehrtens2013-07-221-2/+8
| | | | | | | | To make it possible to use the SoC host interface with ARM SoCs do not depend on the MIPS driver any more. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* bcma: add some more core namesHauke Mehrtens2013-07-221-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | These cores were found on a BCM4708 (chipid 53010), this is a ARM SoC with two Cortex A9 cores. bcma: bus0: Found chip with id 0xCF12, rev 0x00 and package 0x02 bcma: bus0: Core 0 found: ChipCommon (manuf 0x4BF, id 0x800, rev 0x2A, class 0x0) bcma: bus0: Core 1 found: DMA (manuf 0x4BF, id 0x502, rev 0x01, class 0x0) bcma: bus0: Core 2 found: GBit MAC (manuf 0x4BF, id 0x82D, rev 0x04, class 0x0) bcma: bus0: Core 3 found: GBit MAC (manuf 0x4BF, id 0x82D, rev 0x04, class 0x0) bcma: bus0: Core 4 found: GBit MAC (manuf 0x4BF, id 0x82D, rev 0x04, class 0x0) bcma: bus0: Core 5 found: GBit MAC (manuf 0x4BF, id 0x82D, rev 0x04, class 0x0) bcma: bus0: Core 6 found: PCIe Gen 2 (manuf 0x4BF, id 0x501, rev 0x01, class 0x0) bcma: bus0: Core 7 found: PCIe Gen 2 (manuf 0x4BF, id 0x501, rev 0x01, class 0x0) bcma: bus0: Core 8 found: ARM Cortex A9 core (ihost) (manuf 0x4BF, id 0x510, rev 0x01, class 0x0) bcma: bus0: Core 9 found: USB 2.0 (manuf 0x4BF, id 0x504, rev 0x01, class 0x0) bcma: bus0: Core 10 found: USB 3.0 (manuf 0x4BF, id 0x505, rev 0x01, class 0x0) bcma: bus0: Core 11 found: SDIO3 (manuf 0x4BF, id 0x503, rev 0x01, class 0x0) bcma: bus0: Core 12 found: ARM Cortex A9 JTAG (manuf 0x4BF, id 0x506, rev 0x01, class 0x0) bcma: bus0: Core 13 found: Denali DDR2/DDR3 memory controller (manuf 0x4BF, id 0x507, rev 0x01, class 0x0) bcma: bus0: Core 14 found: ROM (manuf 0x4BF, id 0x508, rev 0x01, class 0x0) bcma: bus0: Core 15 found: NAND flash controller (manuf 0x4BF, id 0x509, rev 0x01, class 0x0) bcma: bus0: Core 16 found: SPI flash controller (manuf 0x4BF, id 0x50A, rev 0x01, class 0x0) Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* bcma: add support for BCM43142Rafał Miłecki2013-06-276-2/+155
| | | | | Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* bcma: use const for serial flash hardware tableRafał Miłecki2013-06-171-4/+4
| | | | | Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* bcma: update core (en|dis)abling functionsRafał Miłecki2013-06-171-3/+25
| | | | | | | | Broadocm updated their code, this may be needed for newer hardware or some corner cases. Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* bcma: activate PCI host option by defaultHauke Mehrtens2013-06-121-0/+1
| | | | | | | | Most users are using bcma with a PCIe card, activate support for this by default. 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-06-121-0/+2
|\ | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless Conflicts: drivers/net/wireless/ath/ath9k/Kconfig net/mac80211/iface.c
| * bcma: add more core IDsRafał Miłecki2013-05-171-0/+2
| | | | | | | | | | | | | | | | PCIe and ARM CR4 cores were found on 14e4:43b1 AKA BCM4352. Reported-by: Gabriel Thörnblad <gabriel@thornblad.com> Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | bcma: support SPROM rev 10Rafał Miłecki2013-05-221-7/+9
| | | | | | | | | | | | | | | | This is pretty much the same as rev 9, there are just 2 extra fields we know about, but are not used/stored yet anyway. Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | bcma: prepare for supporting more SPROM sizesRafał Miłecki2013-05-221-15/+20
| | | | | | | | | | Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | bcma: don't hardcode SPROM lengthRafał Miłecki2013-05-221-15/+15
|/ | | | | | | | Pass it as an argument to all functions. This is requires as newer SPROM revisions have different lengths. Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* Merge tag 'for-linus-20130509' of git://git.infradead.org/linux-mtdLinus Torvalds2013-05-091-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pull MTD update from David Woodhouse: - Lots of cleanups from Artem, including deletion of some obsolete drivers - Support partitions larger than 4GiB in device tree - Support for new SPI chips * tag 'for-linus-20130509' of git://git.infradead.org/linux-mtd: (83 commits) mtd: omap2: Use module_platform_driver() mtd: bf5xx_nand: Use module_platform_driver() mtd: denali_dt: Remove redundant use of of_match_ptr mtd: denali_dt: Change return value to fix smatch warning mtd: denali_dt: Use module_platform_driver() mtd: denali_dt: Fix incorrect error check mtd: nand: subpage write support for hardware based ECC schemes mtd: omap2: use msecs_to_jiffies() mtd: nand_ids: use size macros mtd: nand_ids: improve LEGACY_ID_NAND macro a bit mtd: add 4 Toshiba nand chips for the full-id case mtd: add the support to parse out the full-id nand type mtd: add new fields to nand_flash_dev{} mtd: sh_flctl: Use of_match_ptr() macro mtd: gpio: Use of_match_ptr() macro mtd: gpio: Use devm_kzalloc() mtd: davinci_nand: Use of_match_ptr() mtd: dataflash: Use of_match_ptr() macro mtd: remove h720x flash support mtd: onenand: remove OneNAND simulator ...
| * bcma_mips: add a const qualifierArtem Bityutskiy2013-04-051-1/+1
| | | | | | | | | | | | | | | | Be a bit stricter and add few more 'const' qualifiers. Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Cc: "Rafał Miłecki" <zajec5@gmail.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
* | bcma: export some gpio functionsHauke Mehrtens2013-03-271-0/+2
| | | | | | | | | | | | | | These functions will be used by brcmsmac. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | bcma: export bcma_chipco_get_alp_clock()Hauke Mehrtens2013-03-271-1/+2
| | | | | | | | | | | | | | This function will be used by brcmsmac. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | bcma: handle more devices in bcma_pmu_get_alp_clock()Hauke Mehrtens2013-03-271-4/+20
| | | | | | | | | | | | | | Add some more chip IDs to bcma_pmu_get_alp_clock() Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | bcma: use BCMA_CC_PMU_CTL_* constantsHauke Mehrtens2013-03-271-5/+5
| | | | | | | | | | | | | | Instead of hard coding these values use the existing constants. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | bcma: mark eromptr as __iomemHauke Mehrtens2013-03-271-8/+8
| | | | | | | | | | | | | | This fixes some sparse warnings. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | bcma: extract board_type from SPROMRafał Miłecki2013-03-251-0/+1
| | | | | | | | | | Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | Merge branch 'master' of ↵John W. Linville2013-03-181-0/+2
|\ \ | |/ | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless Conflicts: net/nfc/llcp/llcp.c
| * 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-02-144-1/+18
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless Conflicts: drivers/net/wireless/iwlwifi/dvm/tx.c
* | | | bcma: implement disabling PLLsRafał Miłecki2013-03-061-1/+7
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | | | bcma: ignore extra GMAC cores on BCM4706Rafał Miłecki2013-03-061-0/+5
|/ / / | | | | | | | | | | | | Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | | Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller2013-02-083-0/+17
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Synchronize with 'net' in order to sort out some l2tp, wireless, and ipv6 GRE fixes that will be built on top of in 'net-next'. Signed-off-by: David S. Miller <davem@davemloft.net>
| * \ \ Merge branch 'master' of ↵John W. Linville2013-02-063-0/+17
| |\ \ \ | | | |/ | | |/| | | | | git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless into for-davem
| | * | bcma: unregister gpios before unloading bcmaHauke Mehrtens2013-02-043-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch unregisters the gpio chip before bcma gets unloaded. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Reported-by: Piotr Haber <phaber@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | | | Merge branch 'master' of ↵John W. Linville2013-02-086-9/+57
|\ \ \ \ | | |_|/ | |/| | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next into for-davem
| * | | bcma: Xflash: reorder includes to make pr_fmt workRafał Miłecki2013-02-012-4/+4
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * | | bcma: add gpio_to_irqHauke Mehrtens2013-01-301-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The old bcm47xx gpio code had support for gpio_to_irq, but the new code did not provide this function, but returned -ENXIO all the time. This patch adds the missing function. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * | | bcma: register platform device for parallel flashRafał Miłecki2013-01-303-5/+42
| | | | | | | | | | | | | | | | Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | | | Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller2013-02-051-1/+1
|\ \ \ \ | | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: drivers/net/ethernet/intel/e1000e/ethtool.c drivers/net/vmxnet3/vmxnet3_drv.c drivers/net/wireless/iwlwifi/dvm/tx.c net/ipv6/route.c The ipv6 route.c conflict is simple, just ignore the 'net' side change as we fixed the same problem in 'net-next' by eliminating cached neighbours from ipv6 routes. The e1000e conflict is an addition of a new statistic in the ethtool code, trivial. The vmxnet3 conflict is about one change in 'net' removing a guarding conditional, whilst in 'net-next' we had a netdev_info() conversion. The iwlwifi conflict is dealing with a WARN_ON() conversion in 'net-next' vs. a revert happening in 'net'. Signed-off-by: David S. Miller <davem@davemloft.net>
| * | | Merge branch 'master' of ↵John W. Linville2013-02-011-1/+1
| |\ \ \ | | | |/ | | |/| | | | | git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless into for-davem
| | * | bcma: fix NAND flash validationRafał Miłecki2013-01-281-1/+1
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | | | Merge branch 'master' of ↵John W. Linville2013-01-285-72/+155
|\ \ \ \ | | |_|/ | |/| | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next into for-davem
| * | | Merge branch 'master' of ↵John W. Linville2013-01-282-3/+2
| |\ \ \ | | | |/ | | |/| | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless Conflicts: drivers/net/wireless/ath/ath9k/main.c drivers/net/wireless/iwlwifi/dvm/tx.c
| * | | 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: fix bcm4716/bcm4748 i2s irqflagNathan Hintz2013-01-141-0/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The default irqflag assignment for the I2S core on some Broadcom 4716/4748 devices is invalid and needs to be corrected (from the Broadcom SDK). 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>
OpenPOWER on IntegriCloud