From patchwork Tue Aug 7 22:28:36 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rafael Wysocki X-Patchwork-Id: 1293351 Return-Path: X-Original-To: patchwork-linux-sh@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 83AD33FCFC for ; Wed, 8 Aug 2012 09:03:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964814Ab2HHJBx (ORCPT ); Wed, 8 Aug 2012 05:01:53 -0400 Received: from ogre.sisk.pl ([193.178.161.156]:48333 "EHLO ogre.sisk.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757894Ab2HHJBK (ORCPT ); Wed, 8 Aug 2012 05:01:10 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by ogre.sisk.pl (Postfix) with ESMTP id 042341DB93C; Wed, 8 Aug 2012 10:50:46 +0200 (CEST) Received: from ogre.sisk.pl ([127.0.0.1]) by localhost (ogre.sisk.pl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 14287-01; Wed, 8 Aug 2012 10:50:25 +0200 (CEST) Received: from ferrari.rjw.lan (62-121-64-87.home.aster.pl [62.121.64.87]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ogre.sisk.pl (Postfix) with ESMTP id 1E4291DBA1F; Wed, 8 Aug 2012 10:50:25 +0200 (CEST) From: "Rafael J. Wysocki" To: "Linux-sh list" Subject: [PATCH 3/4] PM / shmobile: Specify device latencies for SH7372 devices directly Date: Wed, 8 Aug 2012 00:28:36 +0200 User-Agent: KMail/1.13.6 (Linux/3.5.0+; KDE/4.6.0; x86_64; ; ) Cc: Linux PM list , LKML , Magnus Damm References: <201207212349.18294.rjw@sisk.pl> <201208080026.01738.rjw@sisk.pl> In-Reply-To: <201208080026.01738.rjw@sisk.pl> MIME-Version: 1.0 Message-Id: <201208080028.36688.rjw@sisk.pl> X-Virus-Scanned: amavisd-new at ogre.sisk.pl using MkS_Vir for Linux Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org The results of adaptive latency computations in GENPD_DEV_TIMED_CALLBACK() show that the start/stop and save/restore state latencies of all devices on SH7372 I have tried are a little below 250 us. Therefore, if the 250 us is used as the common initial value of the latency fields in struct gpd_timing_data for all devices on SH7372, the latency values will never have to change at run time and there won't be any overhead related to re-computation of the corresponding PM QoS data. Signed-off-by: Rafael J. Wysocki --- arch/arm/mach-shmobile/setup-sh7372.c | 57 +++++++++++++++++++--------------- 1 file changed, 33 insertions(+), 24 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-sh" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Index: linux/arch/arm/mach-shmobile/setup-sh7372.c =================================================================== --- linux.orig/arch/arm/mach-shmobile/setup-sh7372.c +++ linux/arch/arm/mach-shmobile/setup-sh7372.c @@ -999,8 +999,17 @@ static struct platform_device *sh7372_la &spu1_device, }; +#define DEV_LATENCY_NS 250000 + void __init sh7372_add_standard_devices(void) { + struct gpd_timing_data latencies = { + .stop_latency_ns = DEV_LATENCY_NS, + .start_latency_ns = DEV_LATENCY_NS, + .save_state_latency_ns = DEV_LATENCY_NS, + .restore_state_latency_ns = DEV_LATENCY_NS, + }; + sh7372_init_pm_domains(); platform_add_devices(sh7372_early_devices, @@ -1009,30 +1018,30 @@ void __init sh7372_add_standard_devices( platform_add_devices(sh7372_late_devices, ARRAY_SIZE(sh7372_late_devices)); - rmobile_add_device_to_domain("A3RV", &vpu_device); - rmobile_add_device_to_domain("A4MP", &spu0_device); - rmobile_add_device_to_domain("A4MP", &spu1_device); - rmobile_add_device_to_domain("A3SP", &scif0_device); - rmobile_add_device_to_domain("A3SP", &scif1_device); - rmobile_add_device_to_domain("A3SP", &scif2_device); - rmobile_add_device_to_domain("A3SP", &scif3_device); - rmobile_add_device_to_domain("A3SP", &scif4_device); - rmobile_add_device_to_domain("A3SP", &scif5_device); - rmobile_add_device_to_domain("A3SP", &scif6_device); - rmobile_add_device_to_domain("A3SP", &iic1_device); - rmobile_add_device_to_domain("A3SP", &dma0_device); - rmobile_add_device_to_domain("A3SP", &dma1_device); - rmobile_add_device_to_domain("A3SP", &dma2_device); - rmobile_add_device_to_domain("A3SP", &usb_dma0_device); - rmobile_add_device_to_domain("A3SP", &usb_dma1_device); - rmobile_add_device_to_domain("A4R", &iic0_device); - rmobile_add_device_to_domain("A4R", &veu0_device); - rmobile_add_device_to_domain("A4R", &veu1_device); - rmobile_add_device_to_domain("A4R", &veu2_device); - rmobile_add_device_to_domain("A4R", &veu3_device); - rmobile_add_device_to_domain("A4R", &jpu_device); - rmobile_add_device_to_domain("A4R", &tmu00_device); - rmobile_add_device_to_domain("A4R", &tmu01_device); + rmobile_add_device_to_domain_td("A3RV", &vpu_device, &latencies); + rmobile_add_device_to_domain_td("A4MP", &spu0_device, &latencies); + rmobile_add_device_to_domain_td("A4MP", &spu1_device, &latencies); + rmobile_add_device_to_domain_td("A3SP", &scif0_device, &latencies); + rmobile_add_device_to_domain_td("A3SP", &scif1_device, &latencies); + rmobile_add_device_to_domain_td("A3SP", &scif2_device, &latencies); + rmobile_add_device_to_domain_td("A3SP", &scif3_device, &latencies); + rmobile_add_device_to_domain_td("A3SP", &scif4_device, &latencies); + rmobile_add_device_to_domain_td("A3SP", &scif5_device, &latencies); + rmobile_add_device_to_domain_td("A3SP", &scif6_device, &latencies); + rmobile_add_device_to_domain_td("A3SP", &iic1_device, &latencies); + rmobile_add_device_to_domain_td("A3SP", &dma0_device, &latencies); + rmobile_add_device_to_domain_td("A3SP", &dma1_device, &latencies); + rmobile_add_device_to_domain_td("A3SP", &dma2_device, &latencies); + rmobile_add_device_to_domain_td("A3SP", &usb_dma0_device, &latencies); + rmobile_add_device_to_domain_td("A3SP", &usb_dma1_device, &latencies); + rmobile_add_device_to_domain_td("A4R", &iic0_device, &latencies); + rmobile_add_device_to_domain_td("A4R", &veu0_device, &latencies); + rmobile_add_device_to_domain_td("A4R", &veu1_device, &latencies); + rmobile_add_device_to_domain_td("A4R", &veu2_device, &latencies); + rmobile_add_device_to_domain_td("A4R", &veu3_device, &latencies); + rmobile_add_device_to_domain_td("A4R", &jpu_device, &latencies); + rmobile_add_device_to_domain_td("A4R", &tmu00_device, &latencies); + rmobile_add_device_to_domain_td("A4R", &tmu01_device, &latencies); } static void __init sh7372_earlytimer_init(void)