From patchwork Thu Apr 21 18:19:02 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ben Gardiner X-Patchwork-Id: 725271 Received: from devils.ext.ti.com (devils.ext.ti.com [198.47.26.153]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p3LIJWx2012525 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 21 Apr 2011 18:19:53 GMT Received: from dlep36.itg.ti.com ([157.170.170.91]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id p3LIJV9u003087 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Thu, 21 Apr 2011 13:19:32 -0500 Received: from linux.omap.com (localhost [127.0.0.1]) by dlep36.itg.ti.com (8.13.8/8.13.8) with ESMTP id p3LIJVeV023239 for ; Thu, 21 Apr 2011 13:19:31 -0500 (CDT) Received: from linux.omap.com (localhost [127.0.0.1]) by linux.omap.com (Postfix) with ESMTP id 7ADEE8062A for ; Thu, 21 Apr 2011 13:19:29 -0500 (CDT) X-Original-To: davinci-linux-open-source@linux.davincidsp.com Delivered-To: davinci-linux-open-source@linux.davincidsp.com Received: from dflp52.itg.ti.com (dflp52.itg.ti.com [128.247.22.96]) by linux.omap.com (Postfix) with ESMTP id E6C1E8062B for ; Thu, 21 Apr 2011 13:19:14 -0500 (CDT) Received: from white.ext.ti.com (localhost [127.0.0.1]) by dflp52.itg.ti.com (8.13.7/8.13.7) with ESMTP id p3LIJEhR002561 for ; Thu, 21 Apr 2011 13:19:14 -0500 (CDT) Received: from psmtp.com (na3sys009amx251.postini.com [74.125.149.135]) by white.ext.ti.com (8.13.7/8.13.7) with SMTP id p3LIJC88004558 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Thu, 21 Apr 2011 13:19:12 -0500 Received: from na3sys009aog103.obsmtp.com ([209.85.160.180]) (using TLSv1) by na3sys009amx251.postini.com ([74.125.148.10]) with SMTP; Thu, 21 Apr 2011 11:19:14 PDT Received: from mail-gy0-f180.google.com ([209.85.160.180]) (using TLSv1) by na3sys009aob103.postini.com ([74.125.148.12]) with SMTP ID DSNKTbB1IOA8it3KdS5JgR973kMDm81Zr/hu@postini.com; Thu, 21 Apr 2011 11:19:12 PDT Received: by gyf2 with SMTP id 2so894051gyf.11 for ; Thu, 21 Apr 2011 11:19:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nanometrics.ca; s=google; h=domainkey-signature:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references; bh=7CrEhAnP652L5qUY/fR/vCWLr2dpN/N5MULR6JE11kA=; b=go88Bly2eJASDTnjxeHT+0McYRlqe/8Cd3sJZjW+QfnU04Qz0kUv+RRIQS4dIwPnwg sotD3JBb4cxUwYgHB1w8F+joR+EdGvfTvviJVL9wC68L4se7/jCrPGNz4T07aUj87sRt p60WKsGBBPPAC96T2b3fmsrB9BRnMkAHNzWEc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=nanometrics.ca; s=google; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; b=PAXrUXzEebhEIR5QVVoCsaoEkLGNJkFN3UL9iLkM7+kbwoznWfDn+39SG6rQTaklUs OsXaliU5muOeFQ+8H8Rl4lNDmtqb3ITXB5fXuQd6l5GybkLq4KP5XOLGhf0nQj4F4+WN hAcbqPk8c1t4rGVAHVVUSWkZSHm/C6PM1EIa4= Received: by 10.236.156.168 with SMTP id m28mr299270yhk.299.1303409949925; Thu, 21 Apr 2011 11:19:09 -0700 (PDT) Received: from localhost.localdomain ([206.191.47.130]) by mx.google.com with ESMTPS id 13sm940691yhl.72.2011.04.21.11.19.08 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 21 Apr 2011 11:19:09 -0700 (PDT) From: Ben Gardiner To: Liam Girdwood , alsa-devel@alsa-project.org Subject: [PATCH 2/4] davinci-mcasp: use bitfield definitions for PDIR Date: Thu, 21 Apr 2011 14:19:02 -0400 Message-Id: <2541e7e4e115b2d54a1f785fc0f603b6a6e9a526.1303408522.git.bengardiner@nanometrics.ca> X-Mailer: git-send-email 1.7.1 In-Reply-To: References: X-pstn-neptune: 0/0/0.00/0 X-pstn-levels: (S:99.90000/99.90000 CV:99.9000 FC:95.5390 LC:95.5390 R:95.9108 P:95.9108 M:97.0282 C:98.6951 ) X-pstn-settings: 2 (0.5000:0.0750) s cv GT3 gt2 gt1 r p m c X-pstn-addresses: from [db-null] Cc: davinci-linux-open-source@linux.davincidsp.com, Takashi Iwai , Mark Brown , linux-kernel@vger.kernel.org, Jaroslav Kysela X-BeenThere: davinci-linux-open-source@linux.davincidsp.com X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: davinci-linux-open-source-bounces+patchwork-davinci=patchwork.kernel.org@linux.davincidsp.com Errors-To: davinci-linux-open-source-bounces+patchwork-davinci=patchwork.kernel.org@linux.davincidsp.com X-Greylist: Sender succeeded STARTTLS authentication, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Thu, 21 Apr 2011 18:19:53 +0000 (UTC) The current driver creates value for set/clr of PDIR using (x<<26) instead of the #defines that are convieniently made available. Update the driver to use the bitfield definitions of PDIR. There is no functional change introduced by this patch. Signed-off-by: Ben Gardiner Reviewed-by: James Nuss --- sound/soc/davinci/davinci-mcasp.c | 9 ++++++--- 1 files changed, 6 insertions(+), 3 deletions(-) diff --git a/sound/soc/davinci/davinci-mcasp.c b/sound/soc/davinci/davinci-mcasp.c index e595756..1aa24a1 100644 --- a/sound/soc/davinci/davinci-mcasp.c +++ b/sound/soc/davinci/davinci-mcasp.c @@ -434,7 +434,8 @@ static int davinci_mcasp_set_dai_fmt(struct snd_soc_dai *cpu_dai, mcasp_set_bits(base + DAVINCI_MCASP_ACLKRCTL_REG, ACLKRE); mcasp_set_bits(base + DAVINCI_MCASP_RXFMCTL_REG, AFSRE); - mcasp_set_bits(base + DAVINCI_MCASP_PDIR_REG, (0x7 << 26)); + mcasp_set_bits(base + DAVINCI_MCASP_PDIR_REG, + ACLKX | AHCLKX | AFSX); break; case SND_SOC_DAIFMT_CBM_CFS: /* codec is clock master and frame slave */ @@ -444,7 +445,8 @@ static int davinci_mcasp_set_dai_fmt(struct snd_soc_dai *cpu_dai, mcasp_set_bits(base + DAVINCI_MCASP_ACLKRCTL_REG, ACLKRE); mcasp_set_bits(base + DAVINCI_MCASP_RXFMCTL_REG, AFSRE); - mcasp_set_bits(base + DAVINCI_MCASP_PDIR_REG, (0x2d << 26)); + mcasp_set_bits(base + DAVINCI_MCASP_PDIR_REG, + ACLKX | AFSX | ACLKR | AFSR); break; case SND_SOC_DAIFMT_CBM_CFM: /* codec is clock and frame master */ @@ -454,7 +456,8 @@ static int davinci_mcasp_set_dai_fmt(struct snd_soc_dai *cpu_dai, mcasp_clr_bits(base + DAVINCI_MCASP_ACLKRCTL_REG, ACLKRE); mcasp_clr_bits(base + DAVINCI_MCASP_RXFMCTL_REG, AFSRE); - mcasp_clr_bits(base + DAVINCI_MCASP_PDIR_REG, (0x3f << 26)); + mcasp_clr_bits(base + DAVINCI_MCASP_PDIR_REG, + ACLKX | AHCLKX | AFSX | ACLKR | AHCLKR | AFSR); break; default: