--- /dev/null
+From a9f770243ccb354e99b9ff33ecfecbeca73b1b03 Mon Sep 17 00:00:00 2001
+From: Manohara HK <manohara.hk@samsung.com>
+Date: Mon, 20 Mar 2017 19:13:02 +0530
+Subject: [PATCH v2] arm : stellaris : Increase sram and flash size and support
+ sdram
+
+This patch increase's the sram and flash size of stellaris lm3s6965 board.
+It also adds a sdram of 512MB to the board.
+
+Signed-off-by: Manohara HK <manohara.hk@samsung.com>
+Signed-off-by: pradeep.ns <pradeep.ns@samsung.com>
+---
+ hw/arm/stellaris.c | 29 +++++++++++++++++++++++++++++
+ 1 file changed, 29 insertions(+)
+
+diff --git a/hw/arm/stellaris.c b/hw/arm/stellaris.c
+index 408c1a1..6c44158 100644
+--- a/hw/arm/stellaris.c
++++ b/hw/arm/stellaris.c
+@@ -55,6 +55,15 @@ typedef const struct {
+ #define STELLARIS_GPTM(obj) \
+ OBJECT_CHECK(gptm_state, (obj), TYPE_STELLARIS_GPTM)
+
++#define INCREASE_SRAM_FLASH 1 /*Increase the SRAM and FLASH to its Max Size Possible*/
++#define SUPPORT_SDARAM 1 /*Add a sdram @cortexm3 default extranal RAM map */
++
++
++#if defined(SUPPORT_SDARAM)
++#define CORTEXM3_SDRAM_SIZE (512 * 1024 * 1024)
++#define CORTEXM3_SDRAM_ADDR (0x60000000)
++#endif
++
+ typedef struct gptm_state {
+ SysBusDevice parent_obj;
+
+@@ -1216,7 +1225,11 @@ static stellaris_board_info stellaris_boards[] = {
+ { "LM3S6965EVB",
+ 0x10010002,
+ 0x1073402e,
++#if defined(INCREASE_SRAM_FLASH)
++ 0xffffffff, /* dc0 : flash(128M) sram(16M) */
++#else
+ 0x00ff007f, /* dc0 */
++#endif
+ 0x001133ff,
+ 0x030f5317,
+ 0x0f0f87ff,
+@@ -1282,6 +1295,9 @@ static void stellaris_init(const char *kernel_filename, const char *cpu_model,
+
+ MemoryRegion *sram = g_new(MemoryRegion, 1);
+ MemoryRegion *flash = g_new(MemoryRegion, 1);
++#if defined(SUPPORT_SDARAM)
++ MemoryRegion *sdram = g_new(MemoryRegion, 1);
++#endif
+ MemoryRegion *system_memory = get_system_memory();
+
+ flash_size = (((board->dc0 & 0xffff) + 1) << 1) * 1024;
+@@ -1297,6 +1313,19 @@ static void stellaris_init(const char *kernel_filename, const char *cpu_model,
+ &error_fatal);
+ memory_region_add_subregion(system_memory, 0x20000000, sram);
+
++#if defined(SUPPORT_SDARAM)
++ // Extranal RAM(SDRAM) of max CORTEXM3_SDRAM_SIZE @ CORTEXM3_SDRAM_ADDR
++ memory_region_init_ram(sdram, NULL, "stellaris.sdram", CORTEXM3_SDRAM_SIZE,
++ &error_fatal);
++
++ memory_region_add_subregion(system_memory, CORTEXM3_SDRAM_ADDR, sdram);
++ printf("%s : FLASH (B) = %d : SRAM (B) = %d : SDRAM (B) = %d\n",
++ board->name, flash_size, sram_size, CORTEXM3_SDRAM_SIZE);
++#else
++ printf("%s : FLASH (B) = %d : SRAM (B) = %d\n",
++ board->name, flash_size, sram_size);
++#endif
++
+ nvic = armv7m_init(system_memory, flash_size, NUM_IRQ_LINES,
+ kernel_filename, cpu_model);
+
+--
+1.9.1
+