From: Jagan <402ja...@gmail.com> This patch adds support for NOR1 flash (Bank #2) on vexpress-a9 platform. It is 64MB CFI01 compliant flash.
Tested on stable u-boot version through Linux. Signed-off-by: Jagan <402ja...@gmail.com> --- hw/vexpress.c | 10 +++++++++- 1 files changed, 9 insertions(+), 1 deletions(-) diff --git a/hw/vexpress.c b/hw/vexpress.c index 2e889a8..b4262ed 100644 --- a/hw/vexpress.c +++ b/hw/vexpress.c @@ -422,7 +422,15 @@ static void vexpress_common_init(const VEDBoardInfo *daughterboard, } /* VE_NORFLASH0ALIAS: not modelled */ - /* VE_NORFLASH1: not modelled */ + /* VE_NORFLASH1: */ + dinfo = drive_get(IF_PFLASH, 0, 0); + if (!pflash_cfi01_register(map[VE_NORFLASH1], NULL, "vexpress.flash1", + VEXPRESS_FLASH_SIZE, dinfo ? dinfo->bdrv : NULL, + VEXPRESS_FLASH_SECT_SIZE, + VEXPRESS_FLASH_SIZE / VEXPRESS_FLASH_SECT_SIZE, + 4, 0x0089, 0x0018, 0x0000, 0x1, 0)) { + fprintf(stderr, "qemu: Error registering flash1 memory.\n"); + } sram_size = 0x2000000; memory_region_init_ram(sram, "vexpress.sram", sram_size); -- 1.7.0.4