mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
To: barebox@lists.infradead.org
Subject: [PATCH 3/3] qemu-malta: add nor flash support
Date: Mon, 30 Apr 2012 14:00:07 +0200	[thread overview]
Message-ID: <1335787207-27838-3-git-send-email-plagnioj@jcrosoft.com> (raw)
In-Reply-To: <20120430115703.GD2992@game.jcrosoft.org>

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
---
 arch/mips/boards/qemu-malta/init.c     |   13 +++++++++++++
 arch/mips/configs/qemu-malta_defconfig |    5 +++++
 2 files changed, 18 insertions(+), 0 deletions(-)

diff --git a/arch/mips/boards/qemu-malta/init.c b/arch/mips/boards/qemu-malta/init.c
index 502b346..4709989 100644
--- a/arch/mips/boards/qemu-malta/init.c
+++ b/arch/mips/boards/qemu-malta/init.c
@@ -25,8 +25,21 @@
 #include <ns16550.h>
 #include <mach/hardware.h>
 #include <io.h>
+#include <partition.h>
+#include <sizes.h>
 #include <asm/common.h>
 
+static int malta_devices_init(void)
+{
+	add_cfi_flash_device(0, 0x1e000000, SZ_4M, 0);
+
+	devfs_add_partition("nor0", 0x0, SZ_512K, PARTITION_FIXED, "self");
+	devfs_add_partition("nor0", SZ_512K, SZ_64K, PARTITION_FIXED, "env0");
+
+	return 0;
+}
+device_initcall(malta_devices_init);
+
 static struct NS16550_plat serial_plat = {
 	.clock = 1843200, /* no matter for emulated port */
 	.shift = 0,
diff --git a/arch/mips/configs/qemu-malta_defconfig b/arch/mips/configs/qemu-malta_defconfig
index eac21e7..50e0dc4 100644
--- a/arch/mips/configs/qemu-malta_defconfig
+++ b/arch/mips/configs/qemu-malta_defconfig
@@ -50,6 +50,11 @@ CONFIG_NET_TFTP_PUSH=y
 CONFIG_NET_NETCONSOLE=y
 CONFIG_NET_RESOLV=y
 # CONFIG_SPI is not set
+CONFIG_DRIVER_CFI=y
+# CONFIG_DRIVER_CFI_AMD is not set
+# CONFIG_DRIVER_CFI_BANK_WIDTH_1 is not set
+# CONFIG_DRIVER_CFI_BANK_WIDTH_2 is not set
+CONFIG_CFI_BUFFER_WRITE=y
 CONFIG_MTD=y
 CONFIG_FS_CRAMFS=y
 CONFIG_FS_FAT=y
-- 
1.7.9.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  parent reply	other threads:[~2012-04-30 12:21 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-30 11:57 [PATCH 0/3] qemu-malta " Jean-Christophe PLAGNIOL-VILLARD
2012-04-30 12:00 ` [PATCH 1/3] mips: add in_be16/32 and out_be16/32 for cfi support Jean-Christophe PLAGNIOL-VILLARD
2012-04-30 12:00 ` [PATCH 2/3] qemu-malta: rename serial.c to init.c Jean-Christophe PLAGNIOL-VILLARD
2012-04-30 12:00 ` Jean-Christophe PLAGNIOL-VILLARD [this message]
2012-05-01 19:41 ` [PATCH 0/3] qemu-malta nor flash support Sascha Hauer

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=1335787207-27838-3-git-send-email-plagnioj@jcrosoft.com \
    --to=plagnioj@jcrosoft.com \
    --cc=barebox@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