mtd: maps: remove AMD Élan specific drivers
PATCH 1/3 mtd: maps: remove AMD Élan specific drivers
From: Arnd Bergmann <[email protected]>
There are four MTD maps drivers that are used with AMD Élan SoCs. Since 486-class CPU support was removed in commit 8b793a92d862 ("x86/cpu:
Remove M486/M486SX/ELAN support"), it is no longer possible to actually use these, so just remove the drivers entirely.
--- drivers/mtd/maps/Kconfig | 40 --- drivers/mtd/maps/Makefile | 4 - drivers/mtd/maps/netsc520.c | 127 --------- drivers/mtd/maps/nettel.c | 462 -------------------------------- drivers/mtd/maps/sc520cdp.c | 294 -------------------- drivers/mtd/maps/ts5500_flash.c | 108 -------- 6 files changed, 1035 deletions(-) delete mode 100644 drivers/mtd/maps/netsc520.c delete mode 100644 drivers/mtd/maps/nettel.c delete mode 100644 drivers/mtd/maps/sc520cdp.c delete mode 100644 drivers/mtd/maps/ts5500_flash.c
drivers/mtd/maps/Kconfig +0 -40
@@ -125,40 +125,6 @@ config MTD_SUN_UFLASH Sun Microsystems boardsets. This driver will require CFI support in the kernel, so if you did not enable CFI previously, do that now. -config MTD_SC520CDP - tristate "CFI Flash device mapped on AMD SC520 CDP" - depends on (MELAN || COMPILE_TEST) && MTD_CFI - help - The SC520 CDP board has two banks of CFI-compliant chips and one - Dual-in-line JEDEC chip. This 'mapping' driver supports that - arrangement, implementing three MTD devices. - -config MTD_NETSC520 - tristate "CFI Flash device mapped on AMD NetSc520" - depends on (MELAN || COMPILE_TEST) && MTD_CFI - help - This enables access routines for the flash chips on the AMD NetSc520 - demonstration board. If you have one of these boards and would like - to use the flash chips on it, say 'Y'. - -config MTD_TS5500 - tristate "JEDEC Flash device mapped on Technologic Systems TS-5500" - depends on TS5500 || COMPILE_TEST - select MTD_JEDECPROBE - select MTD_CFI_AMDSTD - help - This provides a driver for the on-board flash of the Technologic - System's TS-5500 board. The 2MB flash is split into 3 partitions - which are accessed as separate MTD devices. - - mtd0 and mtd2 are the two BIOS drives, which use the resident - flash disk (RFD) flash translation layer. - - mtd1 allows you to reprogram your BIOS. BE VERY CAREFUL. - - Note that jumper 3 ("Write Enable Drive A") must be set - otherwise detection won't succeed. - config MTD_SBC_GXX tristate "CFI Flash device mapped on Arcom SBC-GXx boards" depends on X86 && MTD_CFI_INTELEXT && MTD_COMPLEX_MAPPINGS
@@ -238,12 +204,6 @@ config MTD_TSUNAMI help Support for the flash chip on Tsunami TIG bus. -config MTD_NETtel - tristate "CFI flash device on SnapGear/SecureEdge" - depends on X86 && MTD_JEDECPROBE - help - Support for flash chips on NETtel/SecureEdge/SnapGear boards. - config MTD_LANTIQ tristate "Lantiq SoC NOR support" depends on LANTIQ
drivers/mtd/maps/Makefile +0 -4
@@ -26,16 +26,12 @@ obj-$(CONFIG_MTD_PISMO) += pismo.o obj-$(CONFIG_MTD_PCMCIA) += pcmciamtd.o obj-$(CONFIG_MTD_SA1100) += sa1100-flash.o obj-$(CONFIG_MTD_SBC_GXX) += sbc_gxx.o -obj-$(CONFIG_MTD_SC520CDP) += sc520cdp.o -obj-$(CONFIG_MTD_NETSC520) += netsc520.o -obj-$(CONFIG_MTD_TS5500) += ts5500_flash.o 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_UCLINUX) += uclinux.o -obj-$(CONFIG_MTD_NETtel) += nettel.o obj-$(CONFIG_MTD_SCB2_FLASH) += scb2_flash.o obj-$(CONFIG_MTD_PLATRAM) += plat-ram.o obj-$(CONFIG_MTD_VMU) += vmu-flash.o
drivers/mtd/maps/netsc520.c deleted +0 -127
127 lines not on this page · raw message
drivers/mtd/maps/nettel.c deleted +0 -462
462 lines not on this page · raw message
drivers/mtd/maps/sc520cdp.c deleted +0 -294
294 lines not on this page · raw message
drivers/mtd/maps/ts5500_flash.c deleted +0 -108
108 lines not on this page · raw message
Signature · 1 line
2.39.5
PATCH 2/3 mtd: maps: remove uclinux map driver
From: Arnd Bergmann <[email protected]>
Rather than using platform data or DT properties, the configuration for this mtd map driver used to be passed through the global uclinux_ram_map structure, but the last instance was removed in commit 4ba66a976072 ("arch: remove blackfin port") in 2018.
After commit 251f26c9e828 ("mtd: maps: Make uclinux_ram_map static"), it became impossible to configure it at all, even with out-of-tree platform code.
Clearly nobody is using it, so remove it.
--- drivers/mtd/maps/Kconfig | 6 -- drivers/mtd/maps/Makefile | 1 - drivers/mtd/maps/uclinux.c | 118 ------------------------------------- 3 files changed, 125 deletions(-) delete mode 100644 drivers/mtd/maps/uclinux.c
drivers/mtd/maps/Kconfig +0 -6
@@ -284,12 +284,6 @@ config MTD_PCMCIA_ANONYMOUS If unsure, say N. -config MTD_UCLINUX - bool "Generic uClinux RAM/ROM filesystem support" - depends on (MTD_RAM=y || MTD_ROM=y) && (!MMU || COLDFIRE) - help - Map driver to support image based filesystems for uClinux. - config MTD_PLATRAM tristate "Map driver for platform device RAM (mtd-ram)" select MTD_RAM
drivers/mtd/maps/Makefile +0 -1
@@ -31,7 +31,6 @@ 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_UCLINUX) += uclinux.o obj-$(CONFIG_MTD_SCB2_FLASH) += scb2_flash.o obj-$(CONFIG_MTD_PLATRAM) += plat-ram.o obj-$(CONFIG_MTD_VMU) += vmu-flash.o
drivers/mtd/maps/uclinux.c deleted +0 -118
118 lines not on this page · raw message
Signature · 1 line
2.39.5
Re: [PATCH 2/3] mtd: maps: remove uclinux map driver
Hi Arnd,
Quoted 7 lines · Arnd Bergmann
From: Arnd Bergmann <[email protected]>
Rather than using platform data or DT properties, the configuration for this mtd map driver used to be passed through the global
uclinux_ram_mapstructure, but the last instance was removed in commit4ba66a976072("arch: remove blackfin port") in 2018.
Quoted 5 lines
After commit
251f26c9e828("mtd: maps: Makeuclinux_ram_mapstatic"), it became impossible to configure it at all, even with out-of-tree platform code.Clearly nobody is using it, so remove it.
It is used on some ColdFire platforms, and was working all the way up to being removed in the current merge window.
The ColdFire platform startup code (arch/m68k/coldfire/head.S) has a somewhat unusual setup that can copy an attached filesystem blob to _bss_stop, and this is one of the places the uclinux.c map driver can use as the filesystem memory address. From uclinux.c
static int __init uclinux_mtd_init(void)
{
struct mtd_info *mtd;
struct map_info *mapp;
mapp = &uclinux_ram_map;
if (physaddr == -1)
mapp->phys = (resource_size_t)__bss_stop;
else
mapp->phys = physaddr;No out of tree code is required. Most of the ColdFire defconfigs have CONFIG_MTD_UCLINUX enabled, since it is commonly used.
Can we get this reverted?
Regards
Greg
Quoted 151 lines
Signed-off-by Arnd Bergmann <[email protected]>--- drivers/mtd/maps/Kconfig | 6 -- drivers/mtd/maps/Makefile | 1 - drivers/mtd/maps/uclinux.c | 118 ------------------------------------- 3 files changed, 125 deletions(-)delete mode 100644
drivers/mtd/maps/uclinux.cdrivers/mtd/maps/Kconfig +0
-6@@ -284,12 +284,6 @@ config MTD_PCMCIA_ANONYMOUS If unsure, say N. -config MTD_UCLINUX - bool "Generic uClinux RAM/ROM filesystem support" - depends on (MTD_RAM=y || MTD_ROM=y) && (!MMU || COLDFIRE) - help - Map driver to support image based filesystems for uClinux. - config MTD_PLATRAM tristate "Map driver for platform device RAM (mtd-ram)" select MTD_RAMdrivers/mtd/maps/Makefile +0
-1@@ -31,7 +31,6 @@ 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_UCLINUX) += uclinux.o obj-$(CONFIG_MTD_SCB2_FLASH) += scb2_flash.o obj-$(CONFIG_MTD_PLATRAM) += plat-ram.o obj-$(CONFIG_MTD_VMU) += vmu-flash.odrivers/mtd/maps/uclinux.c deleted +0
-108@@ -1,118 +0,0 @@ -/****************************************************************************/ - -/* -* uclinux.c -- generic memory mapped MTD driver for uclinux -* -* (C) Copyright 2002, Greg Ungerer ([email protected]) -* -* License: GPL -*/ - -/****************************************************************************/ - -#include <linux/moduleparam.h> -#include <linux/types.h> -#include <linux/init.h> -#include <linux/kernel.h> -#include <linux/fs.h> -#include <linux/mm.h> -#include <linux/major.h> -#include <linux/mtd/mtd.h> -#include <linux/mtd/map.h> -#include <linux/mtd/partitions.h> -#include <asm/io.h> -#include <asm/sections.h> - -/****************************************************************************/ - -#ifdef CONFIG_MTD_ROM -#define MAP_NAME "rom" -#else -#define MAP_NAME "ram" -#endif - -static struct map_info uclinux_ram_map = { - .name =MAP_NAME , - .size =0 , -}; - -static unsigned long physaddr =-1 ; -module_param (physaddr, ulong,S_IRUGO ); - -static struct mtd_info *uclinux_ram_mtdinfo; - -/****************************************************************************/ - -static const struct mtd_partition uclinux_romfs[] = { - { .name ="ROMfs" } -}; - -#define NUM_PARTITIONS ARRAY_SIZE(uclinux_romfs) - -/****************************************************************************/ - -static int uclinux_point (struct mtd_info *mtd,loff_t from,size_t len, -size_t *retlen,void **virt,resource_size_t *phys) -{ -struct map_info *map = mtd->priv; - *virt = map->virt + from; -if (phys) - *phys = map->phys + from; - *retlen = len; -return (0 ); -} - -/****************************************************************************/ - -static int __init uclinux_mtd_init (void ) -{ -struct mtd_info *mtd; -struct map_info *mapp; - - mapp = &uclinux_ram_map; - -if (physaddr ==-1 ) - mapp->phys = (resource_size_t )__bss_stop; -else - mapp->phys = physaddr; - -if (!mapp->size) - mapp->size =PAGE_ALIGN (ntohl (*((unsigned long *)(mapp->phys +8 )))); - mapp->bankwidth =4 ; - -printk ("uclinux[mtd]: probe address=0x%x size=0x%x\n" , - (int ) mapp->phys, (int ) mapp->size); - -/* -* The filesystem is guaranteed to be in direct mapped memory. It is -* directly following the kernels own bss region. Following the same -* mechanism used by architectures setting up traditional initrds we -* use phys_to_virt to get the virtual address of its start. -*/ - mapp->virt =phys_to_virt (mapp->phys); - -if (mapp->virt ==0 ) { -printk ("uclinux[mtd]: no virtual mapping?\n" ); -return (-EIO ); - } - -simple_map_init (mapp); - - mtd =do_map_probe ("map_" MAP_NAME , mapp); -if (!mtd) { -printk ("uclinux[mtd]: failed to find a mapping?\n" ); -return (-ENXIO ); - } - - mtd->owner =THIS_MODULE ; - mtd->_point = uclinux_point;
drivers/mtd/maps/uclinux.c line 118
Quoted 10 lines
drivers/mtd/maps/uclinux.c deleted +0
-10- mtd->priv = mapp; - - uclinux_ram_mtdinfo = mtd; -mtd_device_register (mtd, uclinux_romfs,NUM_PARTITIONS ); - -return (0 ); -} -device_initcall (uclinux_mtd_init); - -/****************************************************************************/
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
Re: [PATCH 2/3] mtd: maps: remove uclinux map driver
Quoted 22 lines · Greg Ungerer
On 26/5/26 20:32, Arnd Bergmann wrote:
It is used on some ColdFire platforms, and was working all the way up to being removed in the current merge window.
The ColdFire platform startup code (
arch/m68k/coldfire/head.S) has a somewhat unusual setup that can copy an attached filesystem blob to_bss_stop, and this is one of the places theuclinux.cmap driver can use as the filesystem memory address. Fromuclinux.cstatic int __init uclinux_mtd_init(void) { struct mtd_info *mtd; struct map_info *mapp; mapp = &uclinux_ram_map; if (physaddr == -1) mapp->phys = (resource_size_t)__bss_stop; else mapp->phys = physaddr;
Quoted 2 lines
No out of tree code is required. Most of the ColdFire defconfigs have
CONFIG_MTD_UCLINUXenabled, since it is commonly used.
I see, this is surprising from reading the source and git history, but I can see exactly how it got there.
So this is not actually a device but rather a replacement for CONFIG_BLK_DEV_INITRD that does can work with CONFIG_BLOCK=y, right?
Quoted 1 line
Can we get this reverted?
Yes, of course. Miquel/Richard/Vignesh, should I send a revert or can you just apply one with Greg's explanation and my Ack?
Arnd
Re: [PATCH 2/3] mtd: maps: remove uclinux map driver
Hi Arnd,
Quoted 23 lines · Arnd Bergmann
Quoted 22 lines · Greg Ungerer
On 26/5/26 20:32, Arnd Bergmann wrote:
It is used on some ColdFire platforms, and was working all the way up to being removed in the current merge window.
The ColdFire platform startup code (
arch/m68k/coldfire/head.S) has a somewhat unusual setup that can copy an attached filesystem blob to_bss_stop, and this is one of the places theuclinux.cmap driver can use as the filesystem memory address. Fromuclinux.cstatic int __init uclinux_mtd_init(void) { struct mtd_info *mtd; struct map_info *mapp; mapp = &uclinux_ram_map; if (physaddr == -1) mapp->phys = (resource_size_t)__bss_stop; else mapp->phys = physaddr;
Quoted 5 lines
Quoted 2 lines
No out of tree code is required. Most of the ColdFire defconfigs have
CONFIG_MTD_UCLINUXenabled, since it is commonly used.I see, this is surprising from reading the source and git history, but I can see exactly how it got there.
The early, and probably more interesting history, predates git. It has always "just worked" on ColdFire platforms, so it really hasn't needed alot of change over the years for this use case.
Quoted 3 lines
So this is not actually a device but rather a replacement for
CONFIG_BLK_DEV_INITRDthat does can work withCONFIG_BLOCK=y, right?
Yes, that is true. Typical use means adding "root=/dev/mtdblock0" to kernel boot arguments.
Quoted 4 lines
Quoted 1 line
Can we get this reverted?
Yes, of course. Miquel/Richard/Vignesh, should I send a revert or can you just apply one with Greg's explanation and my Ack?
Thanks
Greg
Re: [PATCH 2/3] mtd: maps: remove uclinux map driver
Quoted 3 lines · Greg Ungerer
Quoted 2 lines · Arnd Bergmann
Quoted 1 line · Greg Ungerer
On 26/5/26 20:32, Arnd Bergmann wrote:
...
Quoted 9 lines
Quoted 5 lines
Quoted 2 lines
No out of tree code is required. Most of the ColdFire defconfigs have
CONFIG_MTD_UCLINUXenabled, since it is commonly used.I see, this is surprising from reading the source and git history, but I can see exactly how it got there.
The early, and probably more interesting history, predates git. It has always "just worked" on ColdFire platforms, so it really hasn't needed alot of change over the years for this use case.
If connect history.git and use git replace, one can get a history till to the very begin of Linux kernel (yeah, some as tags and patch bombs, but...).
Signature · 2 lines
With Best Regards, Andy Shevchenko
Miquel Raynal
maintainerRe: [PATCH 2/3] mtd: maps: remove uclinux map driver
In reply to Arnd BergmannHello Arnd,
Quoted 6 lines
Quoted 2 lines
No out of tree code is required. Most of the ColdFire defconfigs have
CONFIG_MTD_UCLINUXenabled, since it is commonly used.I see, this is surprising from reading the source and git history, but I can see exactly how it got there.
Quoted 8 lines
So this is not actually a device but rather a replacement for
CONFIG_BLK_DEV_INITRDthat does can work withCONFIG_BLOCK=y, right?Quoted 1 line
Can we get this reverted?
Yes, of course. Miquel/Richard/Vignesh, should I send a revert or can you just apply one with Greg's explanation and my Ack?
I'll try to come up with something next week :-)
Thanks,
Miquèl
Miquel Raynal
maintainerRe: [PATCH 2/3] mtd: maps: remove uclinux map driver
In reply to Arnd BergmannHello,
Quoted 6 lines
Quoted 1 line
Can we get this reverted?
Yes, of course. Miquel/Richard/Vignesh, should I send a revert or can you just apply one with Greg's explanation and my Ack?
Arnd
Just sent a revert, I hope I got it all right.
Cheers,
Miquèl
Re: [PATCH 2/3] mtd: maps: remove uclinux map driver
Quoted 7 lines · Miquel Raynal
Hello,
Quoted 5 lines
Quoted 1 line
Can we get this reverted?
Yes, of course. Miquel/Richard/Vignesh, should I send a revert or can you just apply one with Greg's explanation and my Ack?
Quoted 6 lines
Quoted 1 line
Arnd
Just sent a revert, I hope I got it all right.
Link:
https://lore.kernel.org/linux-mtd/[email protected]/T/#u
Looks good to me, thanks!
Arnd
PATCH 3/3 mtd: maps: remove obsolete impa7 map driver
In reply to Arnd BergmannFrom: Arnd Bergmann <[email protected]>
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.
--- 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
drivers/mtd/maps/Kconfig +0 -7
@@ -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"
drivers/mtd/maps/Makefile +0 -1
@@ -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
drivers/mtd/maps/impa7.c deleted +0 -115
115 lines not on this page · raw message
Signature · 1 line
2.39.5
Miquel Raynal
maintainerHi Arnd,
Quoted 6 lines · Arnd Bergmann
From: Arnd Bergmann <[email protected]>
There are four MTD maps drivers that are used with AMD Élan SoCs. Since 486-class CPU support was removed in commit
8b793a92d862("x86/cpu:
Remove M486/M486SX/ELAN support"), it is no longer possible to actually use these, so just remove the drivers entirely.
There were pending patches in my queue removing these, except nettel.c.
I fixed up this commit while applying and adapted it this way:
Author: Arnd Bergmann <[email protected]>
Date: Tue May 26 12:32:04 2026 +0200
mtd: maps: remove AMD Élan specific drivers
There were four MTD maps drivers that were used with AMD Élan SoCs. Since 486-class CPU support was removed in commit 8b793a92d862 ("x86/cpu:
Remove M486/M486SX/ELAN support"), it is no longer possible to actually use these. Three of them have already been removed, so remove the remaining driver entirely.
drivers/mtd/maps/Kconfig | 6 ---
drivers/mtd/maps/Makefile | 1 -
drivers/mtd/maps/nettel.c | 462 --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 3 files changed, 469 deletions(-)
Is it okay for you?
Thanks,
Miquèl
Quoted 5 lines · Miquel Raynal
On 26/05/2026 at 12:32:04 +02, Arnd Bergmann <[email protected]> wrote:
3 files changed, 469 deletions(-)Is it okay for you?
Looks good to me, thanks a lot for rebasing the patch.
Arnd
Miquel Raynal
maintainerHi Arnd,
Quoted 8 lines · Arnd Bergmann
Quoted 5 lines · Miquel Raynal
On 26/05/2026 at 12:32:04 +02, Arnd Bergmann <[email protected]> wrote:
3 files changed, 469 deletions(-)Is it okay for you?
Looks good to me, thanks a lot for rebasing the patch.
No problem :), now pushed to linux-mtd branch mtd/next.
Thanks,
Miquèl