Linux-mtd Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@kernel.org>
To: Miquel Raynal <miquel.raynal@bootlin.com>,
	Richard Weinberger <richard@nod.at>,
	Vignesh Raghavendra <vigneshr@ti.com>
Cc: Arnd Bergmann <arnd@arndb.de>,
	Randy Dunlap <rdunlap@infradead.org>,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	linux-kernel@vger.kernel.org, linux-mtd@lists.infradead.org
Subject: [PATCH 3/3] mtd: maps: remove obsolete impa7 map driver
Date: Tue, 26 May 2026 12:32:06 +0200	[thread overview]
Message-ID: <20260526103227.3152003-3-arnd@kernel.org> (raw)
In-Reply-To: <20260526103227.3152003-1-arnd@kernel.org>

From: Arnd Bergmann <arnd@arndb.de>

This driver was originally merged in 2002 for a board using
the Cirrus Logic CL/PS711x platform, but the actual board
file never made it upstream.

The SoC platform is still supported but uses devicetree
based probing, so if anyone ever wanted to upstream board
support, they would just use the regular physmap driver.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/mtd/maps/Kconfig  |   7 ---
 drivers/mtd/maps/Makefile |   1 -
 drivers/mtd/maps/impa7.c  | 115 --------------------------------------
 3 files changed, 123 deletions(-)
 delete mode 100644 drivers/mtd/maps/impa7.c

diff --git a/drivers/mtd/maps/Kconfig b/drivers/mtd/maps/Kconfig
index 1e8f2b518ddd..dce5e67ce3c2 100644
--- a/drivers/mtd/maps/Kconfig
+++ b/drivers/mtd/maps/Kconfig
@@ -249,13 +249,6 @@ config MTD_DC21285
 	  21285 bridge used with Intel's StrongARM processors. More info at
 	  <https://www.intel.com/design/bridge/docs/21285_documentation.htm>.
 
-config MTD_IMPA7
-	tristate "JEDEC Flash device mapped on impA7"
-	depends on ARM && MTD_JEDECPROBE
-	help
-	  This enables access to the NOR Flash on the impA7 board of
-	  implementa GmbH. If you have such a board, say 'Y' here.
-
 # This needs CFI or JEDEC, depending on the cards found.
 config MTD_PCI
 	tristate "PCI MTD driver"
diff --git a/drivers/mtd/maps/Makefile b/drivers/mtd/maps/Makefile
index eff28fc0b60e..fbed278157f6 100644
--- a/drivers/mtd/maps/Makefile
+++ b/drivers/mtd/maps/Makefile
@@ -30,7 +30,6 @@ obj-$(CONFIG_MTD_SUN_UFLASH)	+= sun_uflash.o
 obj-$(CONFIG_MTD_SCx200_DOCFLASH)+= scx200_docflash.o
 obj-$(CONFIG_MTD_SOLUTIONENGINE)+= solutionengine.o
 obj-$(CONFIG_MTD_PCI)		+= pci.o
-obj-$(CONFIG_MTD_IMPA7)		+= impa7.o
 obj-$(CONFIG_MTD_SCB2_FLASH)	+= scb2_flash.o
 obj-$(CONFIG_MTD_PLATRAM)	+= plat-ram.o
 obj-$(CONFIG_MTD_VMU)		+= vmu-flash.o
diff --git a/drivers/mtd/maps/impa7.c b/drivers/mtd/maps/impa7.c
deleted file mode 100644
index b41401852fb7..000000000000
--- a/drivers/mtd/maps/impa7.c
+++ /dev/null
@@ -1,115 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0-only
-/*
- * Handle mapping of the NOR flash on implementa A7 boards
- *
- * Copyright 2002 SYSGO Real-Time Solutions GmbH
- */
-
-#include <linux/module.h>
-#include <linux/types.h>
-#include <linux/kernel.h>
-#include <linux/init.h>
-#include <asm/io.h>
-#include <linux/mtd/mtd.h>
-#include <linux/mtd/map.h>
-#include <linux/mtd/partitions.h>
-
-#define WINDOW_ADDR0 0x00000000      /* physical properties of flash */
-#define WINDOW_SIZE0 0x00800000
-#define WINDOW_ADDR1 0x10000000      /* physical properties of flash */
-#define WINDOW_SIZE1 0x00800000
-#define NUM_FLASHBANKS 2
-#define BUSWIDTH     4
-
-#define MSG_PREFIX "impA7:"   /* prefix for our printk()'s */
-#define MTDID      "impa7-%d"  /* for mtdparts= partitioning */
-
-static struct mtd_info *impa7_mtd[NUM_FLASHBANKS];
-
-static const char * const rom_probe_types[] = { "jedec_probe", NULL };
-
-static struct map_info impa7_map[NUM_FLASHBANKS] = {
-	{
-		.name = "impA7 NOR Flash Bank #0",
-		.size = WINDOW_SIZE0,
-		.bankwidth = BUSWIDTH,
-	},
-	{
-		.name = "impA7 NOR Flash Bank #1",
-		.size = WINDOW_SIZE1,
-		.bankwidth = BUSWIDTH,
-	},
-};
-
-/*
- * MTD partitioning stuff
- */
-static const struct mtd_partition partitions[] =
-{
-	{
-		.name = "FileSystem",
-		.size = 0x800000,
-		.offset = 0x00000000
-	},
-};
-
-static int __init init_impa7(void)
-{
-	const char * const *type;
-	int i;
-	static struct { u_long addr; u_long size; } pt[NUM_FLASHBANKS] = {
-	  { WINDOW_ADDR0, WINDOW_SIZE0 },
-	  { WINDOW_ADDR1, WINDOW_SIZE1 },
-        };
-	int devicesfound = 0;
-
-	for(i=0; i<NUM_FLASHBANKS; i++)
-	{
-		printk(KERN_NOTICE MSG_PREFIX "probing 0x%08lx at 0x%08lx\n",
-		       pt[i].size, pt[i].addr);
-
-		impa7_map[i].phys = pt[i].addr;
-		impa7_map[i].virt = ioremap(pt[i].addr, pt[i].size);
-		if (!impa7_map[i].virt) {
-			printk(MSG_PREFIX "failed to ioremap\n");
-			return -EIO;
-		}
-		simple_map_init(&impa7_map[i]);
-
-		impa7_mtd[i] = NULL;
-		type = rom_probe_types;
-		for(; !impa7_mtd[i] && *type; type++) {
-			impa7_mtd[i] = do_map_probe(*type, &impa7_map[i]);
-		}
-
-		if (impa7_mtd[i]) {
-			impa7_mtd[i]->owner = THIS_MODULE;
-			devicesfound++;
-			mtd_device_register(impa7_mtd[i], partitions,
-					    ARRAY_SIZE(partitions));
-		} else {
-			iounmap((void __iomem *)impa7_map[i].virt);
-		}
-	}
-	return devicesfound == 0 ? -ENXIO : 0;
-}
-
-static void __exit cleanup_impa7(void)
-{
-	int i;
-	for (i=0; i<NUM_FLASHBANKS; i++) {
-		if (impa7_mtd[i]) {
-			mtd_device_unregister(impa7_mtd[i]);
-			map_destroy(impa7_mtd[i]);
-			iounmap((void __iomem *)impa7_map[i].virt);
-			impa7_map[i].virt = NULL;
-		}
-	}
-}
-
-module_init(init_impa7);
-module_exit(cleanup_impa7);
-
-MODULE_LICENSE("GPL");
-MODULE_AUTHOR("Pavel Bartusek <pba@sysgo.de>");
-MODULE_DESCRIPTION("MTD map driver for implementa impA7");
-- 
2.39.5


______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

      parent reply	other threads:[~2026-05-26 10:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-26 10:32 [PATCH 1/3] mtd: maps: remove AMD Élan specific drivers Arnd Bergmann
2026-05-26 10:32 ` [PATCH 2/3] mtd: maps: remove uclinux map driver Arnd Bergmann
2026-05-26 10:32 ` Arnd Bergmann [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260526103227.3152003-3-arnd@kernel.org \
    --to=arnd@kernel.org \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=arnd@arndb.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=miquel.raynal@bootlin.com \
    --cc=rdunlap@infradead.org \
    --cc=richard@nod.at \
    --cc=vigneshr@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox