bcma: fix build error on MIPS; implicit pcibios_enable_device
PATCH 1/1 bcma: fix build error on MIPS; implicit pcibios_enable_device
The following is seen during allmodconfig builds for MIPS:
drivers/bcma/driver_pci_host.c:518:2: error: implicit declaration of function 'pcibios_enable_device' [-Werror=implicit-function-declaration]
cc1: some warnings being treated as errors
make[3]: *** [drivers/bcma/driver_pci_host.o] Error 1
Most likey introduced by commit 49dc9577155576b10ff79f0c1486c816b01f58bf
"bcma: add PCIe host controller"
Add the header instead of implicitly assuming it will be present. Sounds like a good idea, but that alone doesn't fix anything.
The real problem is that the Kconfig has settings related to whether PCI is possible, i.e.
config BCMA_HOST_PCI_POSSIBLE
bool
depends on BCMA && PCI = y
default y config BCMA_HOST_PCI
bool "Support for BCMA on PCI-host bus"
depends on BCMA_HOST_PCI_POSSIBLE
...but what is missing is that BCMA_DRIVER_PCI_HOSTMODE doesn't have any dependencies on the above. Add one.
drivers/bcma/Kconfig +1 -1
@@ -29,7 +29,7 @@ config BCMA_HOST_PCI config BCMA_DRIVER_PCI_HOSTMODE bool "Driver for PCI core working in hostmode" - depends on BCMA && MIPS + depends on BCMA && MIPS && BCMA_HOST_PCI help PCI core hostmode operation (external PCI bus).
drivers/bcma/driver_pci_host.c +1 -0
@@ -10,6 +10,7 @@*/ #include "bcma_private.h" +#include <linux/pci.h> #include <linux/export.h> #include <linux/bcma/bcma.h> #include <asm/paccess.h>
Signature · 1 line
1.7.9.4
Hi Paul,
Quoted 39 lines · Paul Gortmaker
The following is seen during allmodconfig builds for MIPS:
drivers/bcma/driver_pci_host.c:518:2: error: implicit declaration of function 'pcibios_enable_device' [-Werror=implicit-function-declaration]
cc1: some warnings being treated as errors
make[3]: *** [drivers/bcma/driver_pci_host.o] Error 1Most likey introduced by commit
49dc9577155576b10ff79f0c1486c816b01f58bf"bcma: add PCIe host controller"
Add the header instead of implicitly assuming it will be present. Sounds like a good idea, but that alone doesn't fix anything.
The real problem is that the
Kconfighas settings related to whether PCI is possible, i.e.config
BCMA_HOST_PCI_POSSIBLE
bool
depends on BCMA && PCI = y
default yconfig
BCMA_HOST_PCI
bool "Support for BCMA on PCI-host bus"
depends onBCMA_HOST_PCI_POSSIBLE...but what is missing is that
BCMA_DRIVER_PCI_HOSTMODEdoesn't have any dependencies on the above. Add one.CC Hauke Mehrtens <[email protected]>CC John W. Linville <[email protected]>Signed-off-by Paul Gortmaker <[email protected]>drivers/bcma/Kconfig +0
-0@@ -29,7 +29,7 @@ config BCMA_HOST_PCI
Quoted 4 lines
config
BCMA_DRIVER_PCI_HOSTMODE
bool "Driver for PCI core working in hostmode"
- depends on BCMA && MIPS
+ depends on BCMA && MIPS &&BCMA_HOST_PCI
I don't know the hardware, but I'm sure there'd be situations (probably for embedded devices) where hostmode would be wanted without the PCI host support - so shouldn't this depend on BCMA_HOST_PCI_POSSIBLE?
Thanks,
Signature · 5 lines
Julian Calaby Email: [email protected] Profile: http://www.google.com/profiles/julian.calaby/ .Plan: http://sites.google.com/site/juliancalaby/
Quoted 43 lines · [Re: [PATCH] bcma: fix build error on MIPS; implicit pcibios_enable_device] On…
Hi Paul,
Quoted 39 lines · Paul Gortmaker
The following is seen during allmodconfig builds for MIPS:
drivers/bcma/driver_pci_host.c:518:2: error: implicit declaration of function 'pcibios_enable_device' [-Werror=implicit-function-declaration]
cc1: some warnings being treated as errors
make[3]: *** [drivers/bcma/driver_pci_host.o] Error 1Most likey introduced by commit
49dc9577155576b10ff79f0c1486c816b01f58bf"bcma: add PCIe host controller"
Add the header instead of implicitly assuming it will be present. Sounds like a good idea, but that alone doesn't fix anything.
The real problem is that the
Kconfighas settings related to whether PCI is possible, i.e.config
BCMA_HOST_PCI_POSSIBLE
bool
depends on BCMA && PCI = y
default yconfig
BCMA_HOST_PCI
bool "Support for BCMA on PCI-host bus"
depends onBCMA_HOST_PCI_POSSIBLE...but what is missing is that
BCMA_DRIVER_PCI_HOSTMODEdoesn't have any dependencies on the above. Add one.CC Hauke Mehrtens <[email protected]>CC John W. Linville <[email protected]>Signed-off-by Paul Gortmaker <[email protected]>drivers/bcma/Kconfig +0
-0@@ -29,7 +29,7 @@ config BCMA_HOST_PCI
Quoted 9 lines
Quoted 4 lines
config
BCMA_DRIVER_PCI_HOSTMODE
bool "Driver for PCI core working in hostmode"
- depends on BCMA && MIPS
+ depends on BCMA && MIPS &&BCMA_HOST_PCII don't know the hardware, but I'm sure there'd be situations (probably for embedded devices) where hostmode would be wanted without the PCI host support - so shouldn't this depend on
BCMA_HOST_PCI_POSSIBLE?
My reading of things is that BCMA_HOST_PCI is equivalent to, or at most a subset of BCMA_HOST_PCI_POSSIBLE. But if the maintainers want to tweak things accordingly, then great -- I'm just reporting what I see in build failures.
Thanks,
Paul.
--
Quoted 9 lines
Thanks,
Signature · 5 lines
Julian Calaby Email: [email protected] Profile: http://www.google.com/profiles/julian.calaby/ .Plan: http://sites.google.com/site/juliancalaby/
Hi Paul,
Quoted 55 lines · Paul Gortmaker
Quoted 43 lines · [Re: [PATCH] bcma: fix build error on MIPS; implicit pcibios_enable_device] On…
Hi Paul,
Quoted 39 lines · Paul Gortmaker
The following is seen during allmodconfig builds for MIPS:
drivers/bcma/driver_pci_host.c:518:2: error: implicit declaration of function 'pcibios_enable_device' [-Werror=implicit-function-declaration]
cc1: some warnings being treated as errors
make[3]: *** [drivers/bcma/driver_pci_host.o] Error 1Most likey introduced by commit
49dc9577155576b10ff79f0c1486c816b01f58bf"bcma: add PCIe host controller"
Add the header instead of implicitly assuming it will be present. Sounds like a good idea, but that alone doesn't fix anything.
The real problem is that the
Kconfighas settings related to whether PCI is possible, i.e.config
BCMA_HOST_PCI_POSSIBLE
bool
depends on BCMA && PCI = y
default yconfig
BCMA_HOST_PCI
bool "Support for BCMA on PCI-host bus"
depends onBCMA_HOST_PCI_POSSIBLE...but what is missing is that
BCMA_DRIVER_PCI_HOSTMODEdoesn't have any dependencies on the above. Add one.CC Hauke Mehrtens <[email protected]>CC John W. Linville <[email protected]>Signed-off-by Paul Gortmaker <[email protected]>drivers/bcma/Kconfig +0
-0@@ -29,7 +29,7 @@ config BCMA_HOST_PCIQuoted 9 lines
Quoted 4 lines
config
BCMA_DRIVER_PCI_HOSTMODE
bool "Driver for PCI core working in hostmode"
- depends on BCMA && MIPS
+ depends on BCMA && MIPS &&BCMA_HOST_PCII don't know the hardware, but I'm sure there'd be situations (probably for embedded devices) where hostmode would be wanted without the PCI host support - so shouldn't this depend on
BCMA_HOST_PCI_POSSIBLE?
Quoted 4 lines
My reading of things is that
BCMA_HOST_PCIis equivalent to, or at most a subset ofBCMA_HOST_PCI_POSSIBLE. But if the maintainers want to tweak things accordingly, then great -- I'm just reporting what I see in build failures.
That's not the case.
BCMA_HOST_PCI is a separate config option that depends on ...._POSSIBLE but is user selectable. ...._POSSIBLE isn't user selectable and is automatically "y" when the conditions for PCI support for BCMA are true.
Thanks,
Signature · 5 lines
Julian Calaby Email: [email protected] Profile: http://www.google.com/profiles/julian.calaby/ .Plan: http://sites.google.com/site/juliancalaby/
Quoted 26 lines · Paul Gortmaker
The following is seen during allmodconfig builds for MIPS:
drivers/bcma/driver_pci_host.c:518:2: error: implicit declaration of function 'pcibios_enable_device' [-Werror=implicit-function-declaration]
cc1: some warnings being treated as errors
make[3]: *** [drivers/bcma/driver_pci_host.o] Error 1Most likey introduced by commit
49dc9577155576b10ff79f0c1486c816b01f58bf"bcma: add PCIe host controller"
Add the header instead of implicitly assuming it will be present. Sounds like a good idea, but that alone doesn't fix anything.
The real problem is that the
Kconfighas settings related to whether PCI is possible, i.e.config
BCMA_HOST_PCI_POSSIBLEbool depends on BCMA && PCI = y default yconfig
BCMA_HOST_PCI
bool "Support for BCMA on PCI-host bus"
depends onBCMA_HOST_PCI_POSSIBLE
Quoted 6 lines
...but what is missing is that
BCMA_DRIVER_PCI_HOSTMODEdoesn't have any dependencies on the above. Add one.CC Hauke Mehrtens <[email protected]>CC John W. Linville <[email protected]>Signed-off-by Paul Gortmaker <[email protected]>
Quoted 26 lines
drivers/bcma/Kconfig +1
-1@@ -29,7 +29,7 @@ config BCMA_HOST_PCI config BCMA_DRIVER_PCI_HOSTMODE bool "Driver for PCI core working in hostmode" - depends on BCMA && MIPS + depends on BCMA && MIPS && BCMA_HOST_PCI help PCI core hostmode operation (external PCI bus).drivers/bcma/driver_pci_host.c +1
-0@@ -10,6 +10,7 @@*/ #include "bcma_private.h" +#include <linux/pci.h> #include <linux/export.h> #include <linux/bcma/bcma.h> #include <asm/paccess.h>
Quoted 64 lines · Julian Calaby
Hi Paul,
Quoted 55 lines · Paul Gortmaker
Quoted 43 lines · [Re: [PATCH] bcma: fix build error on MIPS; implicit pcibios_enable_device] On…
Hi Paul,
Quoted 39 lines · Paul Gortmaker
The following is seen during allmodconfig builds for MIPS:
drivers/bcma/driver_pci_host.c:518:2: error: implicit declaration of function 'pcibios_enable_device' [-Werror=implicit-function-declaration]
cc1: some warnings being treated as errors
make[3]: *** [drivers/bcma/driver_pci_host.o] Error 1Most likey introduced by commit
49dc9577155576b10ff79f0c1486c816b01f58bf"bcma: add PCIe host controller"
Add the header instead of implicitly assuming it will be present. Sounds like a good idea, but that alone doesn't fix anything.
The real problem is that the
Kconfighas settings related to whether PCI is possible, i.e.config
BCMA_HOST_PCI_POSSIBLEbool depends on BCMA && PCI = y default yconfig
BCMA_HOST_PCI
bool "Support for BCMA on PCI-host bus"
depends onBCMA_HOST_PCI_POSSIBLE...but what is missing is that
BCMA_DRIVER_PCI_HOSTMODEdoesn't have any dependencies on the above. Add one.CC Hauke Mehrtens <[email protected]>CC John W. Linville <[email protected]>Signed-off-by Paul Gortmaker <[email protected]>drivers/bcma/Kconfig +0
-0@@ -29,7 +29,7 @@ config BCMA_HOST_PCIQuoted 9 lines
drivers/bcma/Kconfig config BCMA_HOST_PCI · line 32
Quoted 4 lines
drivers/bcma/Kconfig +1
-1config BCMA_DRIVER_PCI_HOSTMODE bool "Driver for PCI core working in hostmode" - depends on BCMA && MIPS + depends on BCMA && MIPS && BCMA_HOST_PCII don't know the hardware, but I'm sure there'd be situations (probably for embedded devices) where hostmode would be wanted without the PCI host support - so shouldn't this depend on
BCMA_HOST_PCI_POSSIBLE?Quoted 4 lines
My reading of things is that
BCMA_HOST_PCIis equivalent to, or at most a subset ofBCMA_HOST_PCI_POSSIBLE. But if the maintainers want to tweak things accordingly, then great -- I'm just reporting what I see in build failures.
Quoted 9 lines
That's not the case.
BCMA_HOST_PCIis a separate config option that depends on ...._POSSIBLE but is user selectable. ...._POSSIBLE isn't user selectable and is automatically "y" when the conditions for PCI support for BCMA are true.Thanks,
Yes that's correct. BCMA_HOST_PCI_POSSIBLE is used to only show BCMA_DRIVER_PCI_HOSTMODE if PCI is enabled. For now you are not able to use PCI host mode without also supporting client mode in bcma. I have only seen device where an other bcma based device was being behind the PCIe link.
Hauke
The following is seen during allmodconfig builds for MIPS:
drivers/bcma/driver_pci_host.c:518:2: error: implicit declaration of function 'pcibios_enable_device' [-Werror=implicit-function-declaration]
cc1: some warnings being treated as errors
make[3]: *** [drivers/bcma/driver_pci_host.o] Error 1
Most likey introduced by commit 49dc9577155576b10ff79f0c1486c816b01f58bf
"bcma: add PCIe host controller"
Add the header instead of implicitly assuming it will be present. Sounds like a good idea, but that alone doesn't fix anything.
The real problem is that the Kconfig has settings related to whether PCI is possible, i.e.
config BCMA_HOST_PCI_POSSIBLE
bool
depends on BCMA && PCI = y
default y config BCMA_HOST_PCI
bool "Support for BCMA on PCI-host bus"
depends on BCMA_HOST_PCI_POSSIBLE
...but what is missing is that BCMA_DRIVER_PCI_HOSTMODE doesn't have any dependencies on the above. Add one.
---
[ v2: depend on BCMA_HOST_PCI_POSSIBLE, not BCMA_HOST_PCI ]
drivers/bcma/Kconfig +1 -1
@@ -29,7 +29,7 @@ config BCMA_HOST_PCI config BCMA_DRIVER_PCI_HOSTMODE bool "Driver for PCI core working in hostmode" - depends on BCMA && MIPS + depends on BCMA && MIPS && BCMA_HOST_PCI_POSSIBLE help PCI core hostmode operation (external PCI bus).
drivers/bcma/driver_pci_host.c +1 -0
@@ -10,6 +10,7 @@*/ #include "bcma_private.h" +#include <linux/pci.h> #include <linux/export.h> #include <linux/bcma/bcma.h> #include <asm/paccess.h>
Signature · 1 line
1.7.9.1
Quoted 41 lines · Paul Gortmaker
The following is seen during allmodconfig builds for MIPS:
drivers/bcma/driver_pci_host.c:518:2: error: implicit declaration of function 'pcibios_enable_device' [-Werror=implicit-function-declaration]
cc1: some warnings being treated as errors
make[3]: *** [drivers/bcma/driver_pci_host.o] Error 1Most likey introduced by commit
49dc9577155576b10ff79f0c1486c816b01f58bf"bcma: add PCIe host controller"
Add the header instead of implicitly assuming it will be present. Sounds like a good idea, but that alone doesn't fix anything.
The real problem is that the
Kconfighas settings related to whether PCI is possible, i.e.config
BCMA_HOST_PCI_POSSIBLEbool depends on BCMA && PCI = y default yconfig
BCMA_HOST_PCI
bool "Support for BCMA on PCI-host bus"
depends onBCMA_HOST_PCI_POSSIBLE...but what is missing is that
BCMA_DRIVER_PCI_HOSTMODEdoesn't have any dependencies on the above. Add one.CC Hauke Mehrtens <[email protected]>CC John W. Linville <[email protected]>Signed-off-by Paul Gortmaker <[email protected]>---
[ v2: depend on
BCMA_HOST_PCI_POSSIBLE, notBCMA_HOST_PCI]drivers/bcma/Kconfig +0
-0
drivers/bcma/Kconfig config BCMA_HOST_PCI · line 32
Quoted 5 lines
drivers/bcma/Kconfig +1
-1@@ -29,7 +29,7 @@ config BCMA_HOST_PCI config BCMA_DRIVER_PCI_HOSTMODE bool "Driver for PCI core working in hostmode" - depends on BCMA && MIPS + depends on BCMA && MIPS && BCMA_HOST_PCI_POSSIBLE
This is wrong the first patch you send was correct. Now it is possible to select BCMA_DRIVER_PCI_HOSTMODE without selecting BCMA_DRIVER_PCI which will cause build errors as host mode part uses bcma_pcie_read().
You should do this:
+ depends on BCMA && MIPS && BCMA_DRIVER_PCI
Maybe I should make it possible to build it with pcie host mode support, but without pcie client mode support. For now it is not needed as all device I know of have an other bcma device behind the pcie bus.
Quoted 15 lines
drivers/bcma/Kconfig +0
-0help PCI core hostmode operation (external PCI bus).drivers/bcma/driver_pci_host.c +1
-0@@ -10,6 +10,7 @@*/ #include "bcma_private.h" +#include <linux/pci.h> #include <linux/export.h> #include <linux/bcma/bcma.h> #include <asm/paccess.h>
Quoted 53 lines · Hauke Mehrtens
Quoted 41 lines · Paul Gortmaker
The following is seen during allmodconfig builds for MIPS:
drivers/bcma/driver_pci_host.c:518:2: error: implicit declaration of function 'pcibios_enable_device' [-Werror=implicit-function-declaration]
cc1: some warnings being treated as errors
make[3]: *** [drivers/bcma/driver_pci_host.o] Error 1Most likey introduced by commit
49dc9577155576b10ff79f0c1486c816b01f58bf"bcma: add PCIe host controller"
Add the header instead of implicitly assuming it will be present. Sounds like a good idea, but that alone doesn't fix anything.
The real problem is that the
Kconfighas settings related to whether PCI is possible, i.e.config
BCMA_HOST_PCI_POSSIBLEbool depends on BCMA && PCI = y default yconfig
BCMA_HOST_PCI
bool "Support for BCMA on PCI-host bus"
depends onBCMA_HOST_PCI_POSSIBLE...but what is missing is that
BCMA_DRIVER_PCI_HOSTMODEdoesn't have any dependencies on the above. Add one.CC Hauke Mehrtens <[email protected]>CC John W. Linville <[email protected]>Signed-off-by Paul Gortmaker <[email protected]>---
[ v2: depend on
BCMA_HOST_PCI_POSSIBLE, notBCMA_HOST_PCI]drivers/bcma/Kconfig +0
-0drivers/bcma/Kconfig config BCMA_HOST_PCI · line 32
Quoted 5 lines
drivers/bcma/Kconfig +1
-1@@ -29,7 +29,7 @@ config BCMA_HOST_PCI config BCMA_DRIVER_PCI_HOSTMODE bool "Driver for PCI core working in hostmode" - depends on BCMA && MIPS + depends on BCMA && MIPS && BCMA_HOST_PCI_POSSIBLEThis is wrong the first patch you send was correct. Now it is possible to select
BCMA_DRIVER_PCI_HOSTMODEwithout selectingBCMA_DRIVER_PCIwhich will cause build errors as host mode part usesbcma_pcie_read().You should do this:
Review
Quoted 1 line
(quoted diff) +1
-0+ depends on BCMA && MIPS && BCMA_DRIVER_PCI
OK, the text in your follow-up here was confusing.
http://marc.info/?l=linux-wireless&m=133276175202412&w=2
It made me think you agreed with the proposed correction and wanted a v2, vs. agreeing with my v1 interpretation.
If John can grab the v1 and your ack'd by from here:
http://marc.info/?l=linux-wireless&m=133272031621916&w=2
then great. I'll leave it in the hands of the wireless folks from here.
Paul.
Quoted 21 lines
Maybe I should make it possible to build it with pcie host mode support, but without pcie client mode support. For now it is not needed as all device I know of have an other bcma device behind the pcie bus.
Quoted 15 lines
drivers/bcma/Kconfig +0
-0help PCI core hostmode operation (external PCI bus).drivers/bcma/driver_pci_host.c +1
-0@@ -10,6 +10,7 @@*/ #include "bcma_private.h" +#include <linux/pci.h> #include <linux/export.h> #include <linux/bcma/bcma.h> #include <asm/paccess.h>