diff mbox

arm : mach-versatile: Change PCI symbol to MACH_VERSATILE_PCI in Kconfig.

Message ID 1378446447-5589-1-git-send-email-manjunath.goudar@linaro.org
State New
Headers show

Commit Message

manjunath.goudar@linaro.org Sept. 6, 2013, 5:47 a.m. UTC
This patch changed CONFIG_PCI symbol to CONFIG_MACH_VERSATILE_PCI
in Kconfig, because this pci is specific to versatile.

Adds a MMU dependency to configure the CONFIG_MACH_VERSATILE_PCI.
Without this patch,build system can lead to build failure. This
was observed during randconfig testing, in which CONFIG_PCI was
enabled  instead of CONFIG_MACH_VERSATILE_PCI being enabled.
leading to the following error:

  LD      init/built-in.o
arch/arm/mach-versatile/built-in.o: In function `pci_versatile_setup':
arch/arm/mach-versatile/pci.c:249: undefined reference to `pci_ioremap_io'
make: *** [vmlinux] Error 1

Signed-off-by: Manjunath Goudar <manjunath.goudar@linaro.org>
    Cc: Arnd Bergmann <arnd@arndb.de>
    Cc: Deepak Saxena <dsaxena@linaro.org>
    Cc: Linus Walleij <linus.walleij@linaro.org>
    Cc: Russell King <linux@arm.linux.org.uk>
    Cc: Tony Lindgren <tony@atomide.com>
    Cc: Stephen Warren <swarren@nvidia.com>
    Cc: linux-arm-kernel@lists.infradead.org
    Cc: linux-kernel@vger.kernel.org
---
 arch/arm/mach-versatile/Kconfig  | 3 +++
 arch/arm/mach-versatile/Makefile | 2 +-
 2 files changed, 4 insertions(+), 1 deletion(-)

Comments

Linus Walleij Sept. 6, 2013, 8:41 a.m. UTC | #1
On Fri, Sep 6, 2013 at 7:47 AM, Manjunath Goudar
<manjunath.goudar@linaro.org> wrote:

> --- a/arch/arm/mach-versatile/Kconfig
> +++ b/arch/arm/mach-versatile/Kconfig
> @@ -30,4 +30,7 @@ config MACH_VERSATILE_AUTO
>         depends on !ARCH_VERSATILE_PB && !MACH_VERSATILE_AB
>         select MACH_VERSATILE_DT
>
> +config CONFIG_MACH_VERSATILE_PCI
> +       depends on MMU
> +
(...)
> -obj-$(CONFIG_PCI)                      += pci.o
> +obj-$(CONFIG_MACH_VERSATILE_PCI)       += pci.o

This does not work.

How is that config symbol supposed to be selected if someone
needs it? You've made it impossible to use PCI on the
Versatile at all.

This would rather be something like:

config CONFIG_MACH_VERSATILE_PCI
       depends on MMU
       default y if PCI

And test the result on the QEMU Versatile emulation to make
sure it works, because the Versatile QEMU user base always
get irritated when we screw up things here.

Yours,
Linus Walleij
manjunath.goudar@linaro.org Sept. 7, 2013, 10:49 a.m. UTC | #2
On 6 September 2013 14:11, Linus Walleij <linus.walleij@linaro.org> wrote:

> On Fri, Sep 6, 2013 at 7:47 AM, Manjunath Goudar
> <manjunath.goudar@linaro.org> wrote:
>
> > --- a/arch/arm/mach-versatile/Kconfig
> > +++ b/arch/arm/mach-versatile/Kconfig
> > @@ -30,4 +30,7 @@ config MACH_VERSATILE_AUTO
> >         depends on !ARCH_VERSATILE_PB && !MACH_VERSATILE_AB
> >         select MACH_VERSATILE_DT
> >
> > +config CONFIG_MACH_VERSATILE_PCI
> > +       depends on MMU
> > +
> (...)
> > -obj-$(CONFIG_PCI)                      += pci.o
> > +obj-$(CONFIG_MACH_VERSATILE_PCI)       += pci.o
>
> This does not work.
>
> How is that config symbol supposed to be selected if someone
> needs it? You've made it impossible to use PCI on the
> Versatile at all.
>
> This would rather be something like:
>
> config CONFIG_MACH_VERSATILE_PCI
>        depends on MMU
>        default y if PCI
>

sorry for missing last statement, I will add this and test in QEMU.

>
> And test the result on the QEMU Versatile emulation to make
> sure it works, because the Versatile QEMU user base always
> get irritated when we screw up things here.
>
> Yours,
> Linus Walleij
>

Thanks
Manjunath Goudar
diff mbox

Patch

diff --git a/arch/arm/mach-versatile/Kconfig b/arch/arm/mach-versatile/Kconfig
index 1dba368..37210df 100644
--- a/arch/arm/mach-versatile/Kconfig
+++ b/arch/arm/mach-versatile/Kconfig
@@ -30,4 +30,7 @@  config MACH_VERSATILE_AUTO
 	depends on !ARCH_VERSATILE_PB && !MACH_VERSATILE_AB
 	select MACH_VERSATILE_DT
 
+config CONFIG_MACH_VERSATILE_PCI
+	depends on MMU
+
 endmenu
diff --git a/arch/arm/mach-versatile/Makefile b/arch/arm/mach-versatile/Makefile
index 81fa3fe..4753c56 100644
--- a/arch/arm/mach-versatile/Makefile
+++ b/arch/arm/mach-versatile/Makefile
@@ -6,4 +6,4 @@  obj-y					:= core.o
 obj-$(CONFIG_ARCH_VERSATILE_PB)		+= versatile_pb.o
 obj-$(CONFIG_MACH_VERSATILE_AB)		+= versatile_ab.o
 obj-$(CONFIG_MACH_VERSATILE_DT)		+= versatile_dt.o
-obj-$(CONFIG_PCI)			+= pci.o
+obj-$(CONFIG_MACH_VERSATILE_PCI)	+= pci.o