From: David Gibson <david@gibson.dropbear.id.au>
To: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Cc: qemu-devel@nongnu.org, qemu-ppc@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 4/4] uninorth: remove token register from uninorth device
Date: Mon, 4 Jun 2018 10:41:01 +1000 [thread overview]
Message-ID: <20180604004101.GC4251@umbus> (raw)
In-Reply-To: <20180506142005.19580-5-mark.cave-ayland@ilande.co.uk>
[-- Attachment #1: Type: text/plain, Size: 2809 bytes --]
On Sun, May 06, 2018 at 03:20:05PM +0100, Mark Cave-Ayland wrote:
> >From observation of various OS sources it can be seen that the token register
> introduced in 4e46dcdbd3 "PPC: Newworld: Add uninorth token register" is not
> required, since the only register currently implemented is the uninorth hardware
> version which is read-only.
>
> Remove the token register implementation and instead return the uninorth
> version corresponding to the hardware.
>
> Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Applied, thanks.
> ---
> hw/pci-host/uninorth.c | 11 +++++------
> include/hw/pci-host/uninorth.h | 4 +++-
> 2 files changed, 8 insertions(+), 7 deletions(-)
>
> diff --git a/hw/pci-host/uninorth.c b/hw/pci-host/uninorth.c
> index a658f9230a..abebfaf755 100644
> --- a/hw/pci-host/uninorth.c
> +++ b/hw/pci-host/uninorth.c
> @@ -524,19 +524,18 @@ static void unin_write(void *opaque, hwaddr addr, uint64_t value,
> unsigned size)
> {
> trace_unin_write(addr, value);
> - if (addr == 0x0) {
> - *(int *)opaque = value;
> - }
> }
>
> static uint64_t unin_read(void *opaque, hwaddr addr, unsigned size)
> {
> uint32_t value;
>
> - value = 0;
> switch (addr) {
> case 0:
> - value = *(int *)opaque;
> + value = UNINORTH_VERSION_10A;
> + break;
> + default:
> + value = 0;
> }
>
> trace_unin_read(addr, value);
> @@ -559,7 +558,7 @@ static void unin_init(Object *obj)
> UNINState *s = UNI_NORTH(obj);
> SysBusDevice *sbd = SYS_BUS_DEVICE(obj);
>
> - memory_region_init_io(&s->mem, obj, &unin_ops, &s->token, "unin", 0x1000);
> + memory_region_init_io(&s->mem, obj, &unin_ops, s, "unin", 0x1000);
>
> sysbus_init_mmio(sbd, &s->mem);
> }
> diff --git a/include/hw/pci-host/uninorth.h b/include/hw/pci-host/uninorth.h
> index f6654bad9b..2a1cf9f284 100644
> --- a/include/hw/pci-host/uninorth.h
> +++ b/include/hw/pci-host/uninorth.h
> @@ -29,6 +29,9 @@
>
> #include "hw/ppc/openpic.h"
>
> +/* UniNorth version */
> +#define UNINORTH_VERSION_10A 0x7
> +
> #define TYPE_UNI_NORTH_PCI_HOST_BRIDGE "uni-north-pci-pcihost"
> #define TYPE_UNI_NORTH_AGP_HOST_BRIDGE "uni-north-agp-pcihost"
> #define TYPE_UNI_NORTH_INTERNAL_PCI_HOST_BRIDGE "uni-north-internal-pci-pcihost"
> @@ -57,7 +60,6 @@ typedef struct UNINState {
> SysBusDevice parent_obj;
>
> MemoryRegion mem;
> - int token[1];
> } UNINState;
>
> #define TYPE_UNI_NORTH "uni-north"
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
prev parent reply other threads:[~2018-06-04 1:20 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-06 14:20 [Qemu-devel] [PATCH 0/4] uninorth/macio: minor fixups Mark Cave-Ayland
2018-05-06 14:20 ` [Qemu-devel] [PATCH 1/4] uninorth: add impl min_access_size and max_access_size to unin_ops Mark Cave-Ayland
2018-06-04 0:39 ` David Gibson
2018-05-06 14:20 ` [Qemu-devel] [PATCH 2/4] macio: add trace-events to timer device Mark Cave-Ayland
2018-05-07 13:37 ` Philippe Mathieu-Daudé
2018-06-04 0:38 ` David Gibson
2018-05-06 14:20 ` [Qemu-devel] [PATCH 3/4] macio: add impl min_access_size and max_access_size to timer_ops Mark Cave-Ayland
2018-05-06 14:20 ` [Qemu-devel] [PATCH 4/4] uninorth: remove token register from uninorth device Mark Cave-Ayland
2018-05-07 13:38 ` Philippe Mathieu-Daudé
2018-06-04 0:41 ` David Gibson [this message]
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=20180604004101.GC4251@umbus \
--to=david@gibson.dropbear.id.au \
--cc=mark.cave-ayland@ilande.co.uk \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.