[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 09/14] hw/lan9118.c: Basic byte/word/long access
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] [PATCH 09/14] hw/lan9118.c: Basic byte/word/long access support. |
Date: |
Wed, 7 Dec 2011 10:09:32 +0000 |
On 7 December 2011 09:47, Evgeny Voevodin <address@hidden> wrote:
> We included this chip into s5pc210 platform because SMDK board holds
> lan9215 chip. Difference is that 9215 access is 16-bit wide and some
> registers differ. By addition basic 16-bit access to 9118 emulation we
> achieved ethernet controller support by Linux lernel on SMDK boards.
If it differs then shouldn't we add a new qdev device for 9215 ?
(sharing most of the implementation code, obviously)
> static const MemoryRegionOps lan9118_mem_ops = {
> - .read = lan9118_readl,
> - .write = lan9118_writel,
> + .old_mmio = {
> + .read = { lan9118_readb, lan9118_readw, lan9118_readl, },
> + .write = { lan9118_writeb, lan9118_writew, lan9118_writel, },
> + },
> .endianness = DEVICE_NATIVE_ENDIAN,
> };
This is going backwards -- the .old_mmio hooks are for backwards
compatibility when converting old devices to MemoryRegions -- they
shouldn't be added in new code.
You need to make the lan9118_read/write functions look at their
'size' argument instead.
-- PMM
- [Qemu-devel] [PATCH 00/14] ARM: Samsung S5PC210-based boards support., Evgeny Voevodin, 2011/12/07
- [Qemu-devel] [PATCH 02/14] hw/sysbus.h: Increase maximum number of device IRQs., Evgeny Voevodin, 2011/12/07
- [Qemu-devel] [PATCH 05/14] hw/arm_boot.c: Add new secondary CPU bootloader., Evgeny Voevodin, 2011/12/07
- [Qemu-devel] [PATCH 04/14] ARM: s5pc210: PWM support., Evgeny Voevodin, 2011/12/07
- [Qemu-devel] [PATCH 01/14] ARM: s5pc210: Basic support of s5pc210 boards, Evgeny Voevodin, 2011/12/07
- [Qemu-devel] [PATCH 03/14] ARM: s5pc210: IRQ subsystem support., Evgeny Voevodin, 2011/12/07
- [Qemu-devel] [PATCH 09/14] hw/lan9118.c: Basic byte/word/long access support., Evgeny Voevodin, 2011/12/07
- Re: [Qemu-devel] [PATCH 09/14] hw/lan9118.c: Basic byte/word/long access support.,
Peter Maydell <=
- [Qemu-devel] [PATCH 08/14] ARM: s5pc210: Boot secondary CPU., Evgeny Voevodin, 2011/12/07
- [Qemu-devel] [PATCH 12/14] SD card: add query function to check wether SD card currently ready to recieve data Before executing data transfer to card, we must check that previously issued command wasn't a simple query command (for ex. CMD13), which doesn't require data transfer. Currently, we only can aquire information about whether SD card is in sending data state or not. This patch allows us to query wether previous command was data write command and it was successfully accepted by card (meaning that SD card in recieving data state)., Evgeny Voevodin, 2011/12/07
- [Qemu-devel] [PATCH 06/14] hw/arm_gic.c: lower IRQ only on changing of enable bit., Evgeny Voevodin, 2011/12/07
- [Qemu-devel] [PATCH 14/14] s5pc210: Switch to sysbus_init_mmio., Evgeny Voevodin, 2011/12/07
- [Qemu-devel] [PATCH 07/14] ARM: s5pc210: MCT support., Evgeny Voevodin, 2011/12/07
- [Qemu-devel] [PATCH 10/14] hw/s5pc210.c: Add lan9118 support to SMDK board., Evgeny Voevodin, 2011/12/07
- [Qemu-devel] [PATCH 11/14] ARM: s5pc210: added s5pc210 display controller device (FIMD), Evgeny Voevodin, 2011/12/07