public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* [RFC/PATCH 8/8] LPDDR extended physmap driver to support LPDDR flash.
@ 2008-10-08 21:39 Alexey Korolev
  2008-10-14 10:20 ` David Woodhouse
  0 siblings, 1 reply; 19+ messages in thread
From: Alexey Korolev @ 2008-10-08 21:39 UTC (permalink / raw)
  To: linux-mtd; +Cc: nico, dwmw2

Physmap is generic map driver for different platforms and flash types.
We added support of LPDDR to physmap.
All changes here are related to introduction of new pfow_base parameter.
This parameter is valid in case of LPDDR chips only.

Signed-off-by: Alexey Korolev <akorolev@infradead.org>
---

diff --git a/drivers/mtd/maps/Kconfig b/drivers/mtd/maps/Kconfig
index 5ea1693..84522fb 100644
--- a/drivers/mtd/maps/Kconfig
+++ b/drivers/mtd/maps/Kconfig
@@ -10,8 +10,8 @@ config MTD_COMPLEX_MAPPINGS
 	  paged mappings of flash chips.
 
 config MTD_PHYSMAP
-	tristate "CFI Flash device in physical memory map"
-	depends on MTD_CFI || MTD_JEDECPROBE || MTD_ROM
+	tristate "Flash device in physical memory map"
+	depends on MTD_CFI || MTD_JEDECPROBE || MTD_ROM || MTD_LPDDR
 	help
 	  This provides a 'mapping' driver which allows the NOR Flash and
 	  ROM driver code to communicate with chips which are mapped
@@ -61,6 +61,16 @@ config MTD_PHYSMAP_BANKWIDTH
 	  Ignore this option if you use run-time physmap configuration
 	  (i.e., run-time calling physmap_configure()).
 
+config MTD_PHYSMAP_PFOWBASE
+	hex "PFOW base address for LPDDR chips"
+	depends on MTD_PHYSMAP && MTD_LPDDR
+	default "0x00000000"
+	help
+	  This is the offset of PFOW window within address space of LPDDR flash 
+	  device. Refer to BSP documentation to get PFOW window base offset. 
+	  Ignore this option if you use run-time physmap configuration
+	  (i.e., run-time calling physmap_configure()).
+
 config MTD_PHYSMAP_OF
 	tristate "Flash device in physical memory map based on OF description"
 	depends on PPC_OF && (MTD_CFI || MTD_JEDECPROBE || MTD_ROM)
diff --git a/drivers/mtd/maps/physmap.c b/drivers/mtd/maps/physmap.c
index 42d844f..c2e1cb8 100644
--- a/drivers/mtd/maps/physmap.c
+++ b/drivers/mtd/maps/physmap.c
@@ -83,7 +83,12 @@ static int physmap_flash_remove(struct platform_device *dev)
 	return 0;
 }
 
-static const char *rom_probe_types[] = { "cfi_probe", "jedec_probe", "map_rom", NULL };
+static const char *rom_probe_types[] = {
+					"cfi_probe",
+					"jedec_probe",
+					"qinfo_probe",
+					"map_rom",
+					NULL };
 #ifdef CONFIG_MTD_PARTITIONS
 static const char *part_probe_types[] = { "cmdlinepart", "RedBoot", NULL };
 #endif
@@ -128,6 +133,7 @@ static int physmap_flash_probe(struct platform_device *dev)
 		info->map[i].size = dev->resource[i].end - dev->resource[i].start + 1;
 		info->map[i].bankwidth = physmap_data->width;
 		info->map[i].set_vpp = physmap_data->set_vpp;
+		info->map[i].pfow_base = physmap_data->pfow_base;
 
 		info->map[i].virt = ioremap(info->map[i].phys, info->map[i].size);
 		if (info->map[i].virt == NULL) {
@@ -269,6 +275,9 @@ static struct platform_driver physmap_flash_driver = {
 #ifdef PHYSMAP_COMPAT
 static struct physmap_flash_data physmap_flash_data = {
 	.width		= CONFIG_MTD_PHYSMAP_BANKWIDTH,
+#ifdef CONFIG_MTD_PHYSMAP_PFOWBASE
+	.pfow_base	= CONFIG_MTD_PHYSMAP_PFOWBASE,
+#endif
 };
 
 static struct resource physmap_flash_resource = {
diff --git a/include/linux/mtd/physmap.h b/include/linux/mtd/physmap.h
index c8e63a5..76f7cab 100644
--- a/include/linux/mtd/physmap.h
+++ b/include/linux/mtd/physmap.h
@@ -24,6 +24,7 @@ struct physmap_flash_data {
 	unsigned int		width;
 	void			(*set_vpp)(struct map_info *, int);
 	unsigned int		nr_parts;
+	unsigned int		pfow_base;
 	struct mtd_partition	*parts;
 };
 

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

end of thread, other threads:[~2008-10-19  1:39 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-08 21:39 [RFC/PATCH 8/8] LPDDR extended physmap driver to support LPDDR flash Alexey Korolev
2008-10-14 10:20 ` David Woodhouse
2008-10-14 13:10   ` Alexey Korolev
2008-10-17  0:30   ` Jared Hulbert
2008-10-17  1:06     ` Lennert Buytenhek
2008-10-17 17:27       ` Jared Hulbert
2008-10-17 17:43         ` Alexey Korolev
2008-10-17 17:58           ` Jared Hulbert
2008-10-17 17:59             ` David Woodhouse
2008-10-17 18:03               ` Jared Hulbert
2008-10-17 18:06             ` Lennert Buytenhek
2008-10-17 18:12             ` Nicolas Pitre
2008-10-18  2:54               ` Jared Hulbert
2008-10-18 15:46                 ` Lennert Buytenhek
2008-10-18 18:20                   ` Jared Hulbert
2008-10-18 19:59                     ` Nicolas Pitre
2008-10-19  0:47                       ` Jared Hulbert
2008-10-19  1:38                         ` Nicolas Pitre
2008-10-17 18:01         ` Lennert Buytenhek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox