From patchwork Wed Oct 3 23:00:28 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Hilman X-Patchwork-Id: 1543771 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 2C072DFFEE for ; Wed, 3 Oct 2012 23:01:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932450Ab2JCXBd (ORCPT ); Wed, 3 Oct 2012 19:01:33 -0400 Received: from mail-da0-f46.google.com ([209.85.210.46]:47064 "EHLO mail-da0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932466Ab2JCXAi (ORCPT ); Wed, 3 Oct 2012 19:00:38 -0400 Received: by mail-da0-f46.google.com with SMTP id n41so1430950dak.19 for ; Wed, 03 Oct 2012 16:00:38 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=jd93FhskqzUZkiSduuhBosr8e5+r043aiz4Qb3p6x5Y=; b=RYjLzZiNhM0piilfY/7tz6kXraI8geHMwxzV2kEMphtt2NQUCY80gs99QgeCE65hJ8 wKefLr7+4EALpo7tmPvKsj6G9OH4oXfh9CWRujpK+M91z4Q+V4uJcRbPApU2x6yv3suD OjMA8HD2msWOs/qWDpcYRRgNgBNGnV5aJcdE1VjKim6fCFJQTuqU2eYxvizQ0pBoJJMk ZF1d52sfaiIaLEaCfMCYfprSMUBcMJdahPYR1AiN0OqIOa9GUqgdlAcL3mrfp023J7k7 gaHpRLayzgKdPFvm9EY414bb3VBRFImpVHPpE8agEVbo04KZOfMA5JuV1HXk/bAnrdtM iPgQ== Received: by 10.68.129.5 with SMTP id ns5mr16440999pbb.103.1349305238266; Wed, 03 Oct 2012 16:00:38 -0700 (PDT) Received: from localhost (c-24-19-7-36.hsd1.wa.comcast.net. [24.19.7.36]) by mx.google.com with ESMTPS id st6sm3255346pbc.58.2012.10.03.16.00.37 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 03 Oct 2012 16:00:37 -0700 (PDT) From: Kevin Hilman To: "Rafael J. Wysocki" , linux-omap@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org, linux-pm@vger.kernel.org Subject: [PATCH 3/4] cpufreq: OMAP: fix clock usage to be SoC independent, remove plat/ includes Date: Wed, 3 Oct 2012 16:00:28 -0700 Message-Id: <1349305229-28480-4-git-send-email-khilman@deeprootsystems.com> X-Mailer: git-send-email 1.7.9.2 In-Reply-To: <1349305229-28480-1-git-send-email-khilman@deeprootsystems.com> References: <1349305229-28480-1-git-send-email-khilman@deeprootsystems.com> X-Gm-Message-State: ALoCoQkElpVOyax99eET7Ed+lE9nHAuyI3hYRRiXE2RF0RJfFJ/5V/ccExmJuMOlYk7pasTMHpNe Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org From: Paul Walmsley OMAP core code now has SoC-independent clock alias for the scalable CPU clock. Using it means driver is SoC independent and will work for AM3xxx SoCs as well as OMAP1/3/4. While here, remove some unnecessary plat/ includes that are interfering with multi-subarch ARM kernels. Signed-off-by: Paul Walmsley Cc: Rafael J. Wysocki [tony@atomide.com: updated already changed clock aliases] Signed-off-by: Tony Lindgren [khilman@ti.com: minor shortlog/changelog updates] Signed-off-by: Kevin Hilman --- drivers/cpufreq/omap-cpufreq.c | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/drivers/cpufreq/omap-cpufreq.c b/drivers/cpufreq/omap-cpufreq.c index 7d4d455..5d1f5e4 100644 --- a/drivers/cpufreq/omap-cpufreq.c +++ b/drivers/cpufreq/omap-cpufreq.c @@ -30,19 +30,14 @@ #include #include -#include -#include #include -#include - /* OPP tolerance in percentage */ #define OPP_TOLERANCE 4 static struct cpufreq_frequency_table *freq_table; static atomic_t freq_table_users = ATOMIC_INIT(0); static struct clk *mpu_clk; -static char *mpu_clk_name; static struct device *mpu_dev; static struct regulator *mpu_reg; @@ -179,7 +174,7 @@ static int __cpuinit omap_cpu_init(struct cpufreq_policy *policy) { int result = 0; - mpu_clk = clk_get(NULL, mpu_clk_name); + mpu_clk = clk_get(NULL, "cpufreq_ck"); if (IS_ERR(mpu_clk)) return PTR_ERR(mpu_clk); @@ -260,18 +255,6 @@ static struct cpufreq_driver omap_driver = { static int __init omap_cpufreq_init(void) { - if (cpu_is_omap24xx()) - mpu_clk_name = "virt_prcm_set"; - else if (cpu_is_omap34xx()) - mpu_clk_name = "dpll1_ck"; - else if (cpu_is_omap44xx()) - mpu_clk_name = "dpll_mpu_ck"; - - if (!mpu_clk_name) { - pr_err("%s: unsupported Silicon?\n", __func__); - return -EINVAL; - } - mpu_dev = omap_device_get_by_hwmod_name("mpu"); if (IS_ERR(mpu_dev)) { pr_warning("%s: unable to get the mpu device\n", __func__);