linux/drivers/mtd/maps
Linus Walleij 9d3b5086f6 mtd: physmap_of_gemini: Handle pin control
This enables the complex mapping for the Gemini and kicks in
custom read/write functions that will wrap the existing
simple functions in calls to enable/disable the parallel
flash pins using pin controls.

This is necessary on some hardware such as the D-Link
DIR-685 where all flash pins are patched in/out at the same
time, but some of the flash pins are in practice unused by
the flash and have anyway been reused as GPIO.

This concerns specifically CE1 on the Gemini. There is only
one flash chip, so only CE0 is used, and the line for CE1
has been reused as chip select for the emulated SPI port
connected to the display. If we try to use the same lines
for flash and GPIO at the same time, one of them will loose:
the GPIO line will disappear because it gets disconnected
from the pin when the flash group is muxed out.

Fix this by introducing two pin control states named simply
"enabled" and "disabled" and only enable the flash lines
when absolutely necessary (during read/write/copy). This
way, they are available for GPIO at all other times and
the display works.

Collect all the state variables in a struct named
struct gemini_flash and allocate this struct at probe
time.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
2018-12-06 16:57:13 +01:00
..
amd76xrom.c mtd: amd76xrom: constify pci_device_id. 2017-08-15 14:00:45 +02:00
cfi_flagadm.c mtd: constify mtd_partition 2017-11-06 23:26:01 +01:00
ck804xrom.c mtd: ck804xrom: constify pci_device_id. 2017-08-15 14:00:46 +02:00
dc21285.c mtd: dc21285: use raw spinlock functions for nw_gpio_lock 2015-05-28 12:01:29 -07:00
esb2rom.c mtd: esb2rom: constify pci_device_id. 2017-08-15 14:00:45 +02:00
ichxrom.c mtd: ichxrom: constify pci_device_id. 2017-08-15 14:00:44 +02:00
impa7.c mtd: maps: use mtd_device_register() where applicable 2018-07-18 16:32:36 +02:00
intel_vr_nor.c mtd: maps: use mtd_device_register() where applicable 2018-07-18 16:32:36 +02:00
ixp4xx.c mtd: maps: ixp4xx: show parent device in sysfs 2015-10-13 12:56:19 -07:00
Kconfig mtd: physmap_of_gemini: Handle pin control 2018-12-06 16:57:13 +01:00
l440gx.c mtd: maps: l440gx: Add reference counter to set_vpp() 2012-03-27 00:52:49 +01:00
lantiq-flash.c mtd: lantiq-flash: drop check of boot select 2017-09-04 13:53:15 +02:00
Makefile mtd: maps: Get rid of the latch-addr-flash driver 2018-11-06 23:33:06 +01:00
map_funcs.c
netsc520.c mtd: constify mtd_partition 2017-11-06 23:26:01 +01:00
nettel.c mtd: constify mtd_partition 2017-11-06 23:26:01 +01:00
pci.c mtd: pci: constify pci_device_id. 2017-08-15 14:00:46 +02:00
pcmciamtd.c drivers/mtd/maps/pcmciamtd.c: __iomem annotations 2016-01-04 10:28:56 -05:00
physmap-core.c mtd: maps: physmap: Leave assigned complex mappings 2018-12-06 16:57:13 +01:00
physmap-gemini.c mtd: physmap_of_gemini: Handle pin control 2018-12-06 16:57:13 +01:00
physmap-gemini.h mtd: maps: Rename physmap_of_{versatile, gemini} into physmap-{versatile, gemini} 2018-11-05 22:24:29 +01:00
physmap-versatile.c mtd: maps: Rename physmap_of_{versatile, gemini} into physmap-{versatile, gemini} 2018-11-05 22:24:29 +01:00
physmap-versatile.h mtd: maps: Rename physmap_of_{versatile, gemini} into physmap-{versatile, gemini} 2018-11-05 22:24:29 +01:00
pismo.c mtd: maps: pismo: Remove owner assignment from i2c_driver 2018-05-03 11:42:31 +02:00
plat-ram.c mtd: plat-ram: Replace manual resource management by devm 2017-11-06 23:26:01 +01:00
pmcmsp-flash.c mtd: pmcmsp: use kstrndup instead of kmalloc+strncpy 2017-02-08 13:15:49 -08:00
pxa2xx-flash.c mtd: pxa2xx-flash: switch back from memremap to ioremap_cached 2016-04-04 10:26:40 +02:00
rbtx4939-flash.c mtd: maps: use mtd_device_register() where applicable 2018-07-18 16:32:36 +02:00
sa1100-flash.c mtd: maps: sa1100-flash: potential NULL dereference 2016-07-15 18:40:25 -07:00
sbc_gxx.c mtd: constify mtd_partition 2017-11-06 23:26:01 +01:00
sc520cdp.c mtd: maps: add missing iounmap() in error path 2016-11-30 18:30:24 -08:00
scb2_flash.c mtd: delete non-required instances of include <linux/init.h> 2014-03-10 22:42:22 -07:00
scx200_docflash.c
solutionengine.c mtd/maps: fix solutionengine.c printk format warnings 2018-07-24 22:43:10 +02:00
sun_uflash.c mtd: Convert to using %pOF instead of full_name 2017-08-15 14:00:43 +02:00
ts5500_flash.c mtd: constify mtd_partition 2017-11-06 23:26:01 +01:00
tsunami_flash.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
uclinux.c mtd: constify mtd_partition 2017-11-06 23:26:01 +01:00
vmu-flash.c treewide: kmalloc() -> kmalloc_array() 2018-06-12 16:19:22 -07:00