From: Manish Lachwani <mlachwani@mvista.com>
To: linux-mips@linux-mips.org
Subject: [PATCH]Support for MTD on MIPS Malta
Date: Mon, 18 Oct 2004 14:36:47 -0700 [thread overview]
Message-ID: <4174376F.9050605@mvista.com> (raw)
Hello !
Attached patch implements support for MTD on the MIPS Malta. Please review
Thanks
Manish Lachwani
Index: linux/arch/mips/mips-boards/malta/malta_setup.c
===================================================================
--- linux.orig/arch/mips/mips-boards/malta/malta_setup.c
+++ linux/arch/mips/mips-boards/malta/malta_setup.c
@@ -22,6 +22,11 @@
#include <linux/pci.h>
#include <linux/tty.h>
+#ifdef CONFIG_MTD
+#include <linux/mtd/partitions.h>
+#include <linux/mtd/physmap.h>
+#endif
+
#include <asm/cpu.h>
#include <asm/bootinfo.h>
#include <asm/irq.h>
@@ -53,6 +58,30 @@
{ "dma2", 0xc0, 0xdf, IORESOURCE_BUSY },
};
+#ifdef CONFIG_MTD
+static struct mtd_partition malta_mtd_partitions[] = {
+ {
+ .name = "YAMON",
+ .offset = 0x0,
+ .size = 0x100000,
+ .mask_flags = MTD_WRITEABLE
+ },
+ {
+ .name = "User FS",
+ .offset = 0x100000,
+ .size = 0x2e0000
+ },
+ {
+ .name = "Board Config",
+ .offset = 0x3e0000,
+ .size = 0x020000,
+ .mask_flags = MTD_WRITEABLE
+ }
+};
+
+#define number_partitions
(sizeof(malta_mtd_partitions)/sizeof(struct mtd_partition))
+#endif
+
const char *get_system_type(void)
{
return "MIPS Malta";
@@ -179,6 +208,15 @@
};
#endif
#endif
+
+#ifdef CONFIG_MTD
+ /*
+ * Support for MTD on Malta. Use the generic physmap driver
+ */
+ physmap_configure(0x1e000000, 0x400000, 4, NULL);
+ physmap_set_partitions(malta_mtd_partitions, number_partitions);
+#endif
+
mips_reboot_setup();
board_time_init = mips_time_init;
reply other threads:[~2004-10-18 21:36 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=4174376F.9050605@mvista.com \
--to=mlachwani@mvista.com \
--cc=linux-mips@linux-mips.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