From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752916AbcG3PWn (ORCPT ); Sat, 30 Jul 2016 11:22:43 -0400 Received: from down.free-electrons.com ([37.187.137.238]:33670 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752138AbcG3PVz (ORCPT ); Sat, 30 Jul 2016 11:21:55 -0400 Date: Sat, 30 Jul 2016 17:21:53 +0200 From: Maxime Ripard To: Julian Calaby Cc: Code Kipper , "Mailing List, Arm" , linux-sunxi , Liam Girdwood , Mark Brown , "linux-kernel@vger.kernel.org" , alsa-devel@alsa-project.org, be17068@iperbole.bo.it Subject: Re: [linux-sunxi] [PATCH 2/2] ASoC: sunxi: compatibility for sun6i to SPDIF Message-ID: <20160730152153.GV6215@lukather> References: <20160730142716.29377-1-codekipper@gmail.com> <20160730142716.29377-3-codekipper@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="oAjj1ZwgLg4oRN9q" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --oAjj1ZwgLg4oRN9q Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Jul 31, 2016 at 12:40:48AM +1000, Julian Calaby wrote: > Hi Marcus, >=20 > On Sun, Jul 31, 2016 at 12:27 AM, wrote: > > From: Marcus Cooper > > > > The A31 SoC uses the same SPDIF block as found in earlier SoCs, but its > > reset is controlled via a separate reset controller. > > > > The DMA also complains when the maxburst is set to 4 so it's been adjus= ted > > to 8 which suites both the older and newer SoCs. > > > > Signed-off-by: Marcus Cooper > > --- > > sound/soc/sunxi/sun4i-spdif.c | 17 ++++++++++++++++- > > 1 file changed, 16 insertions(+), 1 deletion(-) > > > > diff --git a/sound/soc/sunxi/sun4i-spdif.c b/sound/soc/sunxi/sun4i-spdi= f.c > > index 0b04fb0..88fbb3a 100644 > > --- a/sound/soc/sunxi/sun4i-spdif.c > > +++ b/sound/soc/sunxi/sun4i-spdif.c > > @@ -482,11 +485,23 @@ static int sun4i_spdif_probe(struct platform_devi= ce *pdev) > > } > > > > host->dma_params_tx.addr =3D res->start + SUN4I_SPDIF_TXFIFO; > > - host->dma_params_tx.maxburst =3D 4; > > + host->dma_params_tx.maxburst =3D 8; > > host->dma_params_tx.addr_width =3D DMA_SLAVE_BUSWIDTH_2_BYTES; > > > > platform_set_drvdata(pdev, host); > > > > + if (of_device_is_compatible(pdev->dev.of_node, > > + "allwinner,sun6i-a31-spdif")) { >=20 > Given how much Allwinner likes to shuffle stuff around with each SoC > generation, would it make sense to add a flag for this in some > compatible specific config structure instead of checking against the > compatible? It really depends on the size of the quirks you have to maintain. If it's just a single one like here, I'd say it's less of a hassle (and actually easier and conciser to implement). Maxime --=20 Maxime Ripard, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com --oAjj1ZwgLg4oRN9q Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJXnMYRAAoJEBx+YmzsjxAgPWwQAKh6BGJHweSadkw6wx363gv5 u7BitvDNcQ1CpSkYVLU0F9BsrSMpyLsY1uJCPAd+VWrttCV5deYJmEZ/YFXSxQyP SsqALHNfUe8oJTrjYUW8IBqIi3nnFTsjX3TtTWgq0jKleoDdIcoBIqe4ycdSkfc3 JRsBezqwK1feI3QTBTaf+DpPvNNCvuNInuvLn3XVAXPEIGm1fBJGxSSLhWC4T/WP IFu2dqBUdO9UKnh3/nQITCVVQ8jg7DIxy/TDzNYiMznV8JImM0lSfWSm1BCq/3wa 8/E/hV9Ro/zoGxP/jkQhRO7JpQ1y0gb4eskvzu2nVUjUZboYFzpyU9+ORTDywpjA MWfA1Qho3niCJNiUdwoETZPz0/FGSxRNOwT8ESI6OSwgN0pbE26EIYdjvs51M0/L zrDPjYqKZdEH6F8gBKwvlEv6MQvlaXAfQTz9NrRs+O0oftu3YBhcTtZl/NCRpJUo SOfoN6c3dEaxfxZToEjKfIfYNyinPLk6ROqd/VRqHKlueWyY7DD3/Xfr354Qemf5 7wc/kxR1MJr8dC3mnIiZWCAIon2lx2II53d22ZvfnK+Dh50zOC1LJTtcgZuCkJHu rgpHHw8S9PGxcDzENlp+Ma81PC2YUf8QXCeghQXxqJd77RdxMEdVvRBYL5DHh6Up 4n9zBA6x5JvJVB4Kgscn =SMJf -----END PGP SIGNATURE----- --oAjj1ZwgLg4oRN9q--