From: Vitaly Bordug <vbordug@ru.mvista.com>
To: linux-mtd@lists.infradead.org
Subject: [PATCH] MTD: Add support for the MPC8xxADS boards
Date: Mon, 28 Nov 2005 21:57:02 +0300 [thread overview]
Message-ID: <438B52FE.9040802@ru.mvista.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 255 bytes --]
The following patch adds support for the JEDEC-compatible flashes on the MPC8xxADS boards.
Currently verified with MPC885ADS and MPC 866ADS. The patch is against MTD git tree.
Signed-off-by: Vitaly Bordug <vbordug@ru.mvista.com>
--
Sincerely,
Vitaly
[-- Attachment #2: 8xx_mtd_map2.patch --]
[-- Type: text/x-patch, Size: 2996 bytes --]
diff --git a/drivers/mtd/maps/Kconfig b/drivers/mtd/maps/Kconfig
index 846a533..1ece64c 100644
--- a/drivers/mtd/maps/Kconfig
+++ b/drivers/mtd/maps/Kconfig
@@ -284,6 +284,14 @@ config MTD_MBX860
MBX860 board. If you have one of these boards and would like
to use the flash chips on it, say 'Y'.
+config MTD_MPC8xxADS
+ tristate "JEDEC flash SIMM mapped on MPC8xxADS boards"
+ depends on (MPC885ADS || MPC86XADS) && MTD_PARTITIONS && MTD_JEDECPROBE && MTD_PHYSMAP && MTD_CFI_GEOMETRY && MTD_CFI_INTELEXT
+ help
+ This enables access routines for the flash chips on the Freescale
+ MPC8xxADS boards. If you have this board and would like
+ to use the flash chips on it, say 'Y'.
+
config MTD_DBOX2
tristate "CFI Flash device mapped on D-Box2"
depends on DBOX2 && MTD_CFI_INTELSTD && MTD_CFI_INTELEXT && MTD_CFI_AMDSTD
diff --git a/drivers/mtd/maps/Makefile b/drivers/mtd/maps/Makefile
index 7d9e940..913def2 100644
--- a/drivers/mtd/maps/Makefile
+++ b/drivers/mtd/maps/Makefile
@@ -73,3 +73,4 @@ obj-$(CONFIG_MTD_OMAP_NOR) += omap_nor.o
obj-$(CONFIG_MTD_PQ2FADS) += pq2fads.o
obj-$(CONFIG_MTD_MTX1) += mtx-1_flash.o
obj-$(CONFIG_MTD_TQM834x) += tqm834x.o
+obj-$(CONFIG_MTD_MPC8xxADS) += mpc8xxads.o
diff --git a/drivers/mtd/maps/mpc8xxads.c b/drivers/mtd/maps/mpc8xxads.c
new file mode 100644
index 0000000..192c4ea
--- /dev/null
+++ b/drivers/mtd/maps/mpc8xxads.c
@@ -0,0 +1,63 @@
+/*
+ * drivers/mtd/maps/mpc8xxads.c
+ *
+ * Mapping for Motorola mpc8xxads flash
+ *
+ * Author: source@mvista.com
+ *
+ * 2005 (c) MontaVista Software, Inc. 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.
+ */
+
+#include <linux/module.h>
+#include <linux/types.h>
+#include <linux/kernel.h>
+#include <linux/init.h>
+#include <asm/io.h>
+#include <asm/ppcboot.h>
+#include <linux/mtd/mtd.h>
+#include <linux/mtd/map.h>
+#include <linux/mtd/partitions.h>
+#include <linux/mtd/physmap.h>
+
+
+#define MPC8xxADS_U_BOOT_SIZE 0x80000
+#define MPC8xxADS_FREE_AREA_OFFSET MPC8xxADS_U_BOOT_SIZE
+
+static struct mtd_partition mpc8xxads_partitions[] = {
+ {
+ .name = "bootloader",
+ .size = MPC8xxADS_U_BOOT_SIZE,
+ .offset = 0,
+ .mask_flags = MTD_WRITEABLE, /* force read-only */
+ }, {
+ .name = "User FS",
+ .offset = MPC8xxADS_FREE_AREA_OFFSET
+ }
+};
+
+/* pointer to MPC885ADS board info data */
+extern unsigned char __res[];
+
+static int __init init_mpc8xxads_mtd(void)
+{
+ bd_t *bd = (bd_t *)__res;
+
+ physmap_configure(bd->bi_flashstart, bd->bi_flashsize, 4, NULL);
+ physmap_set_partitions(mpc8xxads_partitions,
+ sizeof (mpc8xxads_partitions) /
+ sizeof (mpc8xxads_partitions[0]));
+ return 0;
+}
+
+static void __exit cleanup_mpc8xxads_mtd(void)
+{
+}
+
+module_init(init_mpc8xxads_mtd);
+module_exit(cleanup_mpc8xxads_mtd);
+
+MODULE_LICENSE("GPL");
+MODULE_DESCRIPTION("MTD map and partitions for MPC8xxADS boards");
next reply other threads:[~2005-11-28 18:57 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-11-28 18:57 Vitaly Bordug [this message]
2005-11-28 20:33 ` [PATCH] MTD: Add support for the MPC8xxADS boards Thomas Gleixner
2005-11-29 5:39 ` Vitaly Wool
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=438B52FE.9040802@ru.mvista.com \
--to=vbordug@ru.mvista.com \
--cc=linux-mtd@lists.infradead.org \
/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