[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 2/8] [MIPS] qdev: convert ds1225y nvram to sysbu
From: |
Markus Armbruster |
Subject: |
Re: [Qemu-devel] [PATCH 2/8] [MIPS] qdev: convert ds1225y nvram to sysbus device |
Date: |
Sat, 25 Sep 2010 11:52:12 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) |
Hervé Poussineau <address@hidden> writes:
> Use it in Jazz emulation
> Remove protection stuff, which doesn't belong to this device
> Remove ds1225y_init() and ds1225y_set_protection() functions, which are not
> used anymore
>
> Signed-off-by: Hervé Poussineau <address@hidden>
I think this would be easier to review if you split it up some, perhaps
cleanup such as DPRINTF(), removal of protection stuff, and qdev
conversion.
> ---
> hw/ds1225y.c | 151
> ++++++++++++++++++++++++++++++--------------------------
> hw/mips.h | 4 --
> hw/mips_jazz.c | 4 +-
> 3 files changed, 83 insertions(+), 76 deletions(-)
>
> diff --git a/hw/ds1225y.c b/hw/ds1225y.c
> index 009d127..046d1ec 100644
> --- a/hw/ds1225y.c
> +++ b/hw/ds1225y.c
> @@ -22,31 +22,34 @@
> * THE SOFTWARE.
> */
>
> -#include "hw.h"
> -#include "mips.h"
> -#include "nvram.h"
> +#include "sysbus.h"
>
> //#define DEBUG_NVRAM
>
> -typedef struct ds1225y_t
> -{
> - uint32_t chip_size;
> +#ifdef DEBUG_NVRAM
> +#define DPRINTF(fmt, ...) \
> + do { printf("nvram: " fmt , ## __VA_ARGS__); } while (0)
> +#else
> +#define DPRINTF(fmt, ...) do {} while (0)
> +#endif
> +
> +typedef struct {
> + DeviceState qdev;
> + int32_t chip_size;
You change chip_size from unsigned to signed. Why?
> + char* filename;
> QEMUFile *file;
> uint8_t *contents;
> - uint8_t protection;
> -} ds1225y_t;
> -
> +} NvRamState;
[...]
- [Qemu-devel] [PATCH v2 0/8] Convert some MIPS Jazz devices to qdev, Hervé Poussineau, 2010/09/08
- [Qemu-devel] [PATCH 1/8] [MIPS] qdev: convert i8042 to sysbus device, Hervé Poussineau, 2010/09/08
- [Qemu-devel] [PATCH 3/8] [MIPS] qdev: convert jazz-led to sysbus device, Hervé Poussineau, 2010/09/08
- [Qemu-devel] [PATCH 2/8] [MIPS] qdev: convert ds1225y nvram to sysbus device, Hervé Poussineau, 2010/09/08
- [Qemu-devel] [PATCH 4/8] [MIPS] qdev: Use qdev floppy disk controller in Jazz emulation, Hervé Poussineau, 2010/09/08
- [Qemu-devel] [PATCH 5/8] [MIPS] qdev: convert ISA VGA MM to sysbus device, Hervé Poussineau, 2010/09/08
- [Qemu-devel] [PATCH 6/8] [MIPS] qdev: convert g364fb to sysbus device, Hervé Poussineau, 2010/09/08
- [Qemu-devel] [PATCH 7/8] [MIPS] qdev: convert jazz irq controller to sysbus device, Hervé Poussineau, 2010/09/08
- [Qemu-devel] [PATCH 8/8] [MIPS] qdev: convert rc4030 to sysbus device, Hervé Poussineau, 2010/09/08