From patchwork Mon Jan 7 02:56:14 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joseph Lo X-Patchwork-Id: 209846 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3512A2C007C for ; Mon, 7 Jan 2013 13:57:10 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753307Ab3AGC5H (ORCPT ); Sun, 6 Jan 2013 21:57:07 -0500 Received: from [216.228.121.140] ([216.228.121.140]:2566 "EHLO hqemgate03.nvidia.com" rhost-flags-FAIL-FAIL-OK-OK) by vger.kernel.org with ESMTP id S1753285Ab3AGC5H (ORCPT ); Sun, 6 Jan 2013 21:57:07 -0500 Received: from hqnvupgp08.nvidia.com (Not Verified[216.228.121.13]) by hqemgate03.nvidia.com id ; Sun, 06 Jan 2013 19:00:24 -0800 Received: from hqemhub02.nvidia.com ([172.17.108.22]) by hqnvupgp08.nvidia.com (PGP Universal service); Sun, 06 Jan 2013 18:56:27 -0800 X-PGP-Universal: processed; by hqnvupgp08.nvidia.com on Sun, 06 Jan 2013 18:56:27 -0800 Received: from jlo-ubuntu-64.nvidia.com (172.20.144.16) by hqemhub02.nvidia.com (172.20.150.31) with Microsoft SMTP Server (TLS) id 8.3.279.1; Sun, 6 Jan 2013 18:56:26 -0800 From: Joseph Lo To: Stephen Warren CC: , , Joseph Lo Subject: [PATCH] ARM: tegra30: make the wait time of CPU power up to proportional to HZ Date: Mon, 7 Jan 2013 10:56:14 +0800 Message-ID: <1357527374-31055-1-git-send-email-josephl@nvidia.com> X-Mailer: git-send-email 1.8.0.3 X-NVConfidentiality: public MIME-Version: 1.0 Sender: linux-tegra-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-tegra@vger.kernel.org It would rather to use the API of time_to_jiffies than a constant number of jiffies for the wait time of CPU power up. Based on the work by: Sang-Hun Lee Signed-off-by: Joseph Lo --- arch/arm/mach-tegra/platsmp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-tegra/platsmp.c b/arch/arm/mach-tegra/platsmp.c index 60daf9f..6867030 100644 --- a/arch/arm/mach-tegra/platsmp.c +++ b/arch/arm/mach-tegra/platsmp.c @@ -90,7 +90,7 @@ static int tegra30_power_up_cpu(unsigned int cpu) * next time around. */ if (cpumask_test_cpu(cpu, &tegra_cpu_init_mask)) { - timeout = jiffies + 5*HZ; + timeout = jiffies + msecs_to_jiffies(50); do { if (!tegra_powergate_is_powered(pwrgateid)) goto remove_clamps; @@ -110,7 +110,7 @@ static int tegra30_power_up_cpu(unsigned int cpu) return ret; /* Wait for the power to come up. */ - timeout = jiffies + 10*HZ; + timeout = jiffies + msecs_to_jiffies(100); while (tegra_powergate_is_powered(pwrgateid)) { if (time_after(jiffies, timeout)) return -ETIMEDOUT;