From 56ff337ea433731fa5f04cf9901404705bbbb6e0 Mon Sep 17 00:00:00 2001 From: Linus Walleij Date: Sat, 28 Jan 2017 22:50:48 +0100 Subject: mtd: physmap_of: add a hook for Gemini flash probing In order to support device tree probing of Gemini NOR flash chips, a certain register in the syscon needs to be poked to enable parallel flash mode. Such things used to happen in "necessarily different" board file code, and this indeed was also done for the Gemini, so the MTD driver could treat it as any memory-mapped NOR flash, but this is not the way in the future: board files need to go, and hardware concerns distributed down to the applicable drivers. This adds a hook in the same way that the Versatile did: if the Kconfig symbol is not selected the net total of supporting Gemini should be zero bytes of added code. To live up to this promise, also the return value error print from the Versatile extra probe call get to be removed in this patch, all printing need to happen in the add-ons. Cc: Janos Laube Cc: Paulius Zaleckas Cc: Hans Ulli Kroll Cc: Florian Fainelli Signed-off-by: Linus Walleij Acked-by: Marek Vasut Signed-off-by: Brian Norris --- drivers/mtd/maps/Kconfig | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'drivers/mtd/maps/Kconfig') diff --git a/drivers/mtd/maps/Kconfig b/drivers/mtd/maps/Kconfig index 5bcc896a48c3..542fdf8e81fa 100644 --- a/drivers/mtd/maps/Kconfig +++ b/drivers/mtd/maps/Kconfig @@ -75,7 +75,7 @@ config MTD_PHYSMAP_OF taken from OF device tree. config MTD_PHYSMAP_OF_VERSATILE - bool "Support ARM Versatile physmap OF" + bool "ARM Versatile OF-based physical memory map handling" depends on MTD_PHYSMAP_OF depends on MFD_SYSCON default y if (ARCH_INTEGRATOR || ARCH_VERSATILE || ARCH_REALVIEW) @@ -84,6 +84,16 @@ config MTD_PHYSMAP_OF_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 + depends on MFD_SYSCON + 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. + config MTD_PMC_MSP_EVM tristate "CFI Flash device mapped on PMC-Sierra MSP" depends on PMC_MSP && MTD_CFI -- cgit v1.2.3