From patchwork Fri Jan 8 01:00:26 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: omar ramirez X-Patchwork-Id: 71694 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.2) with ESMTP id o080pFVm009202 for ; Fri, 8 Jan 2010 00:51:33 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754478Ab0AHAvT (ORCPT ); Thu, 7 Jan 2010 19:51:19 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754467Ab0AHAvT (ORCPT ); Thu, 7 Jan 2010 19:51:19 -0500 Received: from bear.ext.ti.com ([192.94.94.41]:41952 "EHLO bear.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754463Ab0AHAvS (ORCPT ); Thu, 7 Jan 2010 19:51:18 -0500 Received: from dlep36.itg.ti.com ([157.170.170.91]) by bear.ext.ti.com (8.13.7/8.13.7) with ESMTP id o080pEak005205 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 7 Jan 2010 18:51:14 -0600 Received: from legion.dal.design.ti.com (localhost [127.0.0.1]) by dlep36.itg.ti.com (8.13.8/8.13.8) with ESMTP id o080pE66022964; Thu, 7 Jan 2010 18:51:14 -0600 (CST) Received: from Matrix (matrix.am.dhcp.ti.com [128.247.75.166]) by legion.dal.design.ti.com (8.11.7p1+Sun/8.11.7) with ESMTP id o080pDZ11776; Thu, 7 Jan 2010 18:51:14 -0600 (CST) Received: by Matrix (Postfix, from userid 1003) id 856E041014F; Thu, 7 Jan 2010 19:00:26 -0600 (CST) From: Omar Ramirez Luna To: linux-omap Cc: Hiroshi Doyu , Ameya Palande , Felipe Contreras , Fernando Guzman , Ernesto Ramos , Omar Ramirez Luna Subject: [PATCH 1/8] DSPBRIDGE: Cleanup SSI handling - remove IO_ADDRESS Date: Thu, 7 Jan 2010 19:00:26 -0600 Message-Id: <1262912426-29974-1-git-send-email-omar.ramirez@ti.com> X-Mailer: git-send-email 1.5.4.3 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org diff --git a/arch/arm/plat-omap/include/dspbridge/drv.h b/arch/arm/plat-omap/include/dspbridge/drv.h index d14613f..59c26fc 100644 --- a/arch/arm/plat-omap/include/dspbridge/drv.h +++ b/arch/arm/plat-omap/include/dspbridge/drv.h @@ -115,6 +115,13 @@ #define OMAP_DMMU_BASE 0x5D000000 #define OMAP_DMMU_SIZE 0x1000 +#define OMAP_SSI_BASE 0x48058000 +#define OMAP_SSI_SIZE 0x1000 + +#define SSI_AUTOIDLE (1 << 0) +#define SSI_SIDLE_SMARTIDLE (2 << 3) +#define SSI_MIDLE_NOIDLE (1 << 12) + #define OMAP_PRCM_VDD1_DOMAIN 1 #define OMAP_PRCM_VDD2_DOMAIN 2 diff --git a/drivers/dsp/bridge/services/clk.c b/drivers/dsp/bridge/services/clk.c index d1c68fc..dbe3988 100644 --- a/drivers/dsp/bridge/services/clk.c +++ b/drivers/dsp/bridge/services/clk.c @@ -39,6 +39,7 @@ #include #include #include +#include /* ----------------------------------- Trace & Debug */ #include @@ -54,11 +55,6 @@ typedef volatile unsigned long REG_UWORD32; -#define SSI_Base 0x48058000 - -#define SSI_BASE IO_ADDRESS(SSI_Base) - - struct SERVICES_Clk_t { struct clk *clk_handle; const char *clk_name; @@ -354,19 +350,25 @@ s32 CLK_Get_UseCnt(IN enum SERVICES_ClkId clk_id) void SSI_Clk_Prepare(bool FLAG) { - u32 ssi_sysconfig; - ssi_sysconfig = __raw_readl((SSI_BASE) + 0x10); + void __iomem *ssi_base; + unsigned int value; + + ssi_base = ioremap(OMAP_SSI_BASE, OMAP_SSI_SIZE); if (FLAG) { - /* Set Autoidle, SIDLEMode to smart idle, and MIDLEmode to - * no idle + /* + * Set Autoidle, SIDLEMode to smart idle, and MIDLEmode to + * no idle. */ - ssi_sysconfig = 0x1011; + value = SSI_AUTOIDLE | SSI_SIDLE_SMARTIDLE | SSI_MIDLE_NOIDLE; } else { - /* Set Autoidle, SIDLEMode to forced idle, and MIDLEmode to - * forced idle + /* + * Set Autoidle, SIDLEMode to forced idle, and MIDLEmode to + * forced idle. */ - ssi_sysconfig = 0x1; + value = SSI_AUTOIDLE; } - __raw_writel((u32)ssi_sysconfig, SSI_BASE + 0x10); + + __raw_writel(value, ssi_base + 0x10); + iounmap(ssi_base); }