From patchwork Wed Jul 25 11:05:19 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konstantin Baydarov X-Patchwork-Id: 1236431 Return-Path: X-Original-To: patchwork-linux-omap@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 3D1E43FDFB for ; Wed, 25 Jul 2012 11:05:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755030Ab2GYLFW (ORCPT ); Wed, 25 Jul 2012 07:05:22 -0400 Received: from mail.dev.rtsoft.ru ([213.79.90.226]:58838 "HELO mail.dev.rtsoft.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1754155Ab2GYLFV (ORCPT ); Wed, 25 Jul 2012 07:05:21 -0400 Received: (qmail 12695 invoked from network); 25 Jul 2012 11:05:14 -0000 Received: from unknown (HELO kbaidarov.dev.rtsoft.ru) (192.168.1.70) by 0 with SMTP; 25 Jul 2012 11:05:14 -0000 Message-ID: <500FD2EF.4010304@dev.rtsoft.ru> Date: Wed, 25 Jul 2012 15:05:19 +0400 From: Konstantin Baydarov User-Agent: Mozilla/5.0 (X11; Linux i686; rv:12.0) Gecko/20120430 Thunderbird/12.0.1 MIME-Version: 1.0 To: b-cousson@ti.com, kishon@ti.com, santosh.shilimkar@ti.com, tony@atomide.com, paul@pwsan.com CC: balbi@ti.com, amit.kucheria@linaro.org, linux-pm@lists.linux-foundation.org, linux-arm-kernel@lists.infradead.org, linux-omap@vger.kernel.org, amit.kachhap@linaro.org, Eduardo Valentin Subject: [PATCH v4 3/4] OMAP2+: use control module mfd driver in omap_type Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org OMAP system control module can be probed early, then omap_type is safe to use its APIs. TODO: add support for other omap versions Signed-off-by: Eduardo Valentin Signed-off-by: Konstantin Baydarov --- arch/arm/mach-omap2/id.c | 11 ++++++----- 1 files changed, 6 insertions(+), 5 deletions(-) diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c index 40373db..8018cad 100644 --- a/arch/arm/mach-omap2/id.c +++ b/arch/arm/mach-omap2/id.c @@ -18,6 +18,7 @@ #include #include #include +#include #include @@ -43,15 +44,15 @@ int omap_type(void) u32 val = 0; if (cpu_is_omap24xx()) { - val = omap_ctrl_readl(OMAP24XX_CONTROL_STATUS); + val = omap_control_status_read(); } else if (soc_is_am33xx()) { - val = omap_ctrl_readl(AM33XX_CONTROL_STATUS); + val = omap_control_status_read(); } else if (cpu_is_omap34xx()) { - val = omap_ctrl_readl(OMAP343X_CONTROL_STATUS); + val = omap_control_status_read(); } else if (cpu_is_omap44xx()) { - val = omap_ctrl_readl(OMAP4_CTRL_MODULE_CORE_STATUS); + val = omap_control_status_read(); } else if (soc_is_omap54xx()) { - val = omap_ctrl_readl(OMAP5XXX_CONTROL_STATUS); + val = omap_control_status_read(); val &= OMAP5_DEVICETYPE_MASK; val >>= 6; goto out;