From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dong Aisheng Subject: Re: [PATCH V2 06/10] ARM: mxs: add saif device Date: Fri, 15 Jul 2011 23:02:36 +0800 Message-ID: References: <1310483085-31442-1-git-send-email-b29396@freescale.com> <1310483085-31442-7-git-send-email-b29396@freescale.com> <20110715133241.GG2021@pengutronix.de> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: Received: from mail-yi0-f51.google.com (mail-yi0-f51.google.com [209.85.218.51]) by alsa0.perex.cz (Postfix) with ESMTP id AB0D424503 for ; Fri, 15 Jul 2011 17:02:37 +0200 (CEST) Received: by yib2 with SMTP id 2so580128yib.38 for ; Fri, 15 Jul 2011 08:02:36 -0700 (PDT) In-Reply-To: <20110715133241.GG2021@pengutronix.de> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: alsa-devel-bounces@alsa-project.org Errors-To: alsa-devel-bounces@alsa-project.org To: Wolfram Sang Cc: alsa-devel@alsa-project.org, s.hauer@pengutronix.de, broonie@opensource.wolfsonmicro.com, u.kleine-koenig@pengutronix.de, Dong Aisheng , lrg@ti.com, linux-arm-kernel@lists.infradead.org List-Id: alsa-devel@alsa-project.org 2011/7/15 Wolfram Sang : >> +#define DIGCTRL_BASE_ADDR =A0 =A0 =A0MX28_IO_ADDRESS(MX28_DIGCTL_BASE_A= DDR) >> + > > Hmm, maybe define a function mx28_set_saif_clkmux(val)? > >> + =A0 =A0 mx28_add_saif(0); >> + =A0 =A0 mx28_add_saif(1); >> + >> + =A0 =A0 /*set the saif clk mux, both saif0/saif1 use saif0 clk*/ >> + =A0 =A0 __raw_writel(0x2 << 10, DIGCTRL_BASE_ADDR); > > You might overwrite previous settings here. The hardcoded numbers need > defines, too. It's correct. I'm originally going to do that when implement record because this setting may affect both machine driver and saif driver on recording. Since currently we only implement playback, so i just hardcode it. Do you think if that's ok? Or i need to do it now? Regards Dong Aisheng From mboxrd@z Thu Jan 1 00:00:00 1970 From: dongas86@gmail.com (Dong Aisheng) Date: Fri, 15 Jul 2011 23:02:36 +0800 Subject: [alsa-devel] [PATCH V2 06/10] ARM: mxs: add saif device In-Reply-To: <20110715133241.GG2021@pengutronix.de> References: <1310483085-31442-1-git-send-email-b29396@freescale.com> <1310483085-31442-7-git-send-email-b29396@freescale.com> <20110715133241.GG2021@pengutronix.de> Message-ID: To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org 2011/7/15 Wolfram Sang : >> +#define DIGCTRL_BASE_ADDR ? ? ?MX28_IO_ADDRESS(MX28_DIGCTL_BASE_ADDR) >> + > > Hmm, maybe define a function mx28_set_saif_clkmux(val)? > >> + ? ? mx28_add_saif(0); >> + ? ? mx28_add_saif(1); >> + >> + ? ? /*set the saif clk mux, both saif0/saif1 use saif0 clk*/ >> + ? ? __raw_writel(0x2 << 10, DIGCTRL_BASE_ADDR); > > You might overwrite previous settings here. The hardcoded numbers need > defines, too. It's correct. I'm originally going to do that when implement record because this setting may affect both machine driver and saif driver on recording. Since currently we only implement playback, so i just hardcode it. Do you think if that's ok? Or i need to do it now? Regards Dong Aisheng