Received: from mail.onstor.com (66.201.51.107) by exch1.onstor.net
 (10.0.0.225) with Microsoft SMTP Server id 8.1.311.2; Sun, 29 Mar 2009
 03:30:29 -0700
Received: from psmtp.com ([64.18.0.167]) by mail.onstor.com with Microsoft
 SMTPSVC(6.0.3790.3959);	 Sun, 29 Mar 2009 03:30:27 -0700
Received: from source ([213.58.128.207]) by exprod5mx247.postini.com
 ([64.18.4.10]) with SMTP;	Sun, 29 Mar 2009 06:30:27 EDT
Received: from localhost.localdomain ([127.0.0.1]:16792 "EHLO
	ftp.linux-mips.org") by ftp.linux-mips.org with ESMTP	id S20021289AbZC2J2B
 (ORCPT <rfc822;andy.sharp@onstor.com>);	Sun, 29 Mar 2009 10:28:01 +0100
Received: with ECARTIS (v1.0.0; list linux-mips); Sun, 29 Mar 2009 10:27:44
 +0100 (BST)
Received: from fnoeppeil48.netpark.at ([217.175.205.176]:44941 "EHLO
	roarinelk.homelinux.net") by ftp.linux-mips.org with ESMTP	id
 S20032702AbZC2J1D (ORCPT <rfc822;linux-mips@linux-mips.org>);	Sun, 29 Mar
 2009 10:27:03 +0100
Received: (qmail 22293 invoked from network); 29 Mar 2009 11:26:14 +0200
Received: from flagship.roarinelk.net (HELO localhost.localdomain)
 (192.168.0.197)  by 192.168.0.1 with SMTP; 29 Mar 2009 11:26:14 +0200
From: Manuel Lauss <mano@roarinelk.homelinux.net>
To: Linux-MIPS <linux-mips@linux-mips.org>
CC: Manuel Lauss <mano@roarinelk.homelinux.net>, Linux-MTD
	<linux-mtd@lists.infradead.org>
Sender: "linux-mips-bounce@linux-mips.org" <linux-mips-bounce@linux-mips.org>
Date: Sun, 29 Mar 2009 02:27:02 -0700
Subject: [PATCH 3/3] Alchemy: convert to physmap flash
Thread-Topic: [PATCH 3/3] Alchemy: convert to physmap flash
Thread-Index: AcmwWWG0xgaMnbCaTk6YFY8YTigXDA==
Message-ID: <1238318822-4772-4-git-send-email-mano@roarinelk.homelinux.net>
References: <1238318822-4772-1-git-send-email-mano@roarinelk.homelinux.net>
 <1238318822-4772-2-git-send-email-mano@roarinelk.homelinux.net>
 <1238318822-4772-3-git-send-email-mano@roarinelk.homelinux.net>
In-Reply-To: <1238318822-4772-3-git-send-email-mano@roarinelk.homelinux.net>
Accept-Language: en-US
Content-Language: en-US
X-MS-Exchange-Organization-AuthAs: Internal
X-MS-Exchange-Organization-AuthMechanism: 0b
X-MS-Exchange-Organization-AuthSource: exch1.onstor.net
X-MS-Has-Attach:
X-Auto-Response-Suppress: All
X-MS-TNEF-Correlator:
x-originalarrivaltime: 29 Mar 2009 10:30:27.0693 (UTC)
 FILETIME=[60A761D0:01C9B059]
errors-to: linux-mips-bounce@linux-mips.org
x-pstn-levels: (S:99.90000/99.90000 CV:99.9000 FC:95.5390 LC:95.5390
 R:95.9108 P:95.9108 M:97.0282 C:98.6951 )
x-pstn-neptune: 0/0/0.00/0
x-ems-proccessed: 2K3Xl1OQTInXD6xxuA8z3Q==
x-ems-stamp: XfUQt7pE/0HLuNthqlyMOQ==
x-list: linux-mips
x-archive-position: 22165
x-ecartis-version: Ecartis v1.0.0
x-original-sender: mano@roarinelk.homelinux.net
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0

Add physmap-flash support to all Alchemy devboards and get rid of the
alchemy-flash.c MTD map driver.

Cc: Linux-MTD <linux-mtd@lists.infradead.org>
Signed-off-by: Manuel Lauss <mano@roarinelk.homelinux.net>
---
 arch/mips/alchemy/devboards/db1x00/platform.c |   76 +++++++++++
 arch/mips/alchemy/devboards/pb1000/platform.c |   48 +++++++
 arch/mips/alchemy/devboards/pb1100/platform.c |   49 +++++++
 arch/mips/alchemy/devboards/pb1200/platform.c |   53 ++++++++
 arch/mips/alchemy/devboards/pb1500/platform.c |   48 +++++++
 arch/mips/alchemy/devboards/pb1550/platform.c |   48 +++++++
 drivers/mtd/maps/Kconfig                      |    6 -
 drivers/mtd/maps/Makefile                     |    1 -
 drivers/mtd/maps/alchemy-flash.c              |  166 ---------------------=
----
 9 files changed, 322 insertions(+), 173 deletions(-)
 delete mode 100644 drivers/mtd/maps/alchemy-flash.c

diff --git a/arch/mips/alchemy/devboards/db1x00/platform.c b/arch/mips/alch=
emy/devboards/db1x00/platform.c
index a6fb6bd..edb910f 100644
--- a/arch/mips/alchemy/devboards/db1x00/platform.c
+++ b/arch/mips/alchemy/devboards/db1x00/platform.c
@@ -15,9 +15,84 @@
 #include <linux/platform_device.h>
 #include <linux/serial_8250.h>
 #include <linux/init.h>
+#include <linux/mtd/mtd.h>
+#include <linux/mtd/partitions.h>
+#include <linux/mtd/physmap.h>

 #include <asm/mach-au1x00/au1xxx.h>

+#ifdef CONFIG_MIPS_BOSPORUS
+#define BOARD_FLASH_SIZE       0x01000000      /* 16MB */
+#define BOARD_FLASH_WIDTH      2               /* 16-bits */
+#endif
+
+#ifdef CONFIG_MIPS_MIRAGE
+#define BOARD_FLASH_SIZE       0x04000000      /* 64MB */
+#define BOARD_FLASH_WIDTH      4               /* 32-bits */
+#endif
+
+#ifdef CONFIG_MIPS_DB1000
+#define BOARD_FLASH_SIZE       0x02000000      /* 32MB */
+#define BOARD_FLASH_WIDTH      4               /* 32-bits */
+#endif
+
+#ifdef CONFIG_MIPS_DB1500
+#define BOARD_FLASH_SIZE       0x02000000      /* 32MB */
+#define BOARD_FLASH_WIDTH      4               /* 32-bits */
+#endif
+
+#ifdef CONFIG_MIPS_DB1100
+#define BOARD_FLASH_SIZE       0x02000000      /* 32MB */
+#define BOARD_FLASH_WIDTH      4               /* 32-bits */
+#endif
+
+#ifdef CONFIG_MIPS_DB1550
+#define BOARD_FLASH_SIZE       0x08000000      /* 128MB */
+#define BOARD_FLASH_WIDTH      4               /* 32-bits */
+#endif
+
+
+static struct mtd_partition db1x_nor_partitions[] =3D {
+       {
+               .name =3D "User FS",
+               .size =3D BOARD_FLASH_SIZE - 0x00400000,
+               .offset =3D 0x0000000
+       },{
+               .name =3D "YAMON",
+               .size =3D 0x0100000,
+               .offset =3D MTDPART_OFS_APPEND,
+               .mask_flags =3D MTD_WRITEABLE
+       },{
+               .name =3D "raw kernel",
+               .size =3D (0x300000 - 0x40000), /* last 256KB is yamon env =
*/
+               .offset =3D MTDPART_OFS_APPEND,
+        }
+};
+
+static struct physmap_flash_data db1x_nor_data =3D {
+       .width          =3D BOARD_FLASH_WIDTH,
+       .nr_parts       =3D ARRAY_SIZE(db1x_nor_partitions),
+       .parts          =3D &db1x_nor_partitions[0],
+};
+
+static struct resource db1x_nor_res[] =3D {
+       [0] =3D {
+               .start  =3D 0x20000000 - BOARD_FLASH_SIZE,
+               .end    =3D 0x1fffffff,
+               .flags  =3D IORESOURCE_MEM,
+       },
+};
+
+static struct platform_device db1x_nor_device =3D {
+       .name   =3D "physmap-flash",
+       .id     =3D -1,
+       .dev    =3D {
+               .platform_data =3D &db1x_nor_data,
+       },
+       .resource       =3D db1x_nor_res,
+       .num_resources  =3D ARRAY_SIZE(db1x_nor_res),
+};
+
 #define PORT(_base, _irq)                                      \
        {                                                       \
                .iobase         =3D _base,                        \
@@ -153,6 +228,7 @@ static struct platform_device *au1xxx_platform_devices[=
] __initdata =3D {
        &pbdb_smbus_device,
 #endif
        &au1xxx_rtc_device,
+       &db1x_nor_device,
 };

 static int __init au1xxx_platform_init(void)
diff --git a/arch/mips/alchemy/devboards/pb1000/platform.c b/arch/mips/alch=
emy/devboards/pb1000/platform.c
index 9f42f4c..fc51e05 100644
--- a/arch/mips/alchemy/devboards/pb1000/platform.c
+++ b/arch/mips/alchemy/devboards/pb1000/platform.c
@@ -6,9 +6,56 @@
 #include <linux/init.h>
 #include <linux/platform_device.h>
 #include <linux/serial_8250.h>
+#include <linux/mtd/mtd.h>
+#include <linux/mtd/partitions.h>
+#include <linux/mtd/physmap.h>

 #include <asm/mach-au1x00/au1000.h>

+#define PB1000_FLASH_SIZE      0x00800000      /* 8MB */
+#define PB1000_FLASH_WIDTH     4               /* 32-bits */
+
+static struct mtd_partition pb1000_nor_partitions[] =3D {
+       {
+               .name =3D "User FS",
+               .size =3D PB1000_FLASH_SIZE - 0x00400000,
+               .offset =3D 0x0000000
+       },{
+               .name =3D "YAMON",
+               .size =3D 0x0100000,
+               .offset =3D MTDPART_OFS_APPEND,
+               .mask_flags =3D MTD_WRITEABLE
+       },{
+               .name =3D "raw kernel",
+               .size =3D (0x300000 - 0x40000), /* last 256KB is yamon env =
*/
+               .offset =3D MTDPART_OFS_APPEND,
+        }
+};
+
+static struct physmap_flash_data pb1000_nor_data =3D {
+       .width          =3D PB1000_FLASH_WIDTH,
+       .nr_parts       =3D ARRAY_SIZE(pb1000_nor_partitions),
+       .parts          =3D &pb1000_nor_partitions[0],
+};
+
+static struct resource pb1000_nor_res[] =3D {
+       [0] =3D {
+               .start  =3D 0x20000000 - PB1000_FLASH_SIZE,
+               .end    =3D 0x1fffffff,
+               .flags  =3D IORESOURCE_MEM,
+       },
+};
+
+static struct platform_device pb1000_nor_device =3D {
+       .name   =3D "physmap-flash",
+       .id     =3D -1,
+       .dev    =3D {
+               .platform_data =3D &pb1000_nor_data,
+       },
+       .resource       =3D pb1000_nor_res,
+       .num_resources  =3D ARRAY_SIZE(pb1000_nor_res),
+};
+
 #define PORT(_base, _irq)                                      \
        {                                                       \
                .iobase         =3D _base,                        \
@@ -78,6 +125,7 @@ static struct platform_device *pb1000_devices[] =3D {
        &au1xxx_usb_ohci_device,
        &pb1000_pcmcia_device,
        &au1xxx_rtc_device,
+       &pb1000_nor_device,
 };

 static int __init pb1000_platform_init(void)
diff --git a/arch/mips/alchemy/devboards/pb1100/platform.c b/arch/mips/alch=
emy/devboards/pb1100/platform.c
index 42759f9..9616f58 100644
--- a/arch/mips/alchemy/devboards/pb1100/platform.c
+++ b/arch/mips/alchemy/devboards/pb1100/platform.c
@@ -6,9 +6,57 @@
 #include <linux/init.h>
 #include <linux/platform_device.h>
 #include <linux/serial_8250.h>
+#include <linux/mtd/mtd.h>
+#include <linux/mtd/partitions.h>
+#include <linux/mtd/physmap.h>

 #include <asm/mach-au1x00/au1000.h>

+#define PB1100_FLASH_SIZE      0x04000000      /* 64MB */
+#define PB1100_FLASH_WIDTH     4               /* 32-bits */
+
+static struct mtd_partition pb1100_nor_partitions[] =3D {
+       {
+               .name =3D "User FS",
+               .size =3D PB1100_FLASH_SIZE - 0x00400000,
+               .offset =3D 0x0000000
+       },{
+               .name =3D "YAMON",
+               .size =3D 0x0100000,
+               .offset =3D MTDPART_OFS_APPEND,
+               .mask_flags =3D MTD_WRITEABLE
+       },{
+               .name =3D "raw kernel",
+               .size =3D (0x300000 - 0x40000), /* last 256KB is yamon env =
*/
+               .offset =3D MTDPART_OFS_APPEND,
+        }
+};
+
+static struct physmap_flash_data pb1100_nor_data =3D {
+       .width          =3D PB1100_FLASH_WIDTH,
+       .nr_parts       =3D ARRAY_SIZE(pb1100_nor_partitions),
+       .parts          =3D &pb1100_nor_partitions[0],
+};
+
+static struct resource pb1100_nor_res[] =3D {
+       [0] =3D {
+               .start  =3D 0x20000000 - PB1100_FLASH_SIZE,
+               .end    =3D 0x1fffffff,
+               .flags  =3D IORESOURCE_MEM,
+       },
+};
+
+static struct platform_device pb1100_nor_device =3D {
+       .name   =3D "physmap-flash",
+       .id     =3D -1,
+       .dev    =3D {
+               .platform_data =3D &pb1100_nor_data,
+       },
+       .resource       =3D pb1100_nor_res,
+       .num_resources  =3D ARRAY_SIZE(pb1100_nor_res),
+};
+
+
 #define PORT(_base, _irq)                                      \
        {                                                       \
                .iobase         =3D _base,                        \
@@ -104,6 +152,7 @@ static struct platform_device *pb1100_devices[] =3D {
        &pb1100_pcmcia_device,
        &au1100_lcd_device,
        &au1xxx_rtc_device,
+       &pb1100_nor_device,
 };

 static int __init pb1100_platform_init(void)
diff --git a/arch/mips/alchemy/devboards/pb1200/platform.c b/arch/mips/alch=
emy/devboards/pb1200/platform.c
index f32391e..204ae4b 100644
--- a/arch/mips/alchemy/devboards/pb1200/platform.c
+++ b/arch/mips/alchemy/devboards/pb1200/platform.c
@@ -23,13 +23,65 @@
 #include <linux/leds.h>
 #include <linux/platform_device.h>
 #include <linux/serial_8250.h>
+#include <linux/mtd/mtd.h>
+#include <linux/mtd/partitions.h>
+#include <linux/mtd/physmap.h>

 #include <asm/mach-au1x00/au1000.h>
 #include <asm/mach-au1x00/au1xxx.h>
 #include <asm/mach-au1x00/au1100_mmc.h>

+#if defined(CONFIG_MIPS_PB1200)
+#define BOARD_FLASH_SIZE       0x08000000      /* 128MB */
+#elif defined(CONFIG_MIPS_DB1200)
+#define BOARD_FLASH_SIZE       0x04000000      /* 64MB */
+#endif
+
+#define BOARD_FLASH_WIDTH      2               /* 16-bits */
+
 static int mmc_activity;

+static struct mtd_partition pb1200_nor_partitions[] =3D {
+       {
+               .name =3D "User FS",
+               .size =3D BOARD_FLASH_SIZE - 0x00400000,
+               .offset =3D 0x0000000
+       },{
+               .name =3D "YAMON",
+               .size =3D 0x0100000,
+               .offset =3D MTDPART_OFS_APPEND,
+               .mask_flags =3D MTD_WRITEABLE
+       },{
+               .name =3D "raw kernel",
+               .size =3D (0x300000 - 0x40000), /* last 256KB is yamon env =
*/
+               .offset =3D MTDPART_OFS_APPEND,
+        }
+};
+
+static struct physmap_flash_data pb1200_nor_data =3D {
+       .width          =3D BOARD_FLASH_WIDTH,
+       .nr_parts       =3D ARRAY_SIZE(pb1200_nor_partitions),
+       .parts          =3D &pb1200_nor_partitions[0],
+};
+
+static struct resource pb1200_nor_res[] =3D {
+       [0] =3D {
+               .start  =3D 0x20000000 - BOARD_FLASH_SIZE,
+               .end    =3D 0x1fffffff,
+               .flags  =3D IORESOURCE_MEM,
+       },
+};
+
+static struct platform_device pb1200_nor_device =3D {
+       .name   =3D "physmap-flash",
+       .id     =3D -1,
+       .dev    =3D {
+               .platform_data =3D &pb1200_nor_data,
+       },
+       .resource       =3D pb1200_nor_res,
+       .num_resources  =3D ARRAY_SIZE(pb1200_nor_res),
+};
+
 #define PORT(_base, _irq)                                      \
        {                                                       \
                .iobase         =3D _base,                        \
@@ -342,6 +394,7 @@ static struct platform_device *board_platform_devices[]=
 __initdata =3D {
        &au1200_lcd_device,
        &pb1200_smbus_device,
        &au1xxx_rtc_device,
+       &pb1200_nor_device,
 };

 static int __init board_register_devices(void)
diff --git a/arch/mips/alchemy/devboards/pb1500/platform.c b/arch/mips/alch=
emy/devboards/pb1500/platform.c
index affb3e1..723a2ff 100644
--- a/arch/mips/alchemy/devboards/pb1500/platform.c
+++ b/arch/mips/alchemy/devboards/pb1500/platform.c
@@ -6,9 +6,56 @@
 #include <linux/init.h>
 #include <linux/platform_device.h>
 #include <linux/serial_8250.h>
+#include <linux/mtd/mtd.h>
+#include <linux/mtd/partitions.h>
+#include <linux/mtd/physmap.h>

 #include <asm/mach-au1x00/au1000.h>

+#define PB1500_FLASH_SIZE      0x04000000      /* 64MB */
+#define PB1500_FLASH_WIDTH     4               /* 32-bits */
+
+static struct mtd_partition pb1500_nor_partitions[] =3D {
+       {
+               .name =3D "User FS",
+               .size =3D PB1500_FLASH_SIZE - 0x00400000,
+               .offset =3D 0x0000000
+       },{
+               .name =3D "YAMON",
+               .size =3D 0x0100000,
+               .offset =3D MTDPART_OFS_APPEND,
+               .mask_flags =3D MTD_WRITEABLE
+       },{
+               .name =3D "raw kernel",
+               .size =3D (0x300000 - 0x40000), /* last 256KB is yamon env =
*/
+               .offset =3D MTDPART_OFS_APPEND,
+        }
+};
+
+static struct physmap_flash_data pb1500_nor_data =3D {
+       .width          =3D PB1500_FLASH_WIDTH,
+       .nr_parts       =3D ARRAY_SIZE(pb1500_nor_partitions),
+       .parts          =3D &pb1500_nor_partitions[0],
+};
+
+static struct resource pb1500_nor_res[] =3D {
+       [0] =3D {
+               .start  =3D 0x20000000 - PB1500_FLASH_SIZE,
+               .end    =3D 0x1fffffff,
+               .flags  =3D IORESOURCE_MEM,
+       },
+};
+
+static struct platform_device pb1500_nor_device =3D {
+       .name   =3D "physmap-flash",
+       .id     =3D -1,
+       .dev    =3D {
+               .platform_data =3D &pb1500_nor_data,
+       },
+       .resource       =3D pb1500_nor_res,
+       .num_resources  =3D ARRAY_SIZE(pb1500_nor_res),
+};
+
 #define PORT(_base, _irq)                                      \
        {                                                       \
                .iobase         =3D _base,                        \
@@ -76,6 +123,7 @@ static struct platform_device *pb1500_devices[] =3D {
        &au1xxx_usb_ohci_device,
        &pb1500_pcmcia_device,
        &au1xxx_rtc_device,
+       &pb1500_nor_device,
 };

 static int __init pb1500_platform_init(void)
diff --git a/arch/mips/alchemy/devboards/pb1550/platform.c b/arch/mips/alch=
emy/devboards/pb1550/platform.c
index 717ff02..3548207 100644
--- a/arch/mips/alchemy/devboards/pb1550/platform.c
+++ b/arch/mips/alchemy/devboards/pb1550/platform.c
@@ -6,10 +6,57 @@
 #include <linux/init.h>
 #include <linux/platform_device.h>
 #include <linux/serial_8250.h>
+#include <linux/mtd/mtd.h>
+#include <linux/mtd/partitions.h>
+#include <linux/mtd/physmap.h>

 #include <asm/mach-au1x00/au1000.h>
 #include <asm/mach-pb1x00/pb1550.h>

+#define PB1550_FLASH_SIZE      0x08000000      /* 128MB */
+#define PB1550_FLASH_WIDTH     4               /* 32-bits */
+
+static struct mtd_partition pb1550_nor_partitions[] =3D {
+       {
+               .name =3D "User FS",
+               .size =3D PB1550_FLASH_SIZE - 0x00400000,
+               .offset =3D 0x0000000
+       },{
+               .name =3D "YAMON",
+               .size =3D 0x0100000,
+               .offset =3D MTDPART_OFS_APPEND,
+               .mask_flags =3D MTD_WRITEABLE
+       },{
+               .name =3D "raw kernel",
+               .size =3D (0x300000 - 0x40000), /* last 256KB is yamon env =
*/
+               .offset =3D MTDPART_OFS_APPEND,
+        }
+};
+
+static struct physmap_flash_data pb1550_nor_data =3D {
+       .width          =3D PB1550_FLASH_WIDTH,
+       .nr_parts       =3D ARRAY_SIZE(pb1550_nor_partitions),
+       .parts          =3D &pb1550_nor_partitions[0],
+};
+
+static struct resource pb1550_nor_res[] =3D {
+       [0] =3D {
+               .start  =3D 0x20000000 - PB1550_FLASH_SIZE,
+               .end    =3D 0x1fffffff,
+               .flags  =3D IORESOURCE_MEM,
+       },
+};
+
+static struct platform_device pb1550_nor_device =3D {
+       .name   =3D "physmap-flash",
+       .id     =3D -1,
+       .dev    =3D {
+               .platform_data =3D &pb1550_nor_data,
+       },
+       .resource       =3D pb1550_nor_res,
+       .num_resources  =3D ARRAY_SIZE(pb1550_nor_res),
+};
+
 #define PORT(_base, _irq)                                      \
        {                                                       \
                .iobase         =3D _base,                        \
@@ -94,6 +141,7 @@ static struct platform_device *pb1550_devices[] =3D {
        &pb1550_pcmcia_device,
        &pb1550_smbus_device,
        &au1xxx_rtc_device,
+       &pb1550_nor_device,
 };

 static int __init pb1550_platform_init(void)
diff --git a/drivers/mtd/maps/Kconfig b/drivers/mtd/maps/Kconfig
index 729f899..36616fd 100644
--- a/drivers/mtd/maps/Kconfig
+++ b/drivers/mtd/maps/Kconfig
@@ -262,12 +262,6 @@ config MTD_NETtel
        help
          Support for flash chips on NETtel/SecureEdge/SnapGear boards.

-config MTD_ALCHEMY
-       tristate "AMD Alchemy Pb1xxx/Db1xxx/RDK MTD support"
-       depends on SOC_AU1X00 && MTD_PARTITIONS && MTD_CFI
-       help
-         Flash memory access on AMD Alchemy Pb/Db/RDK Reference Boards
-
 config MTD_DILNETPC
        tristate "CFI Flash device mapped on DIL/Net PC"
        depends on X86 && MTD_CONCAT && MTD_PARTITIONS && MTD_CFI_INTELEXT
diff --git a/drivers/mtd/maps/Makefile b/drivers/mtd/maps/Makefile
index 26b28a7..9f3d342 100644
--- a/drivers/mtd/maps/Makefile
+++ b/drivers/mtd/maps/Makefile
@@ -41,7 +41,6 @@ obj-$(CONFIG_MTD_SCx200_DOCFLASH)+=3D scx200_docflash.o
 obj-$(CONFIG_MTD_DBOX2)                +=3D dbox2-flash.o
 obj-$(CONFIG_MTD_SOLUTIONENGINE)+=3D solutionengine.o
 obj-$(CONFIG_MTD_PCI)          +=3D pci.o
-obj-$(CONFIG_MTD_ALCHEMY)       +=3D alchemy-flash.o
 obj-$(CONFIG_MTD_AUTCPU12)     +=3D autcpu12-nvram.o
 obj-$(CONFIG_MTD_EDB7312)      +=3D edb7312.o
 obj-$(CONFIG_MTD_IMPA7)                +=3D impa7.o
diff --git a/drivers/mtd/maps/alchemy-flash.c b/drivers/mtd/maps/alchemy-fl=
ash.c
deleted file mode 100644
index 845ad4f..0000000
--- a/drivers/mtd/maps/alchemy-flash.c
+++ /dev/null
@@ -1,166 +0,0 @@
-/*
- * Flash memory access on AMD Alchemy evaluation boards
- *
- * (C) 2003, 2004 Pete Popov <ppopov@embeddedalley.com>
- */
-
-#include <linux/init.h>
-#include <linux/module.h>
-#include <linux/types.h>
-#include <linux/kernel.h>
-
-#include <linux/mtd/mtd.h>
-#include <linux/mtd/map.h>
-#include <linux/mtd/partitions.h>
-
-#include <asm/io.h>
-
-#ifdef CONFIG_MIPS_PB1000
-#define BOARD_MAP_NAME "Pb1000 Flash"
-#define BOARD_FLASH_SIZE 0x00800000 /* 8MB */
-#define BOARD_FLASH_WIDTH 4 /* 32-bits */
-#endif
-
-#ifdef CONFIG_MIPS_PB1500
-#define BOARD_MAP_NAME "Pb1500 Flash"
-#define BOARD_FLASH_SIZE 0x04000000 /* 64MB */
-#define BOARD_FLASH_WIDTH 4 /* 32-bits */
-#endif
-
-#ifdef CONFIG_MIPS_PB1100
-#define BOARD_MAP_NAME "Pb1100 Flash"
-#define BOARD_FLASH_SIZE 0x04000000 /* 64MB */
-#define BOARD_FLASH_WIDTH 4 /* 32-bits */
-#endif
-
-#ifdef CONFIG_MIPS_PB1550
-#define BOARD_MAP_NAME "Pb1550 Flash"
-#define BOARD_FLASH_SIZE 0x08000000 /* 128MB */
-#define BOARD_FLASH_WIDTH 4 /* 32-bits */
-#endif
-
-#ifdef CONFIG_MIPS_PB1200
-#define BOARD_MAP_NAME "Pb1200 Flash"
-#define BOARD_FLASH_SIZE 0x08000000 /* 128MB */
-#define BOARD_FLASH_WIDTH 2 /* 16-bits */
-#endif
-
-#ifdef CONFIG_MIPS_DB1000
-#define BOARD_MAP_NAME "Db1000 Flash"
-#define BOARD_FLASH_SIZE 0x02000000 /* 32MB */
-#define BOARD_FLASH_WIDTH 4 /* 32-bits */
-#endif
-
-#ifdef CONFIG_MIPS_DB1500
-#define BOARD_MAP_NAME "Db1500 Flash"
-#define BOARD_FLASH_SIZE 0x02000000 /* 32MB */
-#define BOARD_FLASH_WIDTH 4 /* 32-bits */
-#endif
-
-#ifdef CONFIG_MIPS_DB1100
-#define BOARD_MAP_NAME "Db1100 Flash"
-#define BOARD_FLASH_SIZE 0x02000000 /* 32MB */
-#define BOARD_FLASH_WIDTH 4 /* 32-bits */
-#endif
-
-#ifdef CONFIG_MIPS_DB1550
-#define BOARD_MAP_NAME "Db1550 Flash"
-#define BOARD_FLASH_SIZE 0x08000000 /* 128MB */
-#define BOARD_FLASH_WIDTH 4 /* 32-bits */
-#endif
-
-#ifdef CONFIG_MIPS_DB1200
-#define BOARD_MAP_NAME "Db1200 Flash"
-#define BOARD_FLASH_SIZE 0x04000000 /* 64MB */
-#define BOARD_FLASH_WIDTH 2 /* 16-bits */
-#endif
-
-#ifdef CONFIG_MIPS_BOSPORUS
-#define BOARD_MAP_NAME "Bosporus Flash"
-#define BOARD_FLASH_SIZE 0x01000000 /* 16MB */
-#define BOARD_FLASH_WIDTH 2 /* 16-bits */
-#endif
-
-#ifdef CONFIG_MIPS_MIRAGE
-#define BOARD_MAP_NAME "Mirage Flash"
-#define BOARD_FLASH_SIZE 0x04000000 /* 64MB */
-#define BOARD_FLASH_WIDTH 4 /* 32-bits */
-#define USE_LOCAL_ACCESSORS /* why? */
-#endif
-
-static struct map_info alchemy_map =3D {
-       .name =3D BOARD_MAP_NAME,
-};
-
-static struct mtd_partition alchemy_partitions[] =3D {
-        {
-                .name =3D "User FS",
-                .size =3D BOARD_FLASH_SIZE - 0x00400000,
-                .offset =3D 0x0000000
-        },{
-                .name =3D "YAMON",
-                .size =3D 0x0100000,
-               .offset =3D MTDPART_OFS_APPEND,
-                .mask_flags =3D MTD_WRITEABLE
-        },{
-                .name =3D "raw kernel",
-               .size =3D (0x300000 - 0x40000), /* last 256KB is yamon env =
*/
-               .offset =3D MTDPART_OFS_APPEND,
-        }
-};
-
-static struct mtd_info *mymtd;
-
-static int __init alchemy_mtd_init(void)
-{
-       struct mtd_partition *parts;
-       int nb_parts =3D 0;
-       unsigned long window_addr;
-       unsigned long window_size;
-
-       /* Default flash buswidth */
-       alchemy_map.bankwidth =3D BOARD_FLASH_WIDTH;
-
-       window_addr =3D 0x20000000 - BOARD_FLASH_SIZE;
-       window_size =3D BOARD_FLASH_SIZE;
-
-       /*
-        * Static partition definition selection
-        */
-       parts =3D alchemy_partitions;
-       nb_parts =3D ARRAY_SIZE(alchemy_partitions);
-       alchemy_map.size =3D window_size;
-
-       /*
-        * Now let's probe for the actual flash.  Do it here since
-        * specific machine settings might have been set above.
-        */
-       printk(KERN_NOTICE BOARD_MAP_NAME ": probing %d-bit flash bus\n",
-                       alchemy_map.bankwidth*8);
-       alchemy_map.virt =3D ioremap(window_addr, window_size);
-       mymtd =3D do_map_probe("cfi_probe", &alchemy_map);
-       if (!mymtd) {
-               iounmap(alchemy_map.virt);
-               return -ENXIO;
-       }
-       mymtd->owner =3D THIS_MODULE;
-
-       add_mtd_partitions(mymtd, parts, nb_parts);
-       return 0;
-}
-
-static void __exit alchemy_mtd_cleanup(void)
-{
-       if (mymtd) {
-               del_mtd_partitions(mymtd);
-               map_destroy(mymtd);
-               iounmap(alchemy_map.virt);
-       }
-}
-
-module_init(alchemy_mtd_init);
-module_exit(alchemy_mtd_cleanup);
-
-MODULE_AUTHOR("Embedded Alley Solutions, Inc");
-MODULE_DESCRIPTION(BOARD_MAP_NAME " MTD driver");
-MODULE_LICENSE("GPL");
--
1.6.2


