From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35461) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bUjBs-00062x-KV for qemu-devel@nongnu.org; Tue, 02 Aug 2016 19:33:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bUjBn-0006rA-KZ for qemu-devel@nongnu.org; Tue, 02 Aug 2016 19:33:39 -0400 Date: Wed, 3 Aug 2016 09:10:46 +1000 From: David Gibson Message-ID: <20160802231046.GB27583@voom.fritz.box> References: <1470129763.12584.26.camel@kernel.crashing.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="nVMJ2NtxeReIH9PS" Content-Disposition: inline In-Reply-To: <1470129763.12584.26.camel@kernel.crashing.org> Subject: Re: [Qemu-devel] [PATCH] ppc: Fix macio ESCC legacy mapping List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Benjamin Herrenschmidt Cc: qemu-ppc@nongnu.org, Mark Cave-Ayland , qemu-devel@nongnu.org, Alexander Graf --nVMJ2NtxeReIH9PS Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Aug 02, 2016 at 07:22:43PM +1000, Benjamin Herrenschmidt wrote: > The current mapping, while correct for the base ports (which is all the > driver uses these days), is wrong for the extended registers.=20 >=20 > I suspect the bugs come from incorrect tables in the CHRP IO Ref document, > I have verified the new values here match Apple's MacTech.pdf. >=20 > Note: Nothing that I know of actually uses these registers so it's not a > huge deal, but this patch has the added advantage of adding comments to > document what the registers are. >=20 > Signed-off-by: Benjamin Herrenschmidt Applied to ppc-for-2.8, thanks. > --- >=20 > diff --git a/hw/misc/macio/macio.c b/hw/misc/macio/macio.c > index be03926..5d57f45 100644 > --- a/hw/misc/macio/macio.c > +++ b/hw/misc/macio/macio.c > @@ -89,22 +89,16 @@ static void macio_escc_legacy_setup(MacIOState *macio= _state) > MemoryRegion *bar =3D &macio_state->bar; > int i; > static const int maps[] =3D { > - 0x00, 0x00, > - 0x02, 0x20, > - 0x04, 0x10, > - 0x06, 0x30, > - 0x08, 0x40, > - 0x0A, 0x50, > - 0x60, 0x60, > - 0x70, 0x70, > - 0x80, 0x70, > - 0x90, 0x80, > - 0xA0, 0x90, > - 0xB0, 0xA0, > - 0xC0, 0xB0, > - 0xD0, 0xC0, > - 0xE0, 0xD0, > - 0xF0, 0xE0, > + 0x00, 0x00, /* Command B */ > + 0x02, 0x20, /* Command A */ > + 0x04, 0x10, /* Data B */ > + 0x06, 0x30, /* Data A */ > + 0x08, 0x40, /* Enhancement B */ > + 0x0A, 0x50, /* Enhancement A */ > + 0x80, 0x80, /* Recovery count */ > + 0x90, 0x90, /* Start A */ > + 0xa0, 0xa0, /* Start B */ > + 0xb0, 0xb0, /* Detect AB */ > }; > =20 > memory_region_init(escc_legacy, OBJECT(macio_state), "escc-legacy", = 256); >=20 --=20 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 --nVMJ2NtxeReIH9PS Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJXoSh2AAoJEGw4ysog2bOSO1IQAKYIS3yMi3amobnfoIuImywG bkO1c3bCOVgTu4M7Y5AKDeFPW5gRk+4jHanWAkO55Pkigrkhsl9J6NezgHFgQbX/ pQXi2/jghoTLMxaOda+ccBxgQj1B8dP13xEYQLQU008Ojb9JjU9uOFlUS4eiJ6+c 33DSF+lTSHAMwCzC4v9qUGsIO7J0CBKzszbJKEqTmtgGZFMOt7TFRHh/0TINQhp1 li3PC41GimYPyGfmB+VrQ/mZ/281oxOOqwCDf6/NpJT+tDeZdHpKpt710kweLPcz DGb7oRgMve/0jvyuXfYyvutO2uP45LhQTPHjm8joneENtXLou/7IOLeXznfoYD1V GdL8Hysn8QcU4/PQw4k1WT7LJyJ5WIsHFv3Ix5zA1NaIlPMPmADt7Ghk4xX3kzqc YtgkogsrGHHvg6UFD4KvEZQuuKqYstvIW7BUph+CB43laviweWH/2HHwd1jYEbc7 VzWcZU/OvuLZLND0TDiFhz0vtsif1Vk6mtoubduG6jxnfx0jH9SO3BKdlUq5l5PW V0ScVZQNWqIPDKb/F5s4Cv4AjJllbfykoozGyau6DAptzES0Sh+mqtOvDl0DmvyO cBWnvFIyHF0/cfvP8rQDoztj7VIIX2WbmThCdcoe/68ck4yqC8vobi/brUVjaaBo OEYcK0yHRF2zziI3ASyq =78Jk -----END PGP SIGNATURE----- --nVMJ2NtxeReIH9PS--