[PATCH] mtd: physmap_of: fixup gemini/versatile dependencies

Linus Walleij linus.walleij at linaro.org
Fri Feb 10 04:19:15 PST 2017


On Thu, Feb 9, 2017 at 3:09 AM, Brian Norris
<computersforpeace at gmail.com> wrote:

> physmap_of sort of depends on the gemini and versatile modules (when
> they're enabled), but this isn't expressed in Kconfig. Let's just merge
> the modules all together, when enabled. Then we can avoid exporting a
> few symbols, and the versatile and gemini code can now be modular again
> (the below commit accidentally made them built-in only).
>
> Resolves errors like this:
>
> ERROR: "of_flash_probe_versatile" [drivers/mtd/maps/physmap_of.ko] undefined!
> ERROR: "of_flash_probe_gemini" [drivers/mtd/maps/physmap_of.ko] undefined!
>
> Fixes: 56ff337ea433 ("mtd: physmap_of: add a hook for Gemini flash probing")
> Cc: Linus Walleij <linus.walleij at linaro.org>
> Signed-off-by: Brian Norris <computersforpeace at gmail.com>

Reviewed-by: Linus Walleij <linus.walleij at linaro.org>

Sorry for not responding quicker.

I hacked up this not entirely optimal solution to the same problem
but I think what you're doing is better:

 config MTD_PHYSMAP_OF_VERSATILE
-       bool "Support ARM Versatile physmap OF"
-       depends on MTD_PHYSMAP_OF
-       depends on MFD_SYSCON
+       bool "ARM Versatile OF-based physical memory map handling"
+       depends on MTD_PHYSMAP_OF=y
+       depends on MFD_SYSCON=y
        default y if (ARCH_INTEGRATOR || ARCH_VERSATILE || ARCH_REALVIEW)
        help
          This provides some extra DT physmap parsing for the ARM Versatile
          platforms, basically to add a VPP (write protection) callback so
          the flash can be taken out of write protection.

+config MTD_PHYSMAP_OF_GEMINI
+       bool "Cortina Gemini OF-based physical memory map handling"
+       depends on MTD_PHYSMAP_OF=y
+       depends on MFD_SYSCON=y
+       default ARCH_GEMINI
+       help
+         This provides some extra DT physmap parsing for the Gemini
+         platforms, some detection and setting up parallel mode on the
+         external interface.

I.e. I made the modules be only accessible when compiled-in.

Either solution is fine with me, but someone else might be annoyed
by my solution so let's go with yours.

And by the way: thanks for merging this!

Yours,
Linus Walleij



More information about the linux-mtd mailing list