diff mbox

bcma: Add dependency on OF_ADDRESS

Message ID 1412872877-1771-1-git-send-email-linux@roeck-us.net (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Guenter Roeck Oct. 9, 2014, 4:41 p.m. UTC
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")
Cc: Hauke Mehrtens <hauke@hauke-m.de>
Cc: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
---
 drivers/bcma/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Rafał Miłecki Oct. 9, 2014, 4:54 p.m. UTC | #1
On 9 October 2014 18:41, Guenter Roeck <linux@roeck-us.net> wrote:
> 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.

Won't this make bcma im-POSSIBLE on MIPS? And maybe x86(_64), or at
least add an unneeded dependency? I think we should somehow limit this
to BCM5301X arch.
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Guenter Roeck Oct. 9, 2014, 5:15 p.m. UTC | #2
On Thu, Oct 09, 2014 at 06:54:48PM +0200, Rafa? Mi?ecki wrote:
> On 9 October 2014 18:41, Guenter Roeck <linux@roeck-us.net> wrote:
> > 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.
> 
> Won't this make bcma im-POSSIBLE on MIPS? And maybe x86(_64), or at
> least add an unneeded dependency? I think we should somehow limit this
> to BCM5301X arch.

sparc, not mips.

Something like "depends on !OF || OF_ADDRESS" would limit the impact to
sparc, and only if OF is configured as well. I'll update accordingly
and resubmit. Everything else would have to be done in the driver itself,
which I rather not touch myself.

Guenter
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Arend van Spriel Oct. 9, 2014, 5:15 p.m. UTC | #3
On 10/09/14 18:54, Rafa? Mi?ecki wrote:
> On 9 October 2014 18:41, Guenter Roeck<linux@roeck-us.net>  wrote:
>> 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.

Does this mean on sparc (using allmodconfig) you will get CONFIG_OF and 
!CONFIG_OF_ADDRESS? Does that makes sense?

btw. the OF_ADDRESS dependency was introduced by commit "bcma: get IRQ 
numbers from dt".

Regards,
Arend

> Won't this make bcma im-POSSIBLE on MIPS? And maybe x86(_64), or at
> least add an unneeded dependency? I think we should somehow limit this
> to BCM5301X arch.
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Arend van Spriel Oct. 9, 2014, 5:18 p.m. UTC | #4
On 10/09/14 19:15, Arend van Spriel wrote:
> On 10/09/14 18:54, Rafa? Mi?ecki wrote:
>> On 9 October 2014 18:41, Guenter Roeck<linux@roeck-us.net> wrote:
>>> 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.
>
> Does this mean on sparc (using allmodconfig) you will get CONFIG_OF and
> !CONFIG_OF_ADDRESS? Does that makes sense?

Is CONFIG_OF is used on sparc to access OpenBoot information?

Regards,
Arend

> btw. the OF_ADDRESS dependency was introduced by commit "bcma: get IRQ
> numbers from dt".
>
> Regards,
> Arend
>
>> Won't this make bcma im-POSSIBLE on MIPS? And maybe x86(_64), or at
>> least add an unneeded dependency? I think we should somehow limit this
>> to BCM5301X arch.
>> --
>> To unsubscribe from this list: send the line "unsubscribe
>> linux-kernel" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at http://vger.kernel.org/majordomo-info.html
>> Please read the FAQ at http://www.tux.org/lkml/
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Guenter Roeck Oct. 9, 2014, 5:21 p.m. UTC | #5
On Thu, Oct 09, 2014 at 07:15:32PM +0200, Arend van Spriel wrote:
> On 10/09/14 18:54, Rafa? Mi?ecki wrote:
> >On 9 October 2014 18:41, Guenter Roeck<linux@roeck-us.net>  wrote:
> >>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.
> 
> Does this mean on sparc (using allmodconfig) you will get CONFIG_OF
> and !CONFIG_OF_ADDRESS? Does that makes sense?
> 

You tell me. From drivers/of/Kconfig:

config OF_ADDRESS
        def_bool y
	depends on !SPARC
	select OF_ADDRESS_PCI if PCI

Presumably there is a reason to disable OF_ADDRESS for sparc.

> btw. the OF_ADDRESS dependency was introduced by commit "bcma: get
> IRQ numbers from dt".
> 
Ah, sorry. Ok, I'll send v3 after taking a break (and waiting
for additional comments).

Guenter
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Guenter Roeck Oct. 9, 2014, 5:28 p.m. UTC | #6
On Thu, Oct 09, 2014 at 07:15:32PM +0200, Arend van Spriel wrote:
> On 10/09/14 18:54, Rafa? Mi?ecki wrote:
> >On 9 October 2014 18:41, Guenter Roeck<linux@roeck-us.net>  wrote:
> >>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.
> 
> Does this mean on sparc (using allmodconfig) you will get CONFIG_OF
> and !CONFIG_OF_ADDRESS? Does that makes sense?
> 
> btw. the OF_ADDRESS dependency was introduced by commit "bcma: get
> IRQ numbers from dt".

Looking into the code again: Really ? git blame tells me otherwise.
Also, I don't see the commit you refer to in the upstream kernel.
Maybe I am missing something.

Guenter
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Guenter Roeck Oct. 9, 2014, 5:29 p.m. UTC | #7
On Thu, Oct 09, 2014 at 07:18:31PM +0200, Arend van Spriel wrote:
> On 10/09/14 19:15, Arend van Spriel wrote:
> >On 10/09/14 18:54, Rafa? Mi?ecki wrote:
> >>On 9 October 2014 18:41, Guenter Roeck<linux@roeck-us.net> wrote:
> >>>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.
> >
> >Does this mean on sparc (using allmodconfig) you will get CONFIG_OF and
> >!CONFIG_OF_ADDRESS? Does that makes sense?
> 
> Is CONFIG_OF is used on sparc to access OpenBoot information?
> 
I have no idea. All I know is that the driver doesn't build anymore with OF
enabled and OF_ADDRESS disabled.

Guenter
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Hauke Mehrtens Oct. 9, 2014, 6:28 p.m. UTC | #8
On 10/09/2014 07:29 PM, Guenter Roeck wrote:
> On Thu, Oct 09, 2014 at 07:18:31PM +0200, Arend van Spriel wrote:
>> On 10/09/14 19:15, Arend van Spriel wrote:
>>> On 10/09/14 18:54, Rafa? Mi?ecki wrote:
>>>> On 9 October 2014 18:41, Guenter Roeck<linux@roeck-us.net> wrote:
>>>>> 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.
>>>
>>> Does this mean on sparc (using allmodconfig) you will get CONFIG_OF and
>>> !CONFIG_OF_ADDRESS? Does that makes sense?
>>
>> Is CONFIG_OF is used on sparc to access OpenBoot information?
>>
> I have no idea. All I know is that the driver doesn't build anymore with OF
> enabled and OF_ADDRESS disabled.

Device tree support in bcma is only needed on some SoC, when this is
used on a PCIe card it is not needed.

I would just deactivate the parts that are using device tree in bcma
when it is not available. I will send a patch after having something to eat.

Is there a better method which is compatible with SPARC than using
of_translate_address() to get the reg address and also take the ranges
attribute of the bus into account?

Hauke
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Guenter Roeck Oct. 9, 2014, 7:25 p.m. UTC | #9
On Thu, Oct 09, 2014 at 08:28:31PM +0200, Hauke Mehrtens wrote:
> On 10/09/2014 07:29 PM, Guenter Roeck wrote:
> > On Thu, Oct 09, 2014 at 07:18:31PM +0200, Arend van Spriel wrote:
> >> On 10/09/14 19:15, Arend van Spriel wrote:
> >>> On 10/09/14 18:54, Rafa? Mi?ecki wrote:
> >>>> On 9 October 2014 18:41, Guenter Roeck<linux@roeck-us.net> wrote:
> >>>>> 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.
> >>>
> >>> Does this mean on sparc (using allmodconfig) you will get CONFIG_OF and
> >>> !CONFIG_OF_ADDRESS? Does that makes sense?
> >>
> >> Is CONFIG_OF is used on sparc to access OpenBoot information?
> >>
> > I have no idea. All I know is that the driver doesn't build anymore with OF
> > enabled and OF_ADDRESS disabled.
> 
> Device tree support in bcma is only needed on some SoC, when this is
> used on a PCIe card it is not needed.
> 
> I would just deactivate the parts that are using device tree in bcma
> when it is not available. I will send a patch after having something to eat.
> 
Devicetree dependency is already covered with #ifdef CONFIG_OF. Problem is
that it really needs #ifdef CONFIG_OF_ADDRESS. Though even that might be
better than my patch, since it would at least build the driver on sparc
as it used to do.

> Is there a better method which is compatible with SPARC than using
> of_translate_address() to get the reg address and also take the ranges
> attribute of the bus into account?
> 
No idea, sorry. Can you by any chance use pcie device information
instead of depending on devicetree data ?

Guenter
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Hauke Mehrtens Oct. 9, 2014, 9:48 p.m. UTC | #10
On 10/09/2014 09:25 PM, Guenter Roeck wrote:
> On Thu, Oct 09, 2014 at 08:28:31PM +0200, Hauke Mehrtens wrote:
>> On 10/09/2014 07:29 PM, Guenter Roeck wrote:
>>> On Thu, Oct 09, 2014 at 07:18:31PM +0200, Arend van Spriel wrote:
>>>> On 10/09/14 19:15, Arend van Spriel wrote:
>>>>> On 10/09/14 18:54, Rafa? Mi?ecki wrote:
>>>>>> On 9 October 2014 18:41, Guenter Roeck<linux@roeck-us.net> wrote:
>>>>>>> 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.
>>>>>
>>>>> Does this mean on sparc (using allmodconfig) you will get CONFIG_OF and
>>>>> !CONFIG_OF_ADDRESS? Does that makes sense?
>>>>
>>>> Is CONFIG_OF is used on sparc to access OpenBoot information?
>>>>
>>> I have no idea. All I know is that the driver doesn't build anymore with OF
>>> enabled and OF_ADDRESS disabled.
>>
>> Device tree support in bcma is only needed on some SoC, when this is
>> used on a PCIe card it is not needed.
>>
>> I would just deactivate the parts that are using device tree in bcma
>> when it is not available. I will send a patch after having something to eat.
>>
> Devicetree dependency is already covered with #ifdef CONFIG_OF. Problem is
> that it really needs #ifdef CONFIG_OF_ADDRESS. Though even that might be
> better than my patch, since it would at least build the driver on sparc
> as it used to do.
> 
>> Is there a better method which is compatible with SPARC than using
>> of_translate_address() to get the reg address and also take the ranges
>> attribute of the bus into account?
>>
> No idea, sorry. Can you by any chance use pcie device information
> instead of depending on devicetree data ?

Device tree is not used for PCIe devices in bcma. We only use it when
bcma is used for the system bus on some Broadcom SoCs, currently there
is no plan to use device tree for PCIe devices in bcma. I think bcma is
only used on wifi cards connected via PCIe on Sparc systems.

Hauke
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Guenter Roeck Oct. 9, 2014, 9:57 p.m. UTC | #11
On Thu, Oct 09, 2014 at 11:48:08PM +0200, Hauke Mehrtens wrote:
> On 10/09/2014 09:25 PM, Guenter Roeck wrote:
> > On Thu, Oct 09, 2014 at 08:28:31PM +0200, Hauke Mehrtens wrote:
> >> On 10/09/2014 07:29 PM, Guenter Roeck wrote:
> >>> On Thu, Oct 09, 2014 at 07:18:31PM +0200, Arend van Spriel wrote:
> >>>> On 10/09/14 19:15, Arend van Spriel wrote:
> >>>>> On 10/09/14 18:54, Rafa? Mi?ecki wrote:
> >>>>>> On 9 October 2014 18:41, Guenter Roeck<linux@roeck-us.net> wrote:
> >>>>>>> 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.
> >>>>>
> >>>>> Does this mean on sparc (using allmodconfig) you will get CONFIG_OF and
> >>>>> !CONFIG_OF_ADDRESS? Does that makes sense?
> >>>>
> >>>> Is CONFIG_OF is used on sparc to access OpenBoot information?
> >>>>
> >>> I have no idea. All I know is that the driver doesn't build anymore with OF
> >>> enabled and OF_ADDRESS disabled.
> >>
> >> Device tree support in bcma is only needed on some SoC, when this is
> >> used on a PCIe card it is not needed.
> >>
> >> I would just deactivate the parts that are using device tree in bcma
> >> when it is not available. I will send a patch after having something to eat.
> >>
> > Devicetree dependency is already covered with #ifdef CONFIG_OF. Problem is
> > that it really needs #ifdef CONFIG_OF_ADDRESS. Though even that might be
> > better than my patch, since it would at least build the driver on sparc
> > as it used to do.
> > 
> >> Is there a better method which is compatible with SPARC than using
> >> of_translate_address() to get the reg address and also take the ranges
> >> attribute of the bus into account?
> >>
> > No idea, sorry. Can you by any chance use pcie device information
> > instead of depending on devicetree data ?
> 
> Device tree is not used for PCIe devices in bcma. We only use it when
> bcma is used for the system bus on some Broadcom SoCs, currently there
> is no plan to use device tree for PCIe devices in bcma. I think bcma is
> only used on wifi cards connected via PCIe on Sparc systems.
> 
Ok. Well, with your patch the code is as good or as bad as it was prior to
adding devicetree support to the driver, so hopefully should work.

Guenter
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Julian Calaby Oct. 10, 2014, 12:24 a.m. UTC | #12
Hi,

On Fri, Oct 10, 2014 at 4:21 AM, Guenter Roeck <linux@roeck-us.net> wrote:
> On Thu, Oct 09, 2014 at 07:15:32PM +0200, Arend van Spriel wrote:
>> On 10/09/14 18:54, Rafa? Mi?ecki wrote:
>> >On 9 October 2014 18:41, Guenter Roeck<linux@roeck-us.net>  wrote:
>> >>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.
>>
>> Does this mean on sparc (using allmodconfig) you will get CONFIG_OF
>> and !CONFIG_OF_ADDRESS? Does that makes sense?
>>
>
> You tell me. From drivers/of/Kconfig:
>
> config OF_ADDRESS
>         def_bool y
>         depends on !SPARC
>         select OF_ADDRESS_PCI if PCI
>
> Presumably there is a reason to disable OF_ADDRESS for sparc.

Why not ask the sparclinux list? (CC'd)

Thanks,
David Miller Oct. 10, 2014, 4:32 a.m. UTC | #13
From: Julian Calaby <julian.calaby@gmail.com>
Date: Fri, 10 Oct 2014 11:24:53 +1100

> Hi,
> 
> On Fri, Oct 10, 2014 at 4:21 AM, Guenter Roeck <linux@roeck-us.net> wrote:
>> On Thu, Oct 09, 2014 at 07:15:32PM +0200, Arend van Spriel wrote:
>>> On 10/09/14 18:54, Rafa? Mi?ecki wrote:
>>> >On 9 October 2014 18:41, Guenter Roeck<linux@roeck-us.net>  wrote:
>>> >>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.
>>>
>>> Does this mean on sparc (using allmodconfig) you will get CONFIG_OF
>>> and !CONFIG_OF_ADDRESS? Does that makes sense?
>>>
>>
>> You tell me. From drivers/of/Kconfig:
>>
>> config OF_ADDRESS
>>         def_bool y
>>         depends on !SPARC
>>         select OF_ADDRESS_PCI if PCI
>>
>> Presumably there is a reason to disable OF_ADDRESS for sparc.
> 
> Why not ask the sparclinux list? (CC'd)

On sparc, at boot time we precompute all of the addresses provided in
the OF device tree.

So we need none of this OF_ADDRESS infrastructure.

Frankly, I've always believed that this is how address computation
should be done on OF platforms, and it simplifies drivers massively.
You really only need to implement 2 or 3 bus translators to make it
work.  Others have disagreed with me.
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Arend van Spriel Oct. 10, 2014, 9:30 a.m. UTC | #14
On 10/09/14 23:48, Hauke Mehrtens wrote:
> On 10/09/2014 09:25 PM, Guenter Roeck wrote:
>> On Thu, Oct 09, 2014 at 08:28:31PM +0200, Hauke Mehrtens wrote:
>>> On 10/09/2014 07:29 PM, Guenter Roeck wrote:
>>>> On Thu, Oct 09, 2014 at 07:18:31PM +0200, Arend van Spriel wrote:
>>>>> On 10/09/14 19:15, Arend van Spriel wrote:
>>>>>> On 10/09/14 18:54, Rafa? Mi?ecki wrote:
>>>>>>> On 9 October 2014 18:41, Guenter Roeck<linux@roeck-us.net>  wrote:
>>>>>>>> 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.
>>>>>>
>>>>>> Does this mean on sparc (using allmodconfig) you will get CONFIG_OF and
>>>>>> !CONFIG_OF_ADDRESS? Does that makes sense?
>>>>>
>>>>> Is CONFIG_OF is used on sparc to access OpenBoot information?
>>>>>
>>>> I have no idea. All I know is that the driver doesn't build anymore with OF
>>>> enabled and OF_ADDRESS disabled.
>>>
>>> Device tree support in bcma is only needed on some SoC, when this is
>>> used on a PCIe card it is not needed.
>>>
>>> I would just deactivate the parts that are using device tree in bcma
>>> when it is not available. I will send a patch after having something to eat.
>>>
>> Devicetree dependency is already covered with #ifdef CONFIG_OF. Problem is
>> that it really needs #ifdef CONFIG_OF_ADDRESS. Though even that might be
>> better than my patch, since it would at least build the driver on sparc
>> as it used to do.
>>
>>> Is there a better method which is compatible with SPARC than using
>>> of_translate_address() to get the reg address and also take the ranges
>>> attribute of the bus into account?
>>>
>> No idea, sorry. Can you by any chance use pcie device information
>> instead of depending on devicetree data ?
>
> Device tree is not used for PCIe devices in bcma. We only use it when
> bcma is used for the system bus on some Broadcom SoCs, currently there
> is no plan to use device tree for PCIe devices in bcma. I think bcma is
> only used on wifi cards connected via PCIe on Sparc systems.

When we mainlined I verified the brcmsmac was working on a sparc system. 
However, at that time we were not using BCMA. I do not recall whether or 
not we tested on sparc with BCMA support. I might give it a spin again.

Regards,
Arend
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/bcma/Kconfig b/drivers/bcma/Kconfig
index 0ee48be..ca4b420 100644
--- a/drivers/bcma/Kconfig
+++ b/drivers/bcma/Kconfig
@@ -1,6 +1,6 @@ 
 config BCMA_POSSIBLE
 	bool
-	depends on HAS_IOMEM && HAS_DMA
+	depends on HAS_IOMEM && HAS_DMA && OF_ADDRESS
 	default y
 
 menu "Broadcom specific AMBA"