mtd: NOR flash driver for OMAP-L137/AM17x
PATCH v4 1/2 mtd: NOR flash driver for OMAP-L137/AM17x
From: David Griego <[email protected]>
OMAP-L137/AM17x has limited number of dedicated EMIFA address pins, enough to interface directly to an SDRAM. If a device such as an asynchronous flash needs to be attached to the EMIFA, then either GPIO pins or a chip select may be used to control the flash device's upper address lines.
This patch adds support for the NOR flash on the OMAP-L137/ AM17x user interface daughter board using the latch-addr-flash MTD mapping driver which allows flashes to be partially physically addressed. The upper address lines are set by a board specific code which is a separate patch.
---
Since v3:
No modifications in this patch. Reposting, as other patch in this series has been modified.
drivers/mtd/maps/Kconfig | 9 + drivers/mtd/maps/Makefile | 1 + drivers/mtd/maps/latch-addr-flash.c | 272 ++++++++++++++++++++++++++++++++++ include/linux/mtd/latch-addr-flash.h | 29 ++++ 4 files changed, 311 insertions(+), 0 deletions(-) create mode 100644 drivers/mtd/maps/latch-addr-flash.c create mode 100644 include/linux/mtd/latch-addr-flash.h
drivers/mtd/maps/Kconfig +9 -0
@@ -552,4 +552,13 @@ config MTD_PISMO When built as a module, it will be called pismo.ko +config MTD_LATCH_ADDR + tristate "Latch-assisted Flash Chip Support" + depends on MTD_COMPLEX_MAPPINGS + help + Map driver which allows flashes to be partially physically addressed + and have the upper address lines set by a board specific code. + + If compiled as a module, it will be called latch-addr-flash. + endmenu
drivers/mtd/maps/Makefile +1 -0
@@ -59,3 +59,4 @@ obj-$(CONFIG_MTD_RBTX4939) += rbtx4939-flash.o obj-$(CONFIG_MTD_VMU) += vmu-flash.o obj-$(CONFIG_MTD_GPIO_ADDR) += gpio-addr-flash.o obj-$(CONFIG_MTD_BCM963XX) += bcm963xx-flash.o +obj-$(CONFIG_MTD_LATCH_ADDR) += latch-addr-flash.o
drivers/mtd/maps/latch-addr-flash.c new file +272 -0
272 lines not on this page · raw message
include/linux/mtd/latch-addr-flash.h new file +29 -0
@@ -0,0 +1,29 @@ +/* +* Interface for NOR flash driver whose high address lines are latched +* +* Copyright (C) 2008 MontaVista Software, Inc. <[email protected]> +* +* This file is licensed under the terms of the GNU General Public License +* version 2. This program is licensed "as is" without any warranty of any +* kind, whether express or implied. +*/ +#ifndef __LATCH_ADDR_FLASH__ +#define __LATCH_ADDR_FLASH__ + +struct map_info ; +struct mtd_partition ; + +struct latch_addr_flash_data { +unsigned int width; +unsigned int size; + +int (*init)(void *data,int cs); +void (*done)(void *data); +void (*set_window)(unsigned long offset,void *data); +void *data; + +unsigned int nr_parts; +struct mtd_partition *parts; +}; + +#endif
Signature · 1 line
1.5.6
Quoted 15 lines · Savinay Dharmappa
From: David Griego <[email protected]>
OMAP-L137/AM17x has limited number of dedicated EMIFA address pins, enough to interface directly to an SDRAM. If a device such as an asynchronous flash needs to be attached to the EMIFA, then either GPIO pins or a chip select may be used to control the flash device's upper address lines.
This patch adds support for the NOR flash on the OMAP-L137/ AM17x user interface daughter board using the latch-addr-flash MTD mapping driver which allows flashes to be partially physically addressed. The upper address lines are set by a board specific code which is a separate patch.
Quoted 4 lines
Signed-off-by David Griego <[email protected]>Signed-off-by Aleksey Makarov <[email protected]>Signed-off-by Sergei Shtylyov <[email protected]>Signed-off-by Savinay Dharmappa <[email protected]>
Pushed these to l2-mtd-2.6.git, thanks.
Signature · 2 lines
Best Regards, Artem Bityutskiy (Битюцкий Артём)
Hi,
Quoted 15 lines · Artem Bityutskiy
Quoted 14 lines · Savinay Dharmappa
From: David Griego <[email protected]>
OMAP-L137/AM17x has limited number of dedicated EMIFA address pins, enough to interface directly to an SDRAM.
If a device such as an asynchronous flash needs to be attached to the EMIFA, then either GPIO pins or a chip select may be used to control the flash device's upper address lines.This patch adds support for the NOR flash on the OMAP-L137/ AM17x user interface daughter board using the latch-addr-flash MTD mapping driver which allows flashes to be partially physically addressed. The upper address lines are set by a board specific code which is a separate patch.
Quoted 7 lines
Quoted 4 lines
Signed-off-by David Griego <[email protected]>Signed-off-by Aleksey Makarov <[email protected]>Signed-off-by Sergei Shtylyov <[email protected]>Signed-off-by Savinay Dharmappa <[email protected]>Pushed these to l2-mtd-2.6.git, thanks.
I do not see these patches in Linus's tree [1] or at l2-mtd-2.6.git tree [2]. Is there any tree where these patches are available?
[1] git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
[2] git://git.infradead.org/users/dedekind/l2-mtd-2.6.git
Thanks,
Sudhakar
Quoted 23 lines · Sudhakar
Hi,
Quoted 20 lines · Artem Bityutskiy
Quoted 18 lines · Savinay Dharmappa
From: David Griego <[email protected]>
OMAP-L137/AM17x has limited number of dedicated EMIFA address pins, enough to interface directly to an SDRAM.
If a device such as an asynchronous flash needs to be attached to the EMIFA, then either GPIO pins or a chip select may be used to control the flash device's upper address lines.This patch adds support for the NOR flash on the OMAP-L137/ AM17x user interface daughter board using the latch-addr-flash MTD mapping driver which allows flashes to be partially physically addressed. The upper address lines are set by a board specific code which is a separate patch.
Signed-off-by David Griego <[email protected]>Signed-off-by Aleksey Makarov <[email protected]>Signed-off-by Sergei Shtylyov <[email protected]>Signed-off-by Savinay Dharmappa <[email protected]>
Quoted 8 lines
Quoted 2 lines
Pushed these to l2-mtd-2.6.git, thanks.
I do not see these patches in Linus's tree [1] or at l2-mtd-2.6.git tree [2]. Is there any tree where these patches are available?
[1]
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
[2]git://git.infradead.org/users/dedekind/l2-mtd-2.6.git
Hmm, sorry, I do not know how what happened to this patch and where it was lost. I've just re-added it to my tree. Apologies.
Signature · 2 lines
Best Regards, Artem Bityutskiy (Артём Битюцкий)