From patchwork Mon Dec 20 22:05:19 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tarun Kanti DebBarma X-Patchwork-Id: 419691 X-Patchwork-Delegate: tony@atomide.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id oBKB25QZ009977 for ; Mon, 20 Dec 2010 11:02:05 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755555Ab0LTLCD (ORCPT ); Mon, 20 Dec 2010 06:02:03 -0500 Received: from bear.ext.ti.com ([192.94.94.41]:57846 "EHLO bear.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755442Ab0LTLCA (ORCPT ); Mon, 20 Dec 2010 06:02:00 -0500 Received: from dbdp31.itg.ti.com ([172.24.170.98]) by bear.ext.ti.com (8.13.7/8.13.7) with ESMTP id oBKB1vUP009977 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Mon, 20 Dec 2010 05:01:59 -0600 Received: from localhost.localdomain (localhost [127.0.0.1]) by dbdp31.itg.ti.com (8.13.8/8.13.8) with ESMTP id oBKB1qtG025141; Mon, 20 Dec 2010 16:31:56 +0530 (IST) From: Tarun Kanti DebBarma To: linux-omap@vger.kernel.org Cc: Tarun Kanti DebBarma Subject: [PATCH v7 12/12] OMAP2: dmtimer: set wakeup enable explicitly in plat Date: Tue, 21 Dec 2010 03:35:19 +0530 Message-Id: <1292882719-30255-13-git-send-email-tarun.kanti@ti.com> X-Mailer: git-send-email 1.6.0.4 In-Reply-To: <1292882719-30255-1-git-send-email-tarun.kanti@ti.com> References: <1292882719-30255-1-git-send-email-tarun.kanti@ti.com> Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Mon, 20 Dec 2010 11:02:05 +0000 (UTC) diff --git a/arch/arm/plat-omap/dmtimer.c b/arch/arm/plat-omap/dmtimer.c index f4aa4a1..007b754 100644 --- a/arch/arm/plat-omap/dmtimer.c +++ b/arch/arm/plat-omap/dmtimer.c @@ -227,6 +227,7 @@ static void omap_dm_timer_write_reg(struct omap_dm_timer *timer, u32 reg, static void omap_dm_timer_prepare(struct omap_dm_timer *timer) { + u32 l; struct dmtimer_platform_data *pdata = timer->pdev->dev.platform_data; if (!pdata->is_omap16xx) { @@ -243,6 +244,18 @@ static void omap_dm_timer_prepare(struct omap_dm_timer *timer) if (pdata->dm_timer_reset) pdata->dm_timer_reset(timer); + /* + * Enable wake-up on OMAP2420, OMAP2430 CPUs. + * FIXME: SYSC_HAS_ENAWAKEUP flag is already set in hwmod database. + * But the setting does not seem to work. Need to investigate why + * this is happening. + */ + if (cpu_is_omap2430() || cpu_is_omap2420()) { + l = omap_dm_timer_read_reg(timer, OMAP_TIMER_OCP_CFG_REG); + l |= 1 << 2; + omap_dm_timer_write_reg(timer, OMAP_TIMER_OCP_CFG_REG, l); + } + omap_dm_timer_set_source(timer, OMAP_TIMER_SRC_32_KHZ); /* Match hardware reset default of posted mode */