linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 11/22] mtd: Fix dependencies for !HAS_IOMEM archs
       [not found] <1453760661-1444-1-git-send-email-richard@nod.at>
@ 2016-01-25 22:24 ` Richard Weinberger
  2016-01-26 11:00   ` Geert Uytterhoeven
  2016-01-25 22:24 ` [PATCH 21/22] mtd: cs553x: " Richard Weinberger
  1 sibling, 1 reply; 7+ messages in thread
From: Richard Weinberger @ 2016-01-25 22:24 UTC (permalink / raw)
  To: linux-kernel
  Cc: user-mode-linux-devel, Richard Weinberger, David Woodhouse,
	Brian Norris, Geert Uytterhoeven, Bill Pringlemeir, Stefan Agner,
	Kevin Hao, Masahiro Yamada, Alex Smith, Andy Shevchenko,
	Zhou Wang, Anup Patel, Han xu, Joachim Eastwood, Ezequiel Garcia,
	Bayi Cheng, Fabio Estevam, linux-mtd

Not every arch has io memory.
So, unbreak the build by fixing the dependencies.

Signed-off-by: Richard Weinberger <richard@nod.at>
---
 drivers/mtd/nand/Kconfig    | 2 ++
 drivers/mtd/spi-nor/Kconfig | 1 +
 2 files changed, 3 insertions(+)

diff --git a/drivers/mtd/nand/Kconfig b/drivers/mtd/nand/Kconfig
index 20f01b3..545d82b 100644
--- a/drivers/mtd/nand/Kconfig
+++ b/drivers/mtd/nand/Kconfig
@@ -74,6 +74,7 @@ config MTD_NAND_DENALI_SCRATCH_REG_ADDR
 config MTD_NAND_GPIO
 	tristate "GPIO assisted NAND Flash driver"
 	depends on GPIOLIB || COMPILE_TEST
+	depends on HAS_IOMEM
 	help
 	  This enables a NAND flash driver where control signals are
 	  connected to GPIO pins, and commands and data are communicated
@@ -463,6 +464,7 @@ config MTD_NAND_MPC5121_NFC
 config MTD_NAND_VF610_NFC
 	tristate "Support for Freescale NFC for VF610/MPC5125"
 	depends on (SOC_VF610 || COMPILE_TEST)
+	depends on HAS_IOMEM
 	help
 	  Enables support for NAND Flash Controller on some Freescale
 	  processors like the VF610, MPC5125, MCF54418 or Kinetis K70.
diff --git a/drivers/mtd/spi-nor/Kconfig b/drivers/mtd/spi-nor/Kconfig
index 0dc9275..83befab 100644
--- a/drivers/mtd/spi-nor/Kconfig
+++ b/drivers/mtd/spi-nor/Kconfig
@@ -9,6 +9,7 @@ if MTD_SPI_NOR
 
 config MTD_MT81xx_NOR
 	tristate "Mediatek MT81xx SPI NOR flash controller"
+	depends on HAS_IOMEM
 	help
 	  This enables access to SPI NOR flash, using MT81xx SPI NOR flash
 	  controller. This controller does not support generic SPI BUS, it only
-- 
1.8.4.5

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 21/22] mtd: cs553x: Fix dependencies for !HAS_IOMEM archs
       [not found] <1453760661-1444-1-git-send-email-richard@nod.at>
  2016-01-25 22:24 ` [PATCH 11/22] mtd: Fix dependencies for !HAS_IOMEM archs Richard Weinberger
@ 2016-01-25 22:24 ` Richard Weinberger
  2016-01-26 11:00   ` Geert Uytterhoeven
  1 sibling, 1 reply; 7+ messages in thread
From: Richard Weinberger @ 2016-01-25 22:24 UTC (permalink / raw)
  To: linux-kernel
  Cc: user-mode-linux-devel, Richard Weinberger, David Woodhouse,
	Brian Norris, Geert Uytterhoeven, Bill Pringlemeir, Stefan Agner,
	Alex Smith, Zhou Wang, Andy Shevchenko, Masahiro Yamada,
	Anup Patel, linux-mtd

Not every arch has io memory nor can this driver ever work
on UML/i386.
So, unbreak the build by fixing the dependencies.

Signed-off-by: Richard Weinberger <richard@nod.at>
---
 drivers/mtd/nand/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/mtd/nand/Kconfig b/drivers/mtd/nand/Kconfig
index 545d82b..b253654 100644
--- a/drivers/mtd/nand/Kconfig
+++ b/drivers/mtd/nand/Kconfig
@@ -311,6 +311,7 @@ config MTD_NAND_CAFE
 config MTD_NAND_CS553X
 	tristate "NAND support for CS5535/CS5536 (AMD Geode companion chip)"
 	depends on X86_32
+	depends on !UML && HAS_IOMEM
 	help
 	  The CS553x companion chips for the AMD Geode processor
 	  include NAND flash controllers with built-in hardware ECC
-- 
1.8.4.5

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH 21/22] mtd: cs553x: Fix dependencies for !HAS_IOMEM archs
  2016-01-25 22:24 ` [PATCH 21/22] mtd: cs553x: " Richard Weinberger
@ 2016-01-26 11:00   ` Geert Uytterhoeven
  2016-01-26 13:58     ` Richard Weinberger
  0 siblings, 1 reply; 7+ messages in thread
From: Geert Uytterhoeven @ 2016-01-26 11:00 UTC (permalink / raw)
  To: Richard Weinberger
  Cc: linux-kernel@vger.kernel.org, uml-devel, David Woodhouse,
	Brian Norris, Geert Uytterhoeven, Bill Pringlemeir, Stefan Agner,
	Alex Smith, Zhou Wang, Andy Shevchenko, Masahiro Yamada,
	Anup Patel, MTD Maling List

Hi Richard,

On Mon, Jan 25, 2016 at 11:24 PM, Richard Weinberger <richard@nod.at> wrote:
> Not every arch has io memory nor can this driver ever work
> on UML/i386.
> So, unbreak the build by fixing the dependencies.
>
> Signed-off-by: Richard Weinberger <richard@nod.at>
> ---
>  drivers/mtd/nand/Kconfig | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/mtd/nand/Kconfig b/drivers/mtd/nand/Kconfig
> index 545d82b..b253654 100644
> --- a/drivers/mtd/nand/Kconfig
> +++ b/drivers/mtd/nand/Kconfig
> @@ -311,6 +311,7 @@ config MTD_NAND_CAFE
>  config MTD_NAND_CS553X
>         tristate "NAND support for CS5535/CS5536 (AMD Geode companion chip)"
>         depends on X86_32
> +       depends on !UML && HAS_IOMEM

I don't think there's a need for the !UML dependency?
Hence just "depends on X86_32 && HAS_IOMEM"?

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 11/22] mtd: Fix dependencies for !HAS_IOMEM archs
  2016-01-25 22:24 ` [PATCH 11/22] mtd: Fix dependencies for !HAS_IOMEM archs Richard Weinberger
@ 2016-01-26 11:00   ` Geert Uytterhoeven
  2016-01-26 19:31     ` Brian Norris
  0 siblings, 1 reply; 7+ messages in thread
From: Geert Uytterhoeven @ 2016-01-26 11:00 UTC (permalink / raw)
  To: Richard Weinberger
  Cc: linux-kernel@vger.kernel.org, uml-devel, David Woodhouse,
	Brian Norris, Geert Uytterhoeven, Bill Pringlemeir, Stefan Agner,
	Kevin Hao, Masahiro Yamada, Alex Smith, Andy Shevchenko,
	Zhou Wang, Anup Patel, Han xu, Joachim Eastwood, Ezequiel Garcia,
	Bayi Cheng, Fabio Estevam, MTD Maling List

On Mon, Jan 25, 2016 at 11:24 PM, Richard Weinberger <richard@nod.at> wrote:
> Not every arch has io memory.
> So, unbreak the build by fixing the dependencies.
>
> Signed-off-by: Richard Weinberger <richard@nod.at>

Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 21/22] mtd: cs553x: Fix dependencies for !HAS_IOMEM archs
  2016-01-26 11:00   ` Geert Uytterhoeven
@ 2016-01-26 13:58     ` Richard Weinberger
  2016-02-01 17:38       ` Brian Norris
  0 siblings, 1 reply; 7+ messages in thread
From: Richard Weinberger @ 2016-01-26 13:58 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: linux-kernel@vger.kernel.org, uml-devel, David Woodhouse,
	Brian Norris, Geert Uytterhoeven, Bill Pringlemeir, Stefan Agner,
	Alex Smith, Zhou Wang, Andy Shevchenko, Masahiro Yamada,
	Anup Patel, MTD Maling List

Geert,

Am 26.01.2016 um 12:00 schrieb Geert Uytterhoeven:
> Hi Richard,
> 
> On Mon, Jan 25, 2016 at 11:24 PM, Richard Weinberger <richard@nod.at> wrote:
>> Not every arch has io memory nor can this driver ever work
>> on UML/i386.
>> So, unbreak the build by fixing the dependencies.
>>
>> Signed-off-by: Richard Weinberger <richard@nod.at>
>> ---
>>  drivers/mtd/nand/Kconfig | 1 +
>>  1 file changed, 1 insertion(+)
>>
>> diff --git a/drivers/mtd/nand/Kconfig b/drivers/mtd/nand/Kconfig
>> index 545d82b..b253654 100644
>> --- a/drivers/mtd/nand/Kconfig
>> +++ b/drivers/mtd/nand/Kconfig
>> @@ -311,6 +311,7 @@ config MTD_NAND_CAFE
>>  config MTD_NAND_CS553X
>>         tristate "NAND support for CS5535/CS5536 (AMD Geode companion chip)"
>>         depends on X86_32
>> +       depends on !UML && HAS_IOMEM
> 
> I don't think there's a need for the !UML dependency?
> Hence just "depends on X86_32 && HAS_IOMEM"?

Strictly speaking this would work as HAS_IOMEM implies !UML.
The build error shows that it fails also because UML/i386 is x86_32
but lacks some x86_32 stuff:

drivers/mtd/nand/cs553x_nand.c: In function ‘cs553x_init_one’:
drivers/mtd/nand/cs553x_nand.c:212:2: error: implicit declaration of function ‘ioremap’ [-Werror=implicit-function-declaration]
  this->IO_ADDR_R = this->IO_ADDR_W = ioremap(adr, 4096);
  ^
drivers/mtd/nand/cs553x_nand.c:212:36: warning: assignment makes pointer from integer without a cast [enabled by default]
  this->IO_ADDR_R = this->IO_ADDR_W = ioremap(adr, 4096);
                                    ^
drivers/mtd/nand/cs553x_nand.c:256:2: error: implicit declaration of function ‘iounmap’ [-Werror=implicit-function-declaration]
  iounmap(this->IO_ADDR_R);
  ^
drivers/mtd/nand/cs553x_nand.c: In function ‘is_geode’:
drivers/mtd/nand/cs553x_nand.c:266:19: error: ‘struct cpuinfo_um’ has no member named ‘x86_vendor’
  if (boot_cpu_data.x86_vendor == X86_VENDOR_AMD &&
                   ^
drivers/mtd/nand/cs553x_nand.c:266:34: error: ‘X86_VENDOR_AMD’ undeclared (first use in this function)
  if (boot_cpu_data.x86_vendor == X86_VENDOR_AMD &&
                                  ^
drivers/mtd/nand/cs553x_nand.c:266:34: note: each undeclared identifier is reported only once for each function it appears in
drivers/mtd/nand/cs553x_nand.c:267:19: error: ‘struct cpuinfo_um’ has no member named ‘x86’
      boot_cpu_data.x86 == 5 &&
                   ^
drivers/mtd/nand/cs553x_nand.c:268:19: error: ‘struct cpuinfo_um’ has no member named ‘x86_model’
      boot_cpu_data.x86_model == 10)
                   ^
drivers/mtd/nand/cs553x_nand.c:271:20: error: ‘struct cpuinfo_um’ has no member named ‘x86_vendor’
  if ((boot_cpu_data.x86_vendor == X86_VENDOR_NSC ||
                    ^
drivers/mtd/nand/cs553x_nand.c:271:35: error: ‘X86_VENDOR_NSC’ undeclared (first use in this function)
  if ((boot_cpu_data.x86_vendor == X86_VENDOR_NSC ||
                                   ^
drivers/mtd/nand/cs553x_nand.c:272:20: error: ‘struct cpuinfo_um’ has no member named ‘x86_vendor’
       boot_cpu_data.x86_vendor == X86_VENDOR_CYRIX) &&
                    ^
drivers/mtd/nand/cs553x_nand.c:272:35: error: ‘X86_VENDOR_CYRIX’ undeclared (first use in this function)
       boot_cpu_data.x86_vendor == X86_VENDOR_CYRIX) &&
                                   ^
drivers/mtd/nand/cs553x_nand.c:273:19: error: ‘struct cpuinfo_um’ has no member named ‘x86’
      boot_cpu_data.x86 == 5 &&
                   ^
drivers/mtd/nand/cs553x_nand.c:274:19: error: ‘struct cpuinfo_um’ has no member named ‘x86_model’
      boot_cpu_data.x86_model == 5)

Maybe a "depends on X86_32 && !UML" would make more sense. hmm?

Thanks,
//richard

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 11/22] mtd: Fix dependencies for !HAS_IOMEM archs
  2016-01-26 11:00   ` Geert Uytterhoeven
@ 2016-01-26 19:31     ` Brian Norris
  0 siblings, 0 replies; 7+ messages in thread
From: Brian Norris @ 2016-01-26 19:31 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Richard Weinberger, linux-kernel@vger.kernel.org, uml-devel,
	David Woodhouse, Geert Uytterhoeven, Bill Pringlemeir,
	Stefan Agner, Kevin Hao, Masahiro Yamada, Alex Smith,
	Andy Shevchenko, Zhou Wang, Anup Patel, Han xu, Joachim Eastwood,
	Ezequiel Garcia, Bayi Cheng, Fabio Estevam, MTD Maling List

On Tue, Jan 26, 2016 at 12:00:37PM +0100, Geert Uytterhoeven wrote:
> On Mon, Jan 25, 2016 at 11:24 PM, Richard Weinberger <richard@nod.at> wrote:
> > Not every arch has io memory.
> > So, unbreak the build by fixing the dependencies.
> >
> > Signed-off-by: Richard Weinberger <richard@nod.at>
> 
> Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>

Applied this one to l2-mtd.git

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 21/22] mtd: cs553x: Fix dependencies for !HAS_IOMEM archs
  2016-01-26 13:58     ` Richard Weinberger
@ 2016-02-01 17:38       ` Brian Norris
  0 siblings, 0 replies; 7+ messages in thread
From: Brian Norris @ 2016-02-01 17:38 UTC (permalink / raw)
  To: Richard Weinberger
  Cc: Geert Uytterhoeven, linux-kernel@vger.kernel.org, uml-devel,
	David Woodhouse, Geert Uytterhoeven, Bill Pringlemeir,
	Stefan Agner, Alex Smith, Zhou Wang, Andy Shevchenko,
	Masahiro Yamada, Anup Patel, MTD Maling List

On Tue, Jan 26, 2016 at 02:58:19PM +0100, Richard Weinberger wrote:
> Am 26.01.2016 um 12:00 schrieb Geert Uytterhoeven:
> > On Mon, Jan 25, 2016 at 11:24 PM, Richard Weinberger <richard@nod.at> wrote:
> >> Not every arch has io memory nor can this driver ever work
> >> on UML/i386.
> >> So, unbreak the build by fixing the dependencies.
> >>
> >> Signed-off-by: Richard Weinberger <richard@nod.at>
> >> ---
> >>  drivers/mtd/nand/Kconfig | 1 +
> >>  1 file changed, 1 insertion(+)
> >>
> >> diff --git a/drivers/mtd/nand/Kconfig b/drivers/mtd/nand/Kconfig
> >> index 545d82b..b253654 100644
> >> --- a/drivers/mtd/nand/Kconfig
> >> +++ b/drivers/mtd/nand/Kconfig
> >> @@ -311,6 +311,7 @@ config MTD_NAND_CAFE
> >>  config MTD_NAND_CS553X
> >>         tristate "NAND support for CS5535/CS5536 (AMD Geode companion chip)"
> >>         depends on X86_32
> >> +       depends on !UML && HAS_IOMEM
> > 
> > I don't think there's a need for the !UML dependency?
> > Hence just "depends on X86_32 && HAS_IOMEM"?
> 
> Strictly speaking this would work as HAS_IOMEM implies !UML.
> The build error shows that it fails also because UML/i386 is x86_32
> but lacks some x86_32 stuff:
> 

[...]

> 
> Maybe a "depends on X86_32 && !UML" would make more sense. hmm?

That may be slightly clearer, but it's equivalent, so I've applied this
patch as-is.

Thanks,
Brian

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2016-02-01 17:38 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1453760661-1444-1-git-send-email-richard@nod.at>
2016-01-25 22:24 ` [PATCH 11/22] mtd: Fix dependencies for !HAS_IOMEM archs Richard Weinberger
2016-01-26 11:00   ` Geert Uytterhoeven
2016-01-26 19:31     ` Brian Norris
2016-01-25 22:24 ` [PATCH 21/22] mtd: cs553x: " Richard Weinberger
2016-01-26 11:00   ` Geert Uytterhoeven
2016-01-26 13:58     ` Richard Weinberger
2016-02-01 17:38       ` Brian Norris

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).