Re: [PATCH] bcma: Kconfig: Let it depend on PCI

2015-03-05 Thread Chen Gang
On 3/5/15 19:40, Kalle Valo wrote:
> Rafał Miłecki  writes:
> 
>> Kalle, I guess the recent discussion and work on this problem could be
>> confusing, so let me try to sum it up it a bit.
>>
>> First of all, please note there are 3 awaiting bcma patches that
>> should be applied independently of what we decide to do with this
>> patch. They are of course inspired by the recent building problems.
>> List of these patches:
>> [PATCH next] bcma: make bcma_host_pci_(up|down) calls safe for every config
>> [PATCH next] bcma: move internal function declarations to private header
>> [PATCH next] bcma: prepare Kconfig symbol for PCI driver
>>
>> Now, the building problem is obviously caused by me, my work on
>> driver_pcie2.c and using pcie_set_readrq there without making sure
>> that is PCI available. I'm sorry for that.
>>
>> All 3 above patches are moving us toward the the most optimal solution
>> of this problem. Depending on PCI only when it's really required.
>> There is still one more change missing that I'm working on. It'll take
>> me about 2 more days to get the last patch.
>> On the other way, patch proposed by Chen fixes building problem right
>> now. It's much simpler but bumps bcma requirements a bit too high.
>> bcma doesn't really have to depend on PCI.
> 
> Thanks for the good summary, it clarified things for me.
> 
>> So you have 2 options there and I'll be happy with whatever you choose to do:
>> 1) Pick Chen patch now and in ~2 days apply my final fix + revert Chen
>> patch.
> 
> I'll prefer this option so that we can quickly solve the build problem.
> Also once your final fix is ready, please remember that you need to
> revert Chen's patch within the same patch.
> 

Thank you for all of your work. In honest, I am not quite familiar with
the details, my patch is applied only says that "I am lucky enough".

Thanks.
-- 
Chen Gang

Open, share, and attitude like air, water, and life which God blessed
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: bcma: Kconfig: Let it depend on PCI

2015-03-05 Thread Kalle Valo

> bcma also needs PCI, just like IOMEM and DMA, so let it depend on PCI,
> or will cause building break for allmodconfig under c6x:
> 
> CC [M]  drivers/bcma/driver_pcie2.o
>   drivers/bcma/driver_pcie2.c: In function 'bcma_core_pcie2_up':
>   drivers/bcma/driver_pcie2.c:196:8: error: implicit declaration of function 
> 'pcie_set_readrq' [-Werror=implicit-function-declaration]
> err = pcie_set_readrq(dev, pcie2->reqsize);
>   ^
> 
> Signed-off-by: Chen Gang 

Thanks, applied to wireless-drivers-next.git.

Kalle Valo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] bcma: Kconfig: Let it depend on PCI

2015-03-05 Thread Kalle Valo
Rafał Miłecki  writes:

> Kalle, I guess the recent discussion and work on this problem could be
> confusing, so let me try to sum it up it a bit.
>
> First of all, please note there are 3 awaiting bcma patches that
> should be applied independently of what we decide to do with this
> patch. They are of course inspired by the recent building problems.
> List of these patches:
> [PATCH next] bcma: make bcma_host_pci_(up|down) calls safe for every config
> [PATCH next] bcma: move internal function declarations to private header
> [PATCH next] bcma: prepare Kconfig symbol for PCI driver
>
> Now, the building problem is obviously caused by me, my work on
> driver_pcie2.c and using pcie_set_readrq there without making sure
> that is PCI available. I'm sorry for that.
>
> All 3 above patches are moving us toward the the most optimal solution
> of this problem. Depending on PCI only when it's really required.
> There is still one more change missing that I'm working on. It'll take
> me about 2 more days to get the last patch.
> On the other way, patch proposed by Chen fixes building problem right
> now. It's much simpler but bumps bcma requirements a bit too high.
> bcma doesn't really have to depend on PCI.

Thanks for the good summary, it clarified things for me.

> So you have 2 options there and I'll be happy with whatever you choose to do:
> 1) Pick Chen patch now and in ~2 days apply my final fix + revert Chen
> patch.

I'll prefer this option so that we can quickly solve the build problem.
Also once your final fix is ready, please remember that you need to
revert Chen's patch within the same patch.

-- 
Kalle Valo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] bcma: Kconfig: Let it depend on PCI

2015-03-05 Thread Chen Gang
On 3/5/15 19:40, Kalle Valo wrote:
 Rafał Miłecki zaj...@gmail.com writes:
 
 Kalle, I guess the recent discussion and work on this problem could be
 confusing, so let me try to sum it up it a bit.

 First of all, please note there are 3 awaiting bcma patches that
 should be applied independently of what we decide to do with this
 patch. They are of course inspired by the recent building problems.
 List of these patches:
 [PATCH next] bcma: make bcma_host_pci_(up|down) calls safe for every config
 [PATCH next] bcma: move internal function declarations to private header
 [PATCH next] bcma: prepare Kconfig symbol for PCI driver

 Now, the building problem is obviously caused by me, my work on
 driver_pcie2.c and using pcie_set_readrq there without making sure
 that is PCI available. I'm sorry for that.

 All 3 above patches are moving us toward the the most optimal solution
 of this problem. Depending on PCI only when it's really required.
 There is still one more change missing that I'm working on. It'll take
 me about 2 more days to get the last patch.
 On the other way, patch proposed by Chen fixes building problem right
 now. It's much simpler but bumps bcma requirements a bit too high.
 bcma doesn't really have to depend on PCI.
 
 Thanks for the good summary, it clarified things for me.
 
 So you have 2 options there and I'll be happy with whatever you choose to do:
 1) Pick Chen patch now and in ~2 days apply my final fix + revert Chen
 patch.
 
 I'll prefer this option so that we can quickly solve the build problem.
 Also once your final fix is ready, please remember that you need to
 revert Chen's patch within the same patch.
 

Thank you for all of your work. In honest, I am not quite familiar with
the details, my patch is applied only says that I am lucky enough.

Thanks.
-- 
Chen Gang

Open, share, and attitude like air, water, and life which God blessed
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] bcma: Kconfig: Let it depend on PCI

2015-03-05 Thread Kalle Valo
Rafał Miłecki zaj...@gmail.com writes:

 Kalle, I guess the recent discussion and work on this problem could be
 confusing, so let me try to sum it up it a bit.

 First of all, please note there are 3 awaiting bcma patches that
 should be applied independently of what we decide to do with this
 patch. They are of course inspired by the recent building problems.
 List of these patches:
 [PATCH next] bcma: make bcma_host_pci_(up|down) calls safe for every config
 [PATCH next] bcma: move internal function declarations to private header
 [PATCH next] bcma: prepare Kconfig symbol for PCI driver

 Now, the building problem is obviously caused by me, my work on
 driver_pcie2.c and using pcie_set_readrq there without making sure
 that is PCI available. I'm sorry for that.

 All 3 above patches are moving us toward the the most optimal solution
 of this problem. Depending on PCI only when it's really required.
 There is still one more change missing that I'm working on. It'll take
 me about 2 more days to get the last patch.
 On the other way, patch proposed by Chen fixes building problem right
 now. It's much simpler but bumps bcma requirements a bit too high.
 bcma doesn't really have to depend on PCI.

Thanks for the good summary, it clarified things for me.

 So you have 2 options there and I'll be happy with whatever you choose to do:
 1) Pick Chen patch now and in ~2 days apply my final fix + revert Chen
 patch.

I'll prefer this option so that we can quickly solve the build problem.
Also once your final fix is ready, please remember that you need to
revert Chen's patch within the same patch.

-- 
Kalle Valo
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: bcma: Kconfig: Let it depend on PCI

2015-03-05 Thread Kalle Valo

 bcma also needs PCI, just like IOMEM and DMA, so let it depend on PCI,
 or will cause building break for allmodconfig under c6x:
 
 CC [M]  drivers/bcma/driver_pcie2.o
   drivers/bcma/driver_pcie2.c: In function 'bcma_core_pcie2_up':
   drivers/bcma/driver_pcie2.c:196:8: error: implicit declaration of function 
 'pcie_set_readrq' [-Werror=implicit-function-declaration]
 err = pcie_set_readrq(dev, pcie2-reqsize);
   ^
 
 Signed-off-by: Chen Gang gang.chen.5...@gmail.com

Thanks, applied to wireless-drivers-next.git.

Kalle Valo
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] bcma: Kconfig: Let it depend on PCI

2015-03-04 Thread Rafał Miłecki
On 3 March 2015 at 22:16, Chen Gang  wrote:
> bcma also needs PCI, just like IOMEM and DMA, so let it depend on PCI,
> or will cause building break for allmodconfig under c6x:
>
> CC [M]  drivers/bcma/driver_pcie2.o
>   drivers/bcma/driver_pcie2.c: In function 'bcma_core_pcie2_up':
>   drivers/bcma/driver_pcie2.c:196:8: error: implicit declaration of function 
> 'pcie_set_readrq' [-Werror=implicit-function-declaration]
> err = pcie_set_readrq(dev, pcie2->reqsize);
>   ^
>
> Signed-off-by: Chen Gang 
> ---
>  drivers/bcma/Kconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/bcma/Kconfig b/drivers/bcma/Kconfig
> index 0ee48be..8be284e 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 && PCI
> default y
>
>  menu "Broadcom specific AMBA"
> --
> 1.9.3

Kalle, I guess the recent discussion and work on this problem could be
confusing, so let me try to sum it up it a bit.

First of all, please note there are 3 awaiting bcma patches that
should be applied independently of what we decide to do with this
patch. They are of course inspired by the recent building problems.
List of these patches:
[PATCH next] bcma: make bcma_host_pci_(up|down) calls safe for every config
[PATCH next] bcma: move internal function declarations to private header
[PATCH next] bcma: prepare Kconfig symbol for PCI driver

Now, the building problem is obviously caused by me, my work on
driver_pcie2.c and using pcie_set_readrq there without making sure
that is PCI available. I'm sorry for that.

All 3 above patches are moving us toward the the most optimal solution
of this problem. Depending on PCI only when it's really required.
There is still one more change missing that I'm working on. It'll take
me about 2 more days to get the last patch.
On the other way, patch proposed by Chen fixes building problem right
now. It's much simpler but bumps bcma requirements a bit too high.
bcma doesn't really have to depend on PCI.

So you have 2 options there and I'll be happy with whatever you choose to do:
1) Pick Chen patch now and in ~2 days apply my final fix + revert Chen patch.
2) Wait 2 days for the final fix from me.

-- 
Rafał
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] bcma: Kconfig: Let it depend on PCI

2015-03-04 Thread Michael Büsch
On Wed, 4 Mar 2015 14:36:10 +0100
Rafał Miłecki  wrote:

> Any other opinions?

I think this is the only way to go.
In ssb we always had optional pcicore driver, as far as I remember,
so we should have the same in bcma, too.
The old WRT54G kernel used to compile just fine with SSB and without any PCI 
enabled.

-- 
Michael


pgpJImhYmaFlG.pgp
Description: OpenPGP digital signature


Re: [PATCH] bcma: Kconfig: Let it depend on PCI

2015-03-04 Thread Rafał Miłecki
On 4 March 2015 at 17:38, Michael Büsch  wrote:
> On Wed, 4 Mar 2015 14:36:10 +0100
> Rafał Miłecki  wrote:
>
>> Any other opinions?
>
> I think this is the only way to go.
> In ssb we always had optional pcicore driver, as far as I remember,
> so we should have the same in bcma, too.
> The old WRT54G kernel used to compile just fine with SSB and without any PCI 
> enabled.

Thanks. I'll start working on this in a second.

-- 
Rafał
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] bcma: Kconfig: Let it depend on PCI

2015-03-04 Thread Rafał Miłecki
On 4 March 2015 at 13:08, Rafał Miłecki  wrote:
> On 4 March 2015 at 07:19, Rafał Miłecki  wrote:
>> On 3 March 2015 at 22:16, Chen Gang  wrote:
>>> bcma also needs PCI, just like IOMEM and DMA, so let it depend on PCI,
>>> or will cause building break for allmodconfig under c6x:
>>>
>>> CC [M]  drivers/bcma/driver_pcie2.o
>>>   drivers/bcma/driver_pcie2.c: In function 'bcma_core_pcie2_up':
>>>   drivers/bcma/driver_pcie2.c:196:8: error: implicit declaration of 
>>> function 'pcie_set_readrq' [-Werror=implicit-function-declaration]
>>> err = pcie_set_readrq(dev, pcie2->reqsize);
>>>   ^
>>>
>>> Signed-off-by: Chen Gang 
>>> ---
>>>  drivers/bcma/Kconfig | 2 +-
>>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/drivers/bcma/Kconfig b/drivers/bcma/Kconfig
>>> index 0ee48be..8be284e 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 && PCI
>>> default y
>>>
>>>  menu "Broadcom specific AMBA"
>>> --
>>> 1.9.3
>>
>> Hm, I'm not sure how to ideally handle this. Cc-ing few ppl, maybe
>> they have something to add.
>>
>> In fact there are SoCs (not using PCI host code obviously) with
>> everything embedded (without any PCI host mode cores). So note
>> following info about driver_pci.c and driver_pcie2.c:
>> 1) For BCMA_HOST_PCI
>> They are required, because of needed host-related PCI(e) core initialization.
>> 2) For BCMA_HOST_SOC
>> They are needed only if your SoC has PCI(e) host cores and you want to use 
>> them.
>>
>> So I guess in theory we could have BCMA_DRIVER_PCI and *require* it
>> for BCMA_HOST_PCI only.
>
> After thinking about this.
> We already have Kconfig entries for other internal drivers, so I guess
> it makes sense to do the same for PCIe.

I've just realized that implementing my idea (optional PCIe core
drivers) will require reworking following functions:
bcma_core_pci_irq_ctl
bcma_core_pci_power_save
bcma_core_pci_irq_ctl
bcma_core_pci_init
bcma_core_pcie2_init
bcma_core_pci_early_init
to make them safe to call ever without BCMA_DRIVER_PCI(E).

To do that we should clean headers first, which is what I started doing in
[PATCH next] bcma: move internal function declarations to private header

So I think that for now we could just accept Chen's patch and then
improve PCIe handling in bcma dropping this dependency at some point.

Any other opinions?

-- 
Rafał
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] bcma: Kconfig: Let it depend on PCI

2015-03-04 Thread Rafał Miłecki
On 4 March 2015 at 07:19, Rafał Miłecki  wrote:
> On 3 March 2015 at 22:16, Chen Gang  wrote:
>> bcma also needs PCI, just like IOMEM and DMA, so let it depend on PCI,
>> or will cause building break for allmodconfig under c6x:
>>
>> CC [M]  drivers/bcma/driver_pcie2.o
>>   drivers/bcma/driver_pcie2.c: In function 'bcma_core_pcie2_up':
>>   drivers/bcma/driver_pcie2.c:196:8: error: implicit declaration of function 
>> 'pcie_set_readrq' [-Werror=implicit-function-declaration]
>> err = pcie_set_readrq(dev, pcie2->reqsize);
>>   ^
>>
>> Signed-off-by: Chen Gang 
>> ---
>>  drivers/bcma/Kconfig | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/bcma/Kconfig b/drivers/bcma/Kconfig
>> index 0ee48be..8be284e 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 && PCI
>> default y
>>
>>  menu "Broadcom specific AMBA"
>> --
>> 1.9.3
>
> Hm, I'm not sure how to ideally handle this. Cc-ing few ppl, maybe
> they have something to add.
>
> In fact there are SoCs (not using PCI host code obviously) with
> everything embedded (without any PCI host mode cores). So note
> following info about driver_pci.c and driver_pcie2.c:
> 1) For BCMA_HOST_PCI
> They are required, because of needed host-related PCI(e) core initialization.
> 2) For BCMA_HOST_SOC
> They are needed only if your SoC has PCI(e) host cores and you want to use 
> them.
>
> So I guess in theory we could have BCMA_DRIVER_PCI and *require* it
> for BCMA_HOST_PCI only.

After thinking about this.
We already have Kconfig entries for other internal drivers, so I guess
it makes sense to do the same for PCIe.

-- 
Rafał
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] bcma: Kconfig: Let it depend on PCI

2015-03-04 Thread Michael Büsch
On Wed, 4 Mar 2015 14:36:10 +0100
Rafał Miłecki zaj...@gmail.com wrote:

 Any other opinions?

I think this is the only way to go.
In ssb we always had optional pcicore driver, as far as I remember,
so we should have the same in bcma, too.
The old WRT54G kernel used to compile just fine with SSB and without any PCI 
enabled.

-- 
Michael


pgpJImhYmaFlG.pgp
Description: OpenPGP digital signature


Re: [PATCH] bcma: Kconfig: Let it depend on PCI

2015-03-04 Thread Rafał Miłecki
On 4 March 2015 at 17:38, Michael Büsch m...@bues.ch wrote:
 On Wed, 4 Mar 2015 14:36:10 +0100
 Rafał Miłecki zaj...@gmail.com wrote:

 Any other opinions?

 I think this is the only way to go.
 In ssb we always had optional pcicore driver, as far as I remember,
 so we should have the same in bcma, too.
 The old WRT54G kernel used to compile just fine with SSB and without any PCI 
 enabled.

Thanks. I'll start working on this in a second.

-- 
Rafał
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] bcma: Kconfig: Let it depend on PCI

2015-03-04 Thread Rafał Miłecki
On 3 March 2015 at 22:16, Chen Gang xili_gchen_5...@hotmail.com wrote:
 bcma also needs PCI, just like IOMEM and DMA, so let it depend on PCI,
 or will cause building break for allmodconfig under c6x:

 CC [M]  drivers/bcma/driver_pcie2.o
   drivers/bcma/driver_pcie2.c: In function 'bcma_core_pcie2_up':
   drivers/bcma/driver_pcie2.c:196:8: error: implicit declaration of function 
 'pcie_set_readrq' [-Werror=implicit-function-declaration]
 err = pcie_set_readrq(dev, pcie2-reqsize);
   ^

 Signed-off-by: Chen Gang gang.chen.5...@gmail.com
 ---
  drivers/bcma/Kconfig | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

 diff --git a/drivers/bcma/Kconfig b/drivers/bcma/Kconfig
 index 0ee48be..8be284e 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  PCI
 default y

  menu Broadcom specific AMBA
 --
 1.9.3

Kalle, I guess the recent discussion and work on this problem could be
confusing, so let me try to sum it up it a bit.

First of all, please note there are 3 awaiting bcma patches that
should be applied independently of what we decide to do with this
patch. They are of course inspired by the recent building problems.
List of these patches:
[PATCH next] bcma: make bcma_host_pci_(up|down) calls safe for every config
[PATCH next] bcma: move internal function declarations to private header
[PATCH next] bcma: prepare Kconfig symbol for PCI driver

Now, the building problem is obviously caused by me, my work on
driver_pcie2.c and using pcie_set_readrq there without making sure
that is PCI available. I'm sorry for that.

All 3 above patches are moving us toward the the most optimal solution
of this problem. Depending on PCI only when it's really required.
There is still one more change missing that I'm working on. It'll take
me about 2 more days to get the last patch.
On the other way, patch proposed by Chen fixes building problem right
now. It's much simpler but bumps bcma requirements a bit too high.
bcma doesn't really have to depend on PCI.

So you have 2 options there and I'll be happy with whatever you choose to do:
1) Pick Chen patch now and in ~2 days apply my final fix + revert Chen patch.
2) Wait 2 days for the final fix from me.

-- 
Rafał
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] bcma: Kconfig: Let it depend on PCI

2015-03-04 Thread Rafał Miłecki
On 4 March 2015 at 07:19, Rafał Miłecki zaj...@gmail.com wrote:
 On 3 March 2015 at 22:16, Chen Gang xili_gchen_5...@hotmail.com wrote:
 bcma also needs PCI, just like IOMEM and DMA, so let it depend on PCI,
 or will cause building break for allmodconfig under c6x:

 CC [M]  drivers/bcma/driver_pcie2.o
   drivers/bcma/driver_pcie2.c: In function 'bcma_core_pcie2_up':
   drivers/bcma/driver_pcie2.c:196:8: error: implicit declaration of function 
 'pcie_set_readrq' [-Werror=implicit-function-declaration]
 err = pcie_set_readrq(dev, pcie2-reqsize);
   ^

 Signed-off-by: Chen Gang gang.chen.5...@gmail.com
 ---
  drivers/bcma/Kconfig | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

 diff --git a/drivers/bcma/Kconfig b/drivers/bcma/Kconfig
 index 0ee48be..8be284e 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  PCI
 default y

  menu Broadcom specific AMBA
 --
 1.9.3

 Hm, I'm not sure how to ideally handle this. Cc-ing few ppl, maybe
 they have something to add.

 In fact there are SoCs (not using PCI host code obviously) with
 everything embedded (without any PCI host mode cores). So note
 following info about driver_pci.c and driver_pcie2.c:
 1) For BCMA_HOST_PCI
 They are required, because of needed host-related PCI(e) core initialization.
 2) For BCMA_HOST_SOC
 They are needed only if your SoC has PCI(e) host cores and you want to use 
 them.

 So I guess in theory we could have BCMA_DRIVER_PCI and *require* it
 for BCMA_HOST_PCI only.

After thinking about this.
We already have Kconfig entries for other internal drivers, so I guess
it makes sense to do the same for PCIe.

-- 
Rafał
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] bcma: Kconfig: Let it depend on PCI

2015-03-04 Thread Rafał Miłecki
On 4 March 2015 at 13:08, Rafał Miłecki zaj...@gmail.com wrote:
 On 4 March 2015 at 07:19, Rafał Miłecki zaj...@gmail.com wrote:
 On 3 March 2015 at 22:16, Chen Gang xili_gchen_5...@hotmail.com wrote:
 bcma also needs PCI, just like IOMEM and DMA, so let it depend on PCI,
 or will cause building break for allmodconfig under c6x:

 CC [M]  drivers/bcma/driver_pcie2.o
   drivers/bcma/driver_pcie2.c: In function 'bcma_core_pcie2_up':
   drivers/bcma/driver_pcie2.c:196:8: error: implicit declaration of 
 function 'pcie_set_readrq' [-Werror=implicit-function-declaration]
 err = pcie_set_readrq(dev, pcie2-reqsize);
   ^

 Signed-off-by: Chen Gang gang.chen.5...@gmail.com
 ---
  drivers/bcma/Kconfig | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

 diff --git a/drivers/bcma/Kconfig b/drivers/bcma/Kconfig
 index 0ee48be..8be284e 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  PCI
 default y

  menu Broadcom specific AMBA
 --
 1.9.3

 Hm, I'm not sure how to ideally handle this. Cc-ing few ppl, maybe
 they have something to add.

 In fact there are SoCs (not using PCI host code obviously) with
 everything embedded (without any PCI host mode cores). So note
 following info about driver_pci.c and driver_pcie2.c:
 1) For BCMA_HOST_PCI
 They are required, because of needed host-related PCI(e) core initialization.
 2) For BCMA_HOST_SOC
 They are needed only if your SoC has PCI(e) host cores and you want to use 
 them.

 So I guess in theory we could have BCMA_DRIVER_PCI and *require* it
 for BCMA_HOST_PCI only.

 After thinking about this.
 We already have Kconfig entries for other internal drivers, so I guess
 it makes sense to do the same for PCIe.

I've just realized that implementing my idea (optional PCIe core
drivers) will require reworking following functions:
bcma_core_pci_irq_ctl
bcma_core_pci_power_save
bcma_core_pci_irq_ctl
bcma_core_pci_init
bcma_core_pcie2_init
bcma_core_pci_early_init
to make them safe to call ever without BCMA_DRIVER_PCI(E).

To do that we should clean headers first, which is what I started doing in
[PATCH next] bcma: move internal function declarations to private header

So I think that for now we could just accept Chen's patch and then
improve PCIe handling in bcma dropping this dependency at some point.

Any other opinions?

-- 
Rafał
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] bcma: Kconfig: Let it depend on PCI

2015-03-03 Thread Chen Gang

Sorry for my carelessness, I deleted the original reply mail to me (may
also deleted another mails to me, too).

The hotmail is not stable, I am just struggling with it (it can not work
well with linux-kernel@vger.kernel.org).

Could you forward your original reply to me again?

Thanks.

On 3/4/15 05:16, Chen Gang wrote:
> bcma also needs PCI, just like IOMEM and DMA, so let it depend on PCI,
> or will cause building break for allmodconfig under c6x:
> 
> CC [M]  drivers/bcma/driver_pcie2.o
>   drivers/bcma/driver_pcie2.c: In function 'bcma_core_pcie2_up':
>   drivers/bcma/driver_pcie2.c:196:8: error: implicit declaration of function 
> 'pcie_set_readrq' [-Werror=implicit-function-declaration]
> err = pcie_set_readrq(dev, pcie2->reqsize);
>   ^
> 
> Signed-off-by: Chen Gang 
> ---
>  drivers/bcma/Kconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/bcma/Kconfig b/drivers/bcma/Kconfig
> index 0ee48be..8be284e 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 && PCI
>   default y
>  
>  menu "Broadcom specific AMBA"
> 

-- 
Chen Gang

Open, share, and attitude like air, water, and life which God blessed
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] bcma: Kconfig: Let it depend on PCI

2015-03-03 Thread Rafał Miłecki
On 3 March 2015 at 22:16, Chen Gang  wrote:
> bcma also needs PCI, just like IOMEM and DMA, so let it depend on PCI,
> or will cause building break for allmodconfig under c6x:
>
> CC [M]  drivers/bcma/driver_pcie2.o
>   drivers/bcma/driver_pcie2.c: In function 'bcma_core_pcie2_up':
>   drivers/bcma/driver_pcie2.c:196:8: error: implicit declaration of function 
> 'pcie_set_readrq' [-Werror=implicit-function-declaration]
> err = pcie_set_readrq(dev, pcie2->reqsize);
>   ^
>
> Signed-off-by: Chen Gang 
> ---
>  drivers/bcma/Kconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/bcma/Kconfig b/drivers/bcma/Kconfig
> index 0ee48be..8be284e 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 && PCI
> default y
>
>  menu "Broadcom specific AMBA"
> --
> 1.9.3

Hm, I'm not sure how to ideally handle this. Cc-ing few ppl, maybe
they have something to add.

In fact there are SoCs (not using PCI host code obviously) with
everything embedded (without any PCI host mode cores). So note
following info about driver_pci.c and driver_pcie2.c:
1) For BCMA_HOST_PCI
They are required, because of needed host-related PCI(e) core initialization.
2) For BCMA_HOST_SOC
They are needed only if your SoC has PCI(e) host cores and you want to use them.

So I guess in theory we could have BCMA_DRIVER_PCI and *require* it
for BCMA_HOST_PCI only.

This could save some little amount of space for users of some SoCs
like (ancient) BCM5352E, BCM5354 or (newer) BCM5357B0, BCM5358,
BCM47186B0, BCM5357C0, BCM5356C0, BCM4716B0.

-- 
Rafał
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] bcma: Kconfig: Let it depend on PCI

2015-03-03 Thread Chen Gang
bcma also needs PCI, just like IOMEM and DMA, so let it depend on PCI,
or will cause building break for allmodconfig under c6x:

CC [M]  drivers/bcma/driver_pcie2.o
  drivers/bcma/driver_pcie2.c: In function 'bcma_core_pcie2_up':
  drivers/bcma/driver_pcie2.c:196:8: error: implicit declaration of function 
'pcie_set_readrq' [-Werror=implicit-function-declaration]
err = pcie_set_readrq(dev, pcie2->reqsize);
  ^

Signed-off-by: Chen Gang 
---
 drivers/bcma/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/bcma/Kconfig b/drivers/bcma/Kconfig
index 0ee48be..8be284e 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 && PCI
default y
 
 menu "Broadcom specific AMBA"
-- 
1.9.3
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] bcma: Kconfig: Let it depend on PCI

2015-03-03 Thread Chen Gang
bcma also needs PCI, just like IOMEM and DMA, so let it depend on PCI,
or will cause building break for allmodconfig under c6x:

CC [M]  drivers/bcma/driver_pcie2.o
  drivers/bcma/driver_pcie2.c: In function 'bcma_core_pcie2_up':
  drivers/bcma/driver_pcie2.c:196:8: error: implicit declaration of function 
'pcie_set_readrq' [-Werror=implicit-function-declaration]
err = pcie_set_readrq(dev, pcie2-reqsize);
  ^

Signed-off-by: Chen Gang gang.chen.5...@gmail.com
---
 drivers/bcma/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/bcma/Kconfig b/drivers/bcma/Kconfig
index 0ee48be..8be284e 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  PCI
default y
 
 menu Broadcom specific AMBA
-- 
1.9.3
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] bcma: Kconfig: Let it depend on PCI

2015-03-03 Thread Rafał Miłecki
On 3 March 2015 at 22:16, Chen Gang xili_gchen_5...@hotmail.com wrote:
 bcma also needs PCI, just like IOMEM and DMA, so let it depend on PCI,
 or will cause building break for allmodconfig under c6x:

 CC [M]  drivers/bcma/driver_pcie2.o
   drivers/bcma/driver_pcie2.c: In function 'bcma_core_pcie2_up':
   drivers/bcma/driver_pcie2.c:196:8: error: implicit declaration of function 
 'pcie_set_readrq' [-Werror=implicit-function-declaration]
 err = pcie_set_readrq(dev, pcie2-reqsize);
   ^

 Signed-off-by: Chen Gang gang.chen.5...@gmail.com
 ---
  drivers/bcma/Kconfig | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

 diff --git a/drivers/bcma/Kconfig b/drivers/bcma/Kconfig
 index 0ee48be..8be284e 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  PCI
 default y

  menu Broadcom specific AMBA
 --
 1.9.3

Hm, I'm not sure how to ideally handle this. Cc-ing few ppl, maybe
they have something to add.

In fact there are SoCs (not using PCI host code obviously) with
everything embedded (without any PCI host mode cores). So note
following info about driver_pci.c and driver_pcie2.c:
1) For BCMA_HOST_PCI
They are required, because of needed host-related PCI(e) core initialization.
2) For BCMA_HOST_SOC
They are needed only if your SoC has PCI(e) host cores and you want to use them.

So I guess in theory we could have BCMA_DRIVER_PCI and *require* it
for BCMA_HOST_PCI only.

This could save some little amount of space for users of some SoCs
like (ancient) BCM5352E, BCM5354 or (newer) BCM5357B0, BCM5358,
BCM47186B0, BCM5357C0, BCM5356C0, BCM4716B0.

-- 
Rafał
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] bcma: Kconfig: Let it depend on PCI

2015-03-03 Thread Chen Gang

Sorry for my carelessness, I deleted the original reply mail to me (may
also deleted another mails to me, too).

The hotmail is not stable, I am just struggling with it (it can not work
well with linux-kernel@vger.kernel.org).

Could you forward your original reply to me again?

Thanks.

On 3/4/15 05:16, Chen Gang wrote:
 bcma also needs PCI, just like IOMEM and DMA, so let it depend on PCI,
 or will cause building break for allmodconfig under c6x:
 
 CC [M]  drivers/bcma/driver_pcie2.o
   drivers/bcma/driver_pcie2.c: In function 'bcma_core_pcie2_up':
   drivers/bcma/driver_pcie2.c:196:8: error: implicit declaration of function 
 'pcie_set_readrq' [-Werror=implicit-function-declaration]
 err = pcie_set_readrq(dev, pcie2-reqsize);
   ^
 
 Signed-off-by: Chen Gang gang.chen.5...@gmail.com
 ---
  drivers/bcma/Kconfig | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/drivers/bcma/Kconfig b/drivers/bcma/Kconfig
 index 0ee48be..8be284e 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  PCI
   default y
  
  menu Broadcom specific AMBA
 

-- 
Chen Gang

Open, share, and attitude like air, water, and life which God blessed
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/