9
0
Fork 0

qemu-malta: add nor flash support

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
This commit is contained in:
Jean-Christophe PLAGNIOL-VILLARD 2012-04-30 14:05:10 +08:00
parent fcd65ca321
commit 37a97ca3fc
2 changed files with 19 additions and 0 deletions

View File

@ -1,5 +1,6 @@
/*
* Copyright (C) 2011 Antony Pavlov <antonynpavlov@gmail.com>
* Copyright (C) 2012 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
*
* This file is part of barebox.
* See file CREDITS for list of people who contributed to this project.
@ -25,8 +26,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,

View File

@ -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