[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 11/17] lm32: system control model
From: |
Michael Walle |
Subject: |
Re: [Qemu-devel] [PATCH 11/17] lm32: system control model |
Date: |
Fri, 11 Feb 2011 23:35:10 +0100 |
User-agent: |
KMail/1.13.5 (Linux/2.6.32-5-686-bigmem; KDE/4.4.5; i686; ; ) |
Am Freitag 11 Februar 2011, 22:03:40 schrieb Blue Swirl:
> > +static int lm32_sys_init(SysBusDevice *dev)
> > +{
> > + LM32SysState *s = FROM_SYSBUS(typeof(*s), dev);
> > + int sys_regs;
> > +
> > + sys_regs = cpu_register_io_memory(sys_read_fn, sys_write_fn, s,
> > + DEVICE_NATIVE_ENDIAN);
> > + sysbus_init_mmio(dev, R_MAX * 4, sys_regs);
> > + sysbus_mmio_map(dev, 0, s->base);
>
> Devices should not map themselves or care what is their address.
> Please remove base field and qdev property and move the mapping to
> board level.
I added this because the device isn't created in the board initialization.
Instead it can be added with -device, if needed. Who does the mapping in this
case?
--
Michael
- [Qemu-devel] [PATCH 00/17 v2] LatticeMico32 target, Michael Walle, 2011/02/10
- [Qemu-devel] [PATCH 05/17] lm32: gdbstub support, Michael Walle, 2011/02/10
- [Qemu-devel] [PATCH 04/17] lm32: machine state loading/saving, Michael Walle, 2011/02/10
- [Qemu-devel] [PATCH 01/17] LatticeMico32 target support, Michael Walle, 2011/02/10
- [Qemu-devel] [PATCH 08/17] lm32: pic and juart helper functions, Michael Walle, 2011/02/10
- [Qemu-devel] [PATCH 11/17] lm32: system control model, Michael Walle, 2011/02/10
- [Qemu-devel] [PATCH 16/17] Add lm32 target to configure, Michael Walle, 2011/02/10
- [Qemu-devel] [PATCH 10/17] lm32: uart model, Michael Walle, 2011/02/10
- [Qemu-devel] [PATCH 07/17] lm32: juart model, Michael Walle, 2011/02/10
- [Qemu-devel] [PATCH 03/17] lm32: translation code helper, Michael Walle, 2011/02/10
- [Qemu-devel] [PATCH 02/17] lm32: translation routines, Michael Walle, 2011/02/10