From patchwork Fri Dec 10 23:45:42 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: omar ramirez X-Patchwork-Id: 399832 X-Patchwork-Delegate: paul@pwsan.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 oBANunkm004464 for ; Fri, 10 Dec 2010 23:56:49 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756378Ab0LJX4s (ORCPT ); Fri, 10 Dec 2010 18:56:48 -0500 Received: from devils.ext.ti.com ([198.47.26.153]:37746 "EHLO devils.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754959Ab0LJX4s (ORCPT ); Fri, 10 Dec 2010 18:56:48 -0500 Received: from dlep36.itg.ti.com ([157.170.170.91]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id oBANua24008963 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 10 Dec 2010 17:56:36 -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 oBANua7r010887; Fri, 10 Dec 2010 17:56:36 -0600 (CST) Received: from localhost (bacab.am.dhcp.ti.com [128.247.77.143]) by legion.dal.design.ti.com (8.11.7p1+Sun/8.11.7) with ESMTP id oBANuaf26601; Fri, 10 Dec 2010 17:56:36 -0600 (CST) From: Omar Ramirez Luna To: Tony Lindgren , Paul Walmsley , Kevin Hilman Cc: Russell King , Omar Ramirez Luna , linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH] OMAP: omap_device: use pdev as parameter to get rt_va Date: Fri, 10 Dec 2010 17:45:42 -0600 Message-Id: <1292024742-27319-1-git-send-email-omar.ramirez@ti.com> X-Mailer: git-send-email 1.7.1 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]); Fri, 10 Dec 2010 23:56:49 +0000 (UTC) diff --git a/arch/arm/plat-omap/include/plat/omap_device.h b/arch/arm/plat-omap/include/plat/omap_device.h index 28e2d1a..1877c1a 100644 --- a/arch/arm/plat-omap/include/plat/omap_device.h +++ b/arch/arm/plat-omap/include/plat/omap_device.h @@ -80,6 +80,7 @@ struct omap_device { int omap_device_enable(struct platform_device *pdev); int omap_device_idle(struct platform_device *pdev); int omap_device_shutdown(struct platform_device *pdev); +void __iomem *omap_device_get_rt_va(struct platform_device *pdev); /* Core code interface */ @@ -101,8 +102,6 @@ struct omap_device *omap_device_build_ss(const char *pdev_name, int pdev_id, int omap_device_register(struct omap_device *od); int omap_early_device_register(struct omap_device *od); -void __iomem *omap_device_get_rt_va(struct omap_device *od); - /* OMAP PM interface */ int omap_device_align_pm_lat(struct platform_device *pdev, u32 new_wakeup_lat_limit); diff --git a/arch/arm/plat-omap/omap_device.c b/arch/arm/plat-omap/omap_device.c index abe933c..9d11195 100644 --- a/arch/arm/plat-omap/omap_device.c +++ b/arch/arm/plat-omap/omap_device.c @@ -681,7 +681,7 @@ struct powerdomain *omap_device_get_pwrdm(struct omap_device *od) /** * omap_device_get_mpu_rt_va - return the MPU's virtual addr for the hwmod base - * @od: struct omap_device * + * @pdev: struct platform_device * * * Return the MPU's virtual address for the base of the hwmod, from * the ioremap() that the hwmod code does. Only valid if there is one @@ -690,8 +690,12 @@ struct powerdomain *omap_device_get_pwrdm(struct omap_device *od) * otherwise, passes along the return value from * omap_hwmod_get_mpu_rt_va(). */ -void __iomem *omap_device_get_rt_va(struct omap_device *od) +void __iomem *omap_device_get_rt_va(struct platform_device *pdev) { + struct omap_device *od; + + od = _find_by_pdev(pdev); + if (od->hwmods_cnt != 1) return NULL;