From patchwork Mon Sep 27 14:50:06 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Govindraj.R" X-Patchwork-Id: 212702 X-Patchwork-Delegate: khilman@deeprootsystems.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 o8REnp2b032659 for ; Mon, 27 Sep 2010 14:50:18 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759481Ab0I0OuR (ORCPT ); Mon, 27 Sep 2010 10:50:17 -0400 Received: from comal.ext.ti.com ([198.47.26.152]:35036 "EHLO comal.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756287Ab0I0OuQ (ORCPT ); Mon, 27 Sep 2010 10:50:16 -0400 Received: from dlep35.itg.ti.com ([157.170.170.118]) by comal.ext.ti.com (8.13.7/8.13.7) with ESMTP id o8REo8lP019074 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 27 Sep 2010 09:50:08 -0500 Received: from dbdmail.itg.ti.com (localhost [127.0.0.1]) by dlep35.itg.ti.com (8.13.7/8.13.7) with ESMTP id o8REo4Tr007071; Mon, 27 Sep 2010 09:50:05 -0500 (CDT) Received: from 10.24.255.17 (SquirrelMail authenticated user x0100947); by dbdmail.itg.ti.com with HTTP; Mon, 27 Sep 2010 20:20:06 +0530 (IST) Message-ID: <43583.10.24.255.17.1285599006.squirrel@dbdmail.itg.ti.com> Date: Mon, 27 Sep 2010 20:20:06 +0530 (IST) Subject: [PATCH 06/13 v3] OMAP: UART: use non-locking versions of hwmod enable/idle functions From: "Govindraj.R" To: linux-omap@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org, linux-serial@vger.kernel.org, "Kevin Hilman" , "Tony Lindgren" User-Agent: SquirrelMail/1.4.3a X-Mailer: SquirrelMail/1.4.3a MIME-Version: 1.0 X-Priority: 3 (Normal) Importance: Normal 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, 27 Sep 2010 14:50:18 +0000 (UTC) diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c index ff83e91..72b5c98 100644 --- a/arch/arm/mach-omap2/serial.c +++ b/arch/arm/mach-omap2/serial.c @@ -105,10 +105,29 @@ struct omap_uart_state { static LIST_HEAD(uart_list); static u8 num_uarts; +/* + * Since these idle/enable hooks are used in the idle path itself + * which has interrupts disabled, use the non-locking versions of + * the hwmod enable/disable functions. + */ +static int uart_idle_hwmod(struct omap_device *od) +{ + _omap_hwmod_idle(od->hwmods[0]); + + return 0; +} + +static int uart_enable_hwmod(struct omap_device *od) +{ + _omap_hwmod_enable(od->hwmods[0]); + + return 0; +} + static struct omap_device_pm_latency omap_uart_latency[] = { { - .deactivate_func = omap_device_idle_hwmods, - .activate_func = omap_device_enable_hwmods, + .deactivate_func = uart_idle_hwmod, + .activate_func = uart_enable_hwmod, .flags = OMAP_DEVICE_LATENCY_AUTO_ADJUST, }, };