Patchwork [1/3] mainstone: fix name of the allocated memory for roms

login
register
mail settings
Submitter Dmitry Eremin-Solenikov
Date Jan. 13, 2011, 3:37 p.m.
Message ID <1294933032-12757-1-git-send-email-dbaryshkov@gmail.com>
Download mbox | patch
Permalink /patch/78767/
State New
Headers show

Comments

Dmitry Eremin-Solenikov - Jan. 13, 2011, 3:37 p.m.
Mainstone board has two flash chips (emulated by two ram regions), however
currently code tries to allocate them with the same name, which fails.
Fix that to make mainstone emulation work again.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
---
 hw/mainstone.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Dmitry Eremin-Solenikov - Jan. 17, 2011, 11:09 p.m.
Hi,

Sorry, what about these patches?

On 1/13/11, Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> wrote:
> Mainstone board has two flash chips (emulated by two ram regions), however
> currently code tries to allocate them with the same name, which fails.
> Fix that to make mainstone emulation work again.
>
> Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
> ---
>  hw/mainstone.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/hw/mainstone.c b/hw/mainstone.c
> index efa2959..d8e41cf 100644
> --- a/hw/mainstone.c
> +++ b/hw/mainstone.c
> @@ -106,7 +106,8 @@ static void mainstone_common_init(ram_addr_t ram_size,
>          }
>
>          if (!pflash_cfi01_register(mainstone_flash_base[i],
> -                                   qemu_ram_alloc(NULL, "mainstone.flash",
> +                                   qemu_ram_alloc(NULL, i ?
> "mainstone.flash1" :
> +                                                  "mainstone.flash0",
>                                                    MAINSTONE_FLASH),
>                                     dinfo->bdrv, sector_len,
>                                     MAINSTONE_FLASH / sector_len, 4, 0, 0,
> 0, 0,
> --
> 1.7.2.3
>
>
Aurelien Jarno - Jan. 20, 2011, 11:45 a.m.
On Thu, Jan 13, 2011 at 06:37:10PM +0300, Dmitry Eremin-Solenikov wrote:
> Mainstone board has two flash chips (emulated by two ram regions), however
> currently code tries to allocate them with the same name, which fails.
> Fix that to make mainstone emulation work again.
> 
> Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
> ---
>  hw/mainstone.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/hw/mainstone.c b/hw/mainstone.c
> index efa2959..d8e41cf 100644
> --- a/hw/mainstone.c
> +++ b/hw/mainstone.c
> @@ -106,7 +106,8 @@ static void mainstone_common_init(ram_addr_t ram_size,
>          }
>  
>          if (!pflash_cfi01_register(mainstone_flash_base[i],
> -                                   qemu_ram_alloc(NULL, "mainstone.flash",
> +                                   qemu_ram_alloc(NULL, i ? "mainstone.flash1" :
> +                                                  "mainstone.flash0",
>                                                    MAINSTONE_FLASH),
>                                     dinfo->bdrv, sector_len,
>                                     MAINSTONE_FLASH / sector_len, 4, 0, 0, 0, 0,
> -- 
> 1.7.2.3
> 

Thanks, all three patches applied.

Patch

diff --git a/hw/mainstone.c b/hw/mainstone.c
index efa2959..d8e41cf 100644
--- a/hw/mainstone.c
+++ b/hw/mainstone.c
@@ -106,7 +106,8 @@  static void mainstone_common_init(ram_addr_t ram_size,
         }
 
         if (!pflash_cfi01_register(mainstone_flash_base[i],
-                                   qemu_ram_alloc(NULL, "mainstone.flash",
+                                   qemu_ram_alloc(NULL, i ? "mainstone.flash1" :
+                                                  "mainstone.flash0",
                                                   MAINSTONE_FLASH),
                                    dinfo->bdrv, sector_len,
                                    MAINSTONE_FLASH / sector_len, 4, 0, 0, 0, 0,