From patchwork Fri Jan 15 00:19:06 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Hilman X-Patchwork-Id: 73040 X-Patchwork-Delegate: paul@pwsan.com 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 o0F0JGnA002454 for ; Fri, 15 Jan 2010 00:19:17 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757753Ab0AOATQ (ORCPT ); Thu, 14 Jan 2010 19:19:16 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1757732Ab0AOATQ (ORCPT ); Thu, 14 Jan 2010 19:19:16 -0500 Received: from mail-iw0-f194.google.com ([209.85.223.194]:47830 "EHLO mail-iw0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757407Ab0AOATP (ORCPT ); Thu, 14 Jan 2010 19:19:15 -0500 Received: by iwn32 with SMTP id 32so192129iwn.33 for ; Thu, 14 Jan 2010 16:19:14 -0800 (PST) Received: by 10.231.161.138 with SMTP id r10mr562560ibx.34.1263514753897; Thu, 14 Jan 2010 16:19:13 -0800 (PST) Received: from localhost (deeprootsystems.com [216.254.16.51]) by mx.google.com with ESMTPS id 21sm969663iwn.2.2010.01.14.16.19.13 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 14 Jan 2010 16:19:13 -0800 (PST) To: Paul Walmsley Cc: linux-omap@vger.kernel.org Subject: Re: [PATCH 2/3] OMAP: hwmod: add read/write API for SYSCONFIG References: <1262993213-19866-1-git-send-email-khilman@deeprootsystems.com> <1262993213-19866-2-git-send-email-khilman@deeprootsystems.com> <1262993213-19866-3-git-send-email-khilman@deeprootsystems.com> From: Kevin Hilman Organization: Deep Root Systems, LLC Date: Thu, 14 Jan 2010 16:19:06 -0800 In-Reply-To: (Paul Walmsley's message of "Wed\, 13 Jan 2010 18\:26\:04 -0700 \(MST\)") Message-ID: <877hrk5if9.fsf@deeprootsystems.com> User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux) MIME-Version: 1.0 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c index d8c8545..3bc47dc 100644 --- a/arch/arm/mach-omap2/omap_hwmod.c +++ b/arch/arm/mach-omap2/omap_hwmod.c @@ -993,6 +993,23 @@ void omap_hwmod_writel(u32 v, struct omap_hwmod *oh, u16 reg_offs) __raw_writel(v, oh->_rt_va + reg_offs); } +int omap_hwmod_set_slave_idlemode(struct omap_hwmod *oh, u8 idlemode) +{ + u32 v; + int retval = 0; + + if (!oh) + return -EINVAL; + + v = oh->_sysc_cache; + + retval = _set_slave_idlemode(oh, idlemode, &v); + if (!retval) + _write_sysconfig(v, oh); + + return retval; +} + /** * omap_hwmod_register - register a struct omap_hwmod * @oh: struct omap_hwmod * diff --git a/arch/arm/plat-omap/include/plat/omap_hwmod.h b/arch/arm/plat-omap/include/plat/omap_hwmod.h index 007935a..1f57330 100644 --- a/arch/arm/plat-omap/include/plat/omap_hwmod.h +++ b/arch/arm/plat-omap/include/plat/omap_hwmod.h @@ -440,6 +440,8 @@ int omap_hwmod_shutdown(struct omap_hwmod *oh); int omap_hwmod_enable_clocks(struct omap_hwmod *oh); int omap_hwmod_disable_clocks(struct omap_hwmod *oh); +int omap_hwmod_set_slave_idlemode(struct omap_hwmod *oh, u8 idlemode); + int omap_hwmod_reset(struct omap_hwmod *oh); void omap_hwmod_ocp_barrier(struct omap_hwmod *oh);