From: "Andreas Färber" <afaerber@suse.de>
To: Alberto Garcia <agarcia@igalia.com>
Cc: Blue Swirl <blauwirbel@gmail.com>,
Paolo Bonzini <pbonzini@redhat.com>,
Anthony Liguori <aliguori@us.ibm.com>,
qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH v4 2/2] Add GE IP-Octal 232 IndustryPack emulation
Date: Tue, 08 Jan 2013 19:08:57 +0100 [thread overview]
Message-ID: <50EC60B9.60304@suse.de> (raw)
In-Reply-To: <4a5728bd52fbd15616ba7a20ffb3e1a90be2cc74.1357607262.git.agarcia@igalia.com>
Am 08.01.2013 02:10, schrieb Alberto Garcia:
> The GE IP-Octal 232 is an IndustryPack module that implements eight
> RS-232 serial ports, each one of which can be redirected to a
> character device in the host.
>
> Signed-off-by: Alberto Garcia <agarcia@igalia.com>
> ---
> hw/Makefile.objs | 2 +-
> hw/ipoctal.c | 614 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
On my suggestion you changed the type name from "ipoctal" to
"ipoctal232" - the file name should probably then be updated, too.
For the function prefixes inside the file it shouldn't matter as long as
they're consistent.
[...]
> +typedef struct IPOctalState IPOctalState;
> +typedef struct SCC2698Channel SCC2698Channel;
> +typedef struct SCC2698Block SCC2698Block;
> +
> +struct SCC2698Channel {
> + IPOctalState *ipoctal;
> + CharDriverState *dev;
> + char *devpath;
> + bool rx_enabled;
> + uint8_t mr[2];
> + uint8_t mr_idx;
> + uint8_t sr;
> + uint8_t rhr[RX_FIFO_SIZE];
> + uint8_t rhr_idx;
> + uint8_t rx_pending;
> +};
> +
> +struct SCC2698Block {
> + uint8_t imr;
> + uint8_t isr;
> +};
> +
> +struct IPOctalState {
> + IPackDevice dev;
By convention:
IPackDevice parent_obj;
SCC2698...
> + SCC2698Channel ch[N_CHANNELS];
> + SCC2698Block blk[N_BLOCKS];
> + uint8_t irq_vector;
> +};
I understand that this device will be used from the command line only,
so the upcoming TYPE_IPOCTAL232 could remain local to this file for the
cast macros (i.e., no ipoctal232.h needed).
But if, as brought up at LinuxCon, you may want to add qtest cases it
may be helpful to move some of the constants above to their own header
file ipoctal232_regs.h as done for RTC or pending for TMP105. That could
be split out in a later step though, once PCI libqos is available.
Regards,
Andreas
P.S. No need to CC avi@redhat.com any longer, you may have noticed. ;)
--
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
next prev parent reply other threads:[~2013-01-08 18:09 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-08 1:10 [Qemu-devel] [PATCH v4 0/2] Add TPCI200 and IP-Octal 232 IndustryPack emulation Alberto Garcia
2013-01-08 1:10 ` [Qemu-devel] [PATCH v4 1/2] Add TEWS TPCI200 " Alberto Garcia
2013-01-08 13:55 ` Andreas Färber
2013-01-08 15:57 ` Alberto Garcia
2013-01-08 16:22 ` Andreas Färber
2013-01-08 16:37 ` Alberto Garcia
2013-01-09 0:36 ` Andreas Färber
2013-01-09 1:20 ` Alberto Garcia
2013-01-08 1:10 ` [Qemu-devel] [PATCH v4 2/2] Add GE IP-Octal 232 " Alberto Garcia
2013-01-08 18:08 ` Andreas Färber [this message]
2013-01-09 0:56 ` Alberto Garcia
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=50EC60B9.60304@suse.de \
--to=afaerber@suse.de \
--cc=agarcia@igalia.com \
--cc=aliguori@us.ibm.com \
--cc=blauwirbel@gmail.com \
--cc=pbonzini@redhat.com \
--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).