From: Evgeny Voevodin <e.voevodin@samsung.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: qemu-devel@nongnu.org, d.solodkiy@samsung.com
Subject: Re: [Qemu-devel] [PATCH 09/14] hw/lan9118.c: Basic byte/word/long access support.
Date: Wed, 07 Dec 2011 14:58:13 +0400 [thread overview]
Message-ID: <4EDF46C5.8060300@samsung.com> (raw)
In-Reply-To: <CAFEAcA_z_qCwEVBgvs9GmORzVtiBmw+4paAfErTLM=q+2Dhpaw@mail.gmail.com>
On 12/07/2011 02:09 PM, Peter Maydell wrote:
> On 7 December 2011 09:47, Evgeny Voevodin<e.voevodin@samsung.com> 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)
>
This patch could be interpreted as lan9118 emulation expansion since
this chip supports 16-bit access too. These changes don't cover all the
difference between 9118 and 9215, but it's enough to provide network
support to Samsung boards. When 9215 support will be added we can easily
switch to this chip.
>> 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
>
>
next prev parent reply other threads:[~2011-12-07 10:58 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-07 9:46 [Qemu-devel] [PATCH 00/14] ARM: Samsung S5PC210-based boards support Evgeny Voevodin
2011-12-07 9:46 ` [Qemu-devel] [PATCH 01/14] ARM: s5pc210: Basic support of s5pc210 boards Evgeny Voevodin
2011-12-07 11:01 ` Peter Maydell
2011-12-07 9:46 ` [Qemu-devel] [PATCH 02/14] hw/sysbus.h: Increase maximum number of device IRQs Evgeny Voevodin
2011-12-07 9:46 ` [Qemu-devel] [PATCH 03/14] ARM: s5pc210: IRQ subsystem support Evgeny Voevodin
2011-12-07 9:46 ` [Qemu-devel] [PATCH 04/14] ARM: s5pc210: PWM support Evgeny Voevodin
2011-12-07 9:46 ` [Qemu-devel] [PATCH 05/14] hw/arm_boot.c: Add new secondary CPU bootloader Evgeny Voevodin
2011-12-07 9:46 ` [Qemu-devel] [PATCH 06/14] hw/arm_gic.c: lower IRQ only on changing of enable bit Evgeny Voevodin
2011-12-07 9:46 ` [Qemu-devel] [PATCH 07/14] ARM: s5pc210: MCT support Evgeny Voevodin
2011-12-07 9:46 ` [Qemu-devel] [PATCH 08/14] ARM: s5pc210: Boot secondary CPU Evgeny Voevodin
2011-12-07 9:47 ` [Qemu-devel] [PATCH 09/14] hw/lan9118.c: Basic byte/word/long access support Evgeny Voevodin
2011-12-07 10:09 ` Peter Maydell
2011-12-07 10:58 ` Evgeny Voevodin [this message]
2011-12-07 11:17 ` Peter Maydell
2011-12-07 9:47 ` [Qemu-devel] [PATCH 10/14] hw/s5pc210.c: Add lan9118 support to SMDK board Evgeny Voevodin
2011-12-07 9:47 ` [Qemu-devel] [PATCH 11/14] ARM: s5pc210: added s5pc210 display controller device (FIMD) Evgeny Voevodin
2011-12-07 9:47 ` [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 9:47 ` [Qemu-devel] [PATCH 13/14] ARM: s5pc210: added SD/MMC host controller (ver. 2.0 compliant) implementation Evgeny Voevodin
2011-12-07 9:47 ` [Qemu-devel] [PATCH 14/14] s5pc210: Switch to sysbus_init_mmio Evgeny Voevodin
2011-12-07 10:41 ` Peter Maydell
2011-12-07 10:33 ` [Qemu-devel] [PATCH 00/14] ARM: Samsung S5PC210-based boards support Peter Maydell
2011-12-07 10:45 ` Dmitry Solodkiy
2011-12-08 10:58 ` Peter Maydell
2011-12-09 1:54 ` Chih-Min Chao
2011-12-09 9:21 ` Dmitry Solodkiy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4EDF46C5.8060300@samsung.com \
--to=e.voevodin@samsung.com \
--cc=d.solodkiy@samsung.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).