History log of /linux-master/drivers/bcma/driver_chipcommon.c
Revision Date Author Comments
# 032931fd 13-Feb-2022 Tom Rix <trix@redhat.com>

bcma: cleanup comments

Remove the second 'info'.
Replacements
'adventages' with 'advantages'
'strenth' with 'strength'
'atleast' with 'at least'
'thr'u'' with 'through'
'capabilty' with 'capability'
'controll' with 'control'
'ourself' with 'ourselves'
'noone' with 'no one'
'cores' to 'core's' and 'core'

Signed-off-by: Tom Rix <trix@redhat.com>
Reviewed-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20220213213121.2806376-1-trix@redhat.com


# 7195439d 12-Jan-2017 Rafał Miłecki <rafal@milecki.pl>

Revert "bcma: init serial console directly from ChipCommon code"

This reverts commit 4c81acab3816 ("bcma: init serial console directly
from ChipCommon code") as it broke IRQ assignment. Getting IRQ with
bcma_core_irq helper on SoC requires MIPS core to be set. It happens
*after* ChipCommon initialization so we can't do this so early.

This fixes a user reported regression. It wasn't critical as serial was
still somehow working but lack of IRQs was making in unreliable.

Fixes: 4c81acab3816 ("bcma: init serial console directly from ChipCommon code")
Reported-by: Felix Fietkau <nbd@nbd.name>
Cc: stable@vger.kernel.org # 4.6+
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>


# 3f37ec79 25-Jul-2016 Rafał Miłecki <zajec5@gmail.com>

bcma: support BCM53573 series of wireless SoCs

BCM53573 seems to be the first series of Northstar family with wireless
on the chip. The base models are BCM53573-s (A0, A1) and there is also
BCM47189B0 which seems to be some small modification.

The only problem with these chipsets seems to be watchdog. It's totally
unavailable on 53573A0 / 53573A1 and preferable PMU watchdog is broken
on 53573B0 / 53573B1.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>


# 0ea6f0c5 12-Feb-2016 Rafał Miłecki <zajec5@gmail.com>

bcma: move flash detection code to ChipCommon core driver

Flashes are attached and accessible through ChipCommon core, they aren't
connected to MIPS one. Moreover some new ARM devices (e.g. BCM47189) may
have serial flash accessibility using ChipCommon registers as well. To
support them we can't keep this code in MIPS core driver.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>


# 61dba73c 24-Jan-2016 Rafał Miłecki <zajec5@gmail.com>

bcma: add support for BCM47094

It's another SoC with 32 GPIOs and simplified watchdog handling. It was
tested on D-Link DIR-885L.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>


# 4c81acab 22-Jan-2016 Rafał Miłecki <zajec5@gmail.com>

bcma: init serial console directly from ChipCommon code

UART is connected to and controlled over ChipCommon core. It doesn't
have much to do with MIPS core (where we initialize it currently)
except just existing on embedded systemms. There isn't point of such
cross-core initialization (and we needed #ifdef anyway) so just handle
it in ChipCommon.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>


# b3c47afb 19-Jan-2016 Rafał Miłecki <zajec5@gmail.com>

bcma: support PMU present as separated bus core

On recent Broadcom chipsets PMU is present as separated core and it
can't be accessed using ChipCommon anymore as it fails with e.g.:
[ 0.000577] Unhandled fault: external abort on non-linefetch (0x1008) at 0xf1000604

Solve it by using a new (PMU) core pointer set to ChipCommon or PMU
depending on the hardware capabilities.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>


# 68fcd245 23-Jan-2015 Rafał Miłecki <zajec5@gmail.com>

bcma: fix watchdog on some ARM chipsets

These chipsets don't need changing clock mode.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>


# d0f66df5 27-Dec-2014 Oscar Forner Martinez <oscar.forner.martinez@gmail.com>

bcma: fix three coding style issues, more than 80 characters per line

Three lines with more than 80 characters per line have been split in several lines.

Signed-off-by: Oscar Forner Martinez <oscar.forner.martinez@gmail.com>
Acked-by: Rafa? Mi?ecki <zajec5@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>


# 85eb92e8 01-Nov-2014 Hauke Mehrtens <hauke@hauke-m.de>

bcma: make it possible to specify a IRQ num in bcma_core_irq()

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>


# 88f9b65d 26-Jun-2013 Rafał Miłecki <zajec5@gmail.com>

bcma: add support for BCM43142

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>


# ca84a6c5 27-Mar-2013 Hauke Mehrtens <hauke@hauke-m.de>

bcma: export some gpio functions

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>


# 6951618b 27-Mar-2013 Hauke Mehrtens <hauke@hauke-m.de>

bcma: export bcma_chipco_get_alp_clock()

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>


# e2aa19fa 10-Jan-2013 Nathan Hintz <nlhintz@hotmail.com>

bcma: return the mips irq number in bcma_core_irq

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>


# 5b5ac414 06-Dec-2012 Rafał Miłecki <zajec5@gmail.com>

bcma: unify naming schema for clock functions

Signed-off-by: John W. Linville <linville@tuxdriver.com>


# a4855f39 05-Dec-2012 Hauke Mehrtens <hauke@hauke-m.de>

bcma: register watchdog driver

Register the watchdog driver to the system if this is a SoC. Using the
watchdog on a non SoC device, like a PCIe card, will make the PCIe
card die when the timeout expired, but starting it again is not
supported by bcma.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>


# a22a3114 05-Dec-2012 Hauke Mehrtens <hauke@hauke-m.de>

bcma: add methods for watchdog driver

The watchdog driver wants to set the watchdog timeout in ms and not in
ticks, which is depending on the SoC type and the clock.
Calculate the number of ticks per millisecond and provide two functions
for the watchdog driver. Also return the ticks or millisecond the timer
was set to in case the provided value was bigger than the max allowed
value.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>


# f6354c8c 05-Dec-2012 Hauke Mehrtens <hauke@hauke-m.de>

bcma: set the pmu watchdog if available

Mostly all bcma based devices have a PMU and the PMU watchdog should be
used and not the old one in chip common. This patch also calculates the
maximal number the watchdog could be set to.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>


# 56fd5f07 05-Dec-2012 Hauke Mehrtens <hauke@hauke-m.de>

bcma: add bcma_chipco_alp_clock

For devices without a PMU the alp clock is always 20000000.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>


# 3e8bb507 20-Nov-2012 Hauke Mehrtens <hauke@hauke-m.de>

bcma: add comment to bcma_chipco_gpio_control

Add description to the function.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Patchwork: http://patchwork.linux-mips.org/patch/4588
Acked-by: Florian Fainelli <florian@openwrt.org>


# ea3488f4 20-Nov-2012 Hauke Mehrtens <hauke@hauke-m.de>

bcma: add bcma_chipco_gpio_pull{up,down}

Add functions to access the GPIO registers for pullup and pulldown.
These are needed for handling gpio registration.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Patchwork: http://patchwork.linux-mips.org/patch/4586
Acked-by: Florian Fainelli <florian@openwrt.org>


# ef85fb28 20-Nov-2012 Hauke Mehrtens <hauke@hauke-m.de>

bcma: add locking around GPIO register accesses

The GPIOs are access through some registers in the chip common core.
We need locking around these GPIO accesses, all GPIOs are accessed
through the same registers and parallel writes will cause problems.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Patchwork: http://patchwork.linux-mips.org/patch/4585
Acked-by: Florian Fainelli <florian@openwrt.org>


# 49655bb8 29-Sep-2012 Hauke Mehrtens <hauke@hauke-m.de>

bcma: just do the necessary things in early register on SoCs

Some parts of the initialization for chip common and the pcie core are
accessing the sprom struct, but it is not initialized at that stage.
Just do the necessary thing in the early register on SoCs and not the
complete initialization to read out the nvram from the flash chip.
After it is possible to read out the nvram, the sprom should be parsed
from it and the full initialization of the cores should be run.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>


# 9a89c3a8 09-Jul-2012 Rafał Miłecki <zajec5@gmail.com>

bcma: fix CC driver compilation on MIPS

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>


# 3d9d8af3 05-Jul-2012 Rafał Miłecki <zajec5@gmail.com>

bcma: use custom printing functions

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>


# 44a8e377 27-Jul-2011 Paul Gortmaker <paul.gortmaker@windriver.com>

bcma: fix implicit use of export.h contents

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>


# e3afe0e5 22-Jul-2011 Hauke Mehrtens <hauke@hauke-m.de>

bcma: add serial console support

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>


# 517f43e5 22-Jul-2011 Hauke Mehrtens <hauke@hauke-m.de>

bcma: add functions to scan cores needed on SoCs

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>


# 18dfa495 14-Jul-2011 Rafał Miłecki <zajec5@gmail.com>

bcma: cc: set GPIOTIMER register

We use value supplied via SPROM, or default 10:90 as fallback.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>


# eb032b98 04-Jul-2011 Michael Buesch <m@bues.ch>

Update my e-mail address

Signed-off-by: Michael Buesch <m@bues.ch>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>


# 1073e4ee 10-May-2011 Rafał Miłecki <zajec5@gmail.com>

bcma: add missing GPIO defines, use PULL register only when available

Similar patch was commited to ssb.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>


# 8369ae33 09-May-2011 Rafał Miłecki <zajec5@gmail.com>

bcma: add Broadcom specific AMBA bus driver

Broadcom has released cards based on a new AMBA-based bus type. From a
programming point of view, this new bus type differs from AMBA and does
not use AMBA common registers. It also differs enough from SSB. We
decided that a new bus driver is needed to keep the code clean.

In its current form, the driver detects devices present on the bus and
registers them in the system. It allows registering BCMA drivers for
specified bus devices and provides them basic operations. The bus driver
itself includes two important bus managing drivers: ChipCommon core
driver and PCI(c) core driver. They are early used to allow correct
initialization.

Currently code is limited to supporting buses on PCI(e) devices, however
the driver is designed to be used also on other hosts. The host
abstraction layer is implemented and already used for PCI(e).

Support for PCI(e) hosts is working and seems to be stable (access to
80211 core was tested successfully on a few devices). We can still
optimize it by using some fixed windows, but this can be done later
without affecting any external code. Windows are just ranges in MMIO
used for accessing cores on the bus.

Cc: Greg KH <greg@kroah.com>
Cc: Michael Büsch <mb@bu3sch.de>
Cc: Larry Finger <Larry.Finger@lwfinger.net>
Cc: George Kashperko <george@znau.edu.ua>
Cc: Arend van Spriel <arend@broadcom.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: Russell King <rmk@arm.linux.org.uk>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Andy Botting <andy@andybotting.com>
Cc: linuxdriverproject <devel@linuxdriverproject.org>
Cc: linux-kernel@vger.kernel.org <linux-kernel@vger.kernel.org>
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>