21 Mar, 2017
3 commits
-
PCI devices can be described in DT as well so we should always execute
relevant code. This will make bcma e.g. set of_node for cores described
in DT.Signed-off-by: Rafał Miłecki
Signed-off-by: Kalle Valo -
A tiny code deduplication thanks to the bcma_bus_get_host_dev.
Signed-off-by: Rafał Miłecki
Signed-off-by: Kalle Valo -
We already have the same check in bcma_of_get_irq which really calls
symbols available with CONFIG_OF_IRQ only. It appears this duplicated
check was accidentally added in commit c58d900cc96a ("bcma: fix building
without OF_IRQ"). The rest of code in bcma_of_fill_device should work
fine without CONFIG_OF_IRQ.Signed-off-by: Rafał Miłecki
Cc: Arnd Bergmann
Acked-by: Arnd Bergmann
Signed-off-by: Kalle Valo
31 Jan, 2017
2 commits
-
OF allows not only specifying platform devices but also describing
devices on standard buses like PCI or USB. This change will allow
reading info from DT for bcma buses hosted on PCI cards.Signed-off-by: Rafał Miłecki
Signed-off-by: Kalle Valo -
This allows tracking device state and e.g. makes devm work as expected.
Signed-off-by: Rafał Miłecki
Cc: Stable
Signed-off-by: Kalle Valo
09 Sep, 2016
1 commit
-
While fixing another bug, I noticed that bcma manually sets up
a dma_mask pointer for its child devices. We have a generic
helper for that now, which should be able to cope better with
any variations that might be needed to deal with cache coherency,
unusual DMA address offsets, iommus, or limited DMA masks, none
of which are currently handled here.This changes the core to use the of_dma_configure(), like
we do for platform devices that are probed directly from
DT.Signed-off-by: Arnd Bergmann
Signed-off-by: Kalle Valo
23 Mar, 2016
1 commit
-
The bcma driver core can be built with or without DT support, but
it fails to build when CONFIG_OF=y and CONFIG_OF_IRQ=n, which
can happen on platforms that do not support IRQ domains.ERROR: "irq_create_of_mapping" [drivers/bcma/bcma.ko] undefined!
ERROR: "of_irq_parse_raw" [drivers/bcma/bcma.ko] undefined!
ERROR: "of_irq_parse_one" [drivers/bcma/bcma.ko] undefined!This adds another compile-time check for OF_IRQ, but also
gets rid of now unneeded #ifdef checks: Using the simpler
IS_ENABLED() check for OF_IRQ also covers the case of not
having CONFIG_OF enabled. The check for CONFIG_OF_ADDRESS
was added to allow building on architectures without
OF_ADDRESS, but that has been addressed already in
b1d06b60e90c ("of: Provide static inline function for
of_translate_address if needed").Signed-off-by: Arnd Bergmann
Signed-off-by: Kalle Valo
07 Mar, 2016
1 commit
-
This follows the way of handling other flashes and cleans code a bit. As
next task we will want to move flash code to ChipCommon driver as:
1) Flash controllers are accesible using ChipCommon registers
2) This code isn't MIPS specific
This change prepares bcma for that.Signed-off-by: Rafał Miłecki
Signed-off-by: Kalle Valo
31 Dec, 2015
1 commit
-
So far we were using fs_initcall. It was (and still is) needed because
struct bus_type has to be registered early. However main bus
initialization has to happen later as it requires SPROM which depends on
NVRAM which depends on mtd.
Solve it by using fs_initcall only for bus_register call and module_init
for the rest. It affects bcma only when built-in obviously.This was tested with BCM4706 and BCM5357C0 (BCM47XX), BCM4708A0
(ARCH_BCM_5301X) and BCM43225 (PCIe card with bcma as module).Signed-off-by: Rafał Miłecki
Signed-off-by: Kalle Valo
29 Sep, 2015
1 commit
-
of_default_bus_match_table was not exported earlier, so it could only
be accessed by code compiled into the kernel. A new function
of_platform_default_populate() was added which uses
of_default_bus_match_table and this function is also exported. This way
it is possible to create a bus with the content of
of_default_bus_match_table and we can remove the hacks from bcma.Signed-off-by: Hauke Mehrtens
Signed-off-by: Kalle Valo
11 Aug, 2015
1 commit
-
bus->host_pdev is part of a union so bus->host_pdev != NULL is probably
also true for PCIe devices, because there it accesses bus->host_pci. If
we access the dev member at the offset defined in struct
platform_device in struct pci_dev instead we probably get something
else.This patch adds a new function which returns the host dev struct and
NULL if we do not have a host dev. When this gets registered on MIPS
brcm47xx we do not have a host dev in some situations.
This function could also be used in other places.This problem was introduced in this commit:
commit cae761b5a6bdc597ba476a040fdcd5b4bc559b85
Author: Rafa? Mi?ecki
Date: Sun Jun 28 17:17:13 2015 +0200bcma: populate bus DT subnodes as platform_device-s
Signed-off-by: Hauke Mehrtens
Signed-off-by: Kalle Valo
26 Jul, 2015
1 commit
-
Currently of_default_bus_match_table is not exported so we can only use
this feature when bcma is build into the kernel. This patch removes
support for child buses when bcma is build as a module as a temporary
fix for a build problem introduces in this commit:commit cae761b5a6bdc597ba476a040fdcd5b4bc559b85
Author: Rafał Miłecki
Date: Sun Jun 28 17:17:13 2015 +0200bcma: populate bus DT subnodes as platform_device-s
Reported-by: Stephen Rothwell
Fixes: cae761b5a6bd ("bcma: populate bus DT subnodes as platform_device-s")
Signed-off-by: Hauke Mehrtens
Signed-off-by: Kalle Valo
21 Jul, 2015
1 commit
-
Our bus should allow defining children nodes as we may want to specify
devices attached to the bus. This is required e.g. to specify NAND or
ChipCommon cores and use bus's address and IRQ mappings.Signed-off-by: Rafał Miłecki
Signed-off-by: Kalle Valo
02 Mar, 2015
1 commit
-
Signed-off-by: Rafał Miłecki
Signed-off-by: Kalle Valo
29 Jan, 2015
2 commits
-
There are some PCIe core fixes that need to be applied before accessing
SPROM, otherwise reading it may fail.Signed-off-by: Rafał Miłecki
Signed-off-by: Kalle Valo -
Signed-off-by: Rafał Miłecki
Signed-off-by: Kalle Valo
24 Jan, 2015
2 commits
-
Starting with kernel 3.19-rc1 early registration of bcma on MIPS is done
a bit later, with memory allocator available. This allows us to simplify
code by using standard bus scanning method.Signed-off-by: Rafał Miłecki
Signed-off-by: Kalle Valo -
This moves main bus init code to the main.c and renames old function to
make its purpose clear.
Thanks to this change we'll also be able to separate scanning from
registration (and support PCIe Gen 2 devices) in the future.Signed-off-by: Rafał Miłecki
Signed-off-by: Kalle Valo
20 Nov, 2014
1 commit
-
…pub/scm/linux/kernel/git/linville/wireless
12 Nov, 2014
2 commits
-
It is not possible to auto detect the irq numbers used by the cores on
an arm SoC. If bcma was registered with device tree it will search for
some device tree nodes with the irq number and add it to the core
configuration.Signed-off-by: Hauke Mehrtens
Signed-off-by: John W. Linville -
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
Signed-off-by: John W. Linville
28 Oct, 2014
1 commit
-
We were setting things like dma_dev, IRQ, etc. during core registration
only. We need such info for cores handled internally (e.g. ChipCommon)
as well.Signed-off-by: Rafał Miłecki
Acked-by: Hauke Mehrtens
Signed-off-by: John W. Linville
24 Oct, 2014
1 commit
-
Commit 2101e533f41a ("bcma: register bcma as device tree driver")
introduces a hard dependency on OF_ADDRESS into the bcma driver.
OF_ADDRESS is specifically disabled for the sparc architecture.
This results in the following error when building sparc64:allmodconfig.drivers/bcma/main.c: In function 'bcma_of_find_child_device':
drivers/bcma/main.c:150:3: error: implicit declaration of function 'of_translate_address'Fixes: 2101e533f41a ("bcma: register bcma as device tree driver")
Reported-by: Guenter Roeck
Signed-off-by: Hauke Mehrtens
Reviewed-by: Guenter Roeck
Signed-off-by: John W. Linville
01 Oct, 2014
1 commit
-
This driver is used by the bcm53xx ARM SoC code. Now it is possible to
give the address of the chipcommon core in device tree and bcma will
search for all the other cores.Signed-off-by: Hauke Mehrtens
Acked-by: Arnd Bergmann
Signed-off-by: John W. Linville
10 Sep, 2014
4 commits
-
This core is used on BCM4708 to configure the PCIe and USB3 PHYs and it
contains the addresses to the Device Management unit. This will be used
by the PCIe driver first.Signed-off-by: Hauke Mehrtens
Signed-off-by: John W. Linville -
On Northstar (ARM arch) we will use MTD subsystem to access NVRAM and
SPROM. To get access to flash device we need to register these cores
first.Signed-off-by: Rafał Miłecki
Acked-by: Hauke Mehrtens
Signed-off-by: John W. Linville -
This cleans code a bit and will us to register cores in other places as
well. The only difference with this patch is using "core_index" for
setting device name.Signed-off-by: Rafał Miłecki
Acked-by: Hauke Mehrtens
Signed-off-by: John W. Linville -
This change is important for SoC host. In future we will want to know
chip ID (needed for early MIPS boot) before doing cores scanning.Signed-off-by: Rafał Miłecki
Acked-by: Hauke Mehrtens
Signed-off-by: John W. Linville
08 Jul, 2014
1 commit
-
New Broadcom PCIe devices (802.11ac ones?) use Gen2 and have to be
initialized differently.Signed-off-by: Rafał Miłecki
Signed-off-by: John W. Linville
05 Jan, 2014
1 commit
-
This function is used to get a specific core when there is more than
one core of that specific type. This is used in bgmac to reset all GMAC
cores.Signed-off-by: Hauke Mehrtens
Acked-by: Rafał Miłecki
Signed-off-by: David S. Miller
20 Dec, 2013
1 commit
-
This is required so that we give up the last reference to the device.
Signed-off-by: Levente Kurusa
Signed-off-by: John W. Linville
17 Oct, 2013
1 commit
-
The dev_attrs field of struct bus_type is going away soon, dev_groups
should be used instead. This converts the bcma bus code to use the
correct field.Acked-by: Rafał Miłecki
Signed-off-by: Greg Kroah-Hartman
23 Jul, 2013
1 commit
-
It is better to return the actual error code than just -1.
Signed-off-by: Hauke Mehrtens
Signed-off-by: John W. Linville
28 Jun, 2013
1 commit
-
Signed-off-by: Rafał Miłecki
Signed-off-by: John W. Linville
07 Mar, 2013
1 commit
-
Signed-off-by: Rafał Miłecki
Signed-off-by: John W. Linville
09 Feb, 2013
2 commits
-
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
-
…wireless-next into for-davem
07 Feb, 2013
1 commit
-
…wireless into for-davem
05 Feb, 2013
1 commit
-
This patch unregisters the gpio chip before bcma gets unloaded.
Signed-off-by: Hauke Mehrtens
Reported-by: Piotr Haber
Signed-off-by: John W. Linville
31 Jan, 2013
1 commit
-
Signed-off-by: John W. Linville