From patchwork Fri Aug 14 12:34:08 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tero Kristo X-Patchwork-Id: 7014621 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id F2FC49F358 for ; Fri, 14 Aug 2015 12:33:34 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 03C822060C for ; Fri, 14 Aug 2015 12:33:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 69A46207DA for ; Fri, 14 Aug 2015 12:33:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754747AbbHNMdZ (ORCPT ); Fri, 14 Aug 2015 08:33:25 -0400 Received: from devils.ext.ti.com ([198.47.26.153]:41912 "EHLO devils.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754158AbbHNMdY (ORCPT ); Fri, 14 Aug 2015 08:33:24 -0400 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id t7ECXLnf025691; Fri, 14 Aug 2015 07:33:21 -0500 Received: from DLEE70.ent.ti.com (dlemailx.itg.ti.com [157.170.170.113]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id t7ECXLRV019136; Fri, 14 Aug 2015 07:33:21 -0500 Received: from dflp32.itg.ti.com (10.64.6.15) by DLEE70.ent.ti.com (157.170.170.113) with Microsoft SMTP Server id 14.3.224.2; Fri, 14 Aug 2015 07:33:21 -0500 Received: from localhost.localdomain (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp32.itg.ti.com (8.14.3/8.13.8) with ESMTP id t7ECXFM1028006; Fri, 14 Aug 2015 07:33:20 -0500 From: Tero Kristo To: , , Subject: [RFC 3/7] ARM: OMAP4+: PRCM: parse PRCM MPU base address from DT Date: Fri, 14 Aug 2015 15:34:08 +0300 Message-ID: <1439555652-23012-4-git-send-email-t-kristo@ti.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1439555652-23012-1-git-send-email-t-kristo@ti.com> References: <1439555652-23012-1-git-send-email-t-kristo@ti.com> MIME-Version: 1.0 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Spam-Status: No, score=-7.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP All the OMAP4+ boards are DT based only, so the prcm_mpu base address can be parsed from DT. Signed-off-by: Tero Kristo --- arch/arm/mach-omap2/io.c | 4 ---- arch/arm/mach-omap2/prm_common.c | 18 ++++++++++++++++++ 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/arch/arm/mach-omap2/io.c b/arch/arm/mach-omap2/io.c index a253aaf..fc207ff 100644 --- a/arch/arm/mach-omap2/io.c +++ b/arch/arm/mach-omap2/io.c @@ -48,7 +48,6 @@ #include "cm44xx.h" #include "prm.h" #include "cm.h" -#include "prcm_mpu44xx.h" #include "prminst44xx.h" #include "prm2xxx.h" #include "prm3xxx.h" @@ -628,7 +627,6 @@ void __init omap4430_init_early(void) { omap2_set_globals_tap(OMAP443X_CLASS, OMAP2_L4_IO_ADDRESS(OMAP443X_SCM_BASE)); - omap2_set_globals_prcm_mpu(OMAP2_L4_IO_ADDRESS(OMAP4430_PRCM_MPU_BASE)); omap2_control_base_init(); omap4xxx_check_revision(); omap4xxx_check_features(); @@ -656,7 +654,6 @@ void __init omap5_init_early(void) { omap2_set_globals_tap(OMAP54XX_CLASS, OMAP2_L4_IO_ADDRESS(OMAP54XX_SCM_BASE)); - omap2_set_globals_prcm_mpu(OMAP2_L4_IO_ADDRESS(OMAP54XX_PRCM_MPU_BASE)); omap2_control_base_init(); omap4_pm_init_early(); omap2_prcm_base_init(); @@ -681,7 +678,6 @@ void __init omap5_init_late(void) void __init dra7xx_init_early(void) { omap2_set_globals_tap(-1, OMAP2_L4_IO_ADDRESS(DRA7XX_TAP_BASE)); - omap2_set_globals_prcm_mpu(OMAP2_L4_IO_ADDRESS(OMAP54XX_PRCM_MPU_BASE)); omap2_control_base_init(); omap4_pm_init_early(); omap2_prcm_base_init(); diff --git a/arch/arm/mach-omap2/prm_common.c b/arch/arm/mach-omap2/prm_common.c index a3f0aef..ea2fb54 100644 --- a/arch/arm/mach-omap2/prm_common.c +++ b/arch/arm/mach-omap2/prm_common.c @@ -38,6 +38,7 @@ #include "prm7xx.h" #include "prcm43xx.h" #include "prcm44xx.h" +#include "prcm_mpu44xx.h" #include "common.h" #include "clock.h" #include "cm.h" @@ -697,6 +698,13 @@ static struct omap_prcm_init_data dra7_prm_data __initdata = { }; #endif +#if defined(CONFIG_ARCH_OMAP4) || defined(CONFIG_SOC_OMAP5) || \ + defined(CONFIG_SOC_DRA7XX) +static struct omap_prcm_init_data omap4_prcm_mpu_data __initdata = { + .part = OMAP4430_PRCM_MPU_PARTITION, +}; +#endif + #ifdef CONFIG_SOC_AM43XX static struct omap_prcm_init_data am4_prm_data __initdata = { .index = TI_CLKM_PRM, @@ -741,6 +749,10 @@ static const struct of_device_id omap_prcm_dt_match_table[] __initconst = { #ifdef CONFIG_SOC_DRA7XX { .compatible = "ti,dra7-prm", .data = &dra7_prm_data }, #endif +#if defined(CONFIG_ARCH_OMAP4) || defined(CONFIG_SOC_OMAP5) || \ + defined(CONFIG_SOC_DRA7XX) + { .compatible = "ti,omap4-prcm-mpu", .data = &omap4_prcm_mpu_data }, +#endif { } }; @@ -769,6 +781,9 @@ int __init omap2_prm_base_init(void) if (data->index == TI_CLKM_PRM) prm_base = mem + data->offset; + if (data->part == OMAP4430_PRCM_MPU_PARTITION) + omap2_set_globals_prcm_mpu(mem); + data->mem = mem; data->np = np; @@ -813,6 +828,9 @@ int __init omap_prcm_init(void) for_each_matching_node_and_match(np, omap_prcm_dt_match_table, &match) { data = match->data; + if (data->part == OMAP4430_PRCM_MPU_PARTITION) + continue; + ret = omap2_clk_provider_init(np, data->index, NULL, data->mem); if (ret) return ret;