From patchwork Wed Mar 14 13:53:10 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Ujfalusi X-Patchwork-Id: 131576 Delivered-To: patch@linaro.org Received: by 10.46.84.17 with SMTP id i17csp904314ljb; Wed, 14 Mar 2018 06:53:36 -0700 (PDT) X-Google-Smtp-Source: AG47ELsCR9MkZ6MKYrsKR1NpNm5GoFlAghyFa0hvMGsjIsuhAXG90nKVp9N0AskgR6bODRZRa7Yr X-Received: by 10.98.137.147 with SMTP id n19mr4417833pfk.193.1521035616741; Wed, 14 Mar 2018 06:53:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521035616; cv=none; d=google.com; s=arc-20160816; b=DsLgFwhU7sHNB/95ItpeSMtiqJqeA+/jkg56yR9FrxaAgjY95drCwXvagtip3SP/t0 dip6Tj0L8PKq8sULkIOX81XAxu68U+ZoVCRpYIpDdBLqOXFtqsVkdTT05hC9TxH4w9k+ J0yiTWgNhBo6aSCMtJ8jZob+enpryqEXmpVWy4Wewzj2Lm4QUPrAXEMJhjYpndoWw8iB 2MQTiz00HTz5LlIlIK/O5ZmQ1FX8FoyRj8qCARyaX+2EdZNNjzykwpr6j4dQWv7kOQbq s9fcci5JlyQ6rLce8s79n8eXu0lCGwx17pyQMr9gOaQkcI6goA+Z73rq8uj1188ZsLzj 6qWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=Lfncrwwfw5/XDgYtkgCIXIrzMllQOpEKcf1HDYJxYuM=; b=qtxLweuYwNxZFimBdapLBOv2aBujXzH0EE0eJiHKd+FIbfcDRAEXYa3qIN9v88gxD7 ybhY/0j39AwiBp6KgRYHNAW3VUnYnsfeJT4tXfD5Vq7PFuR8mAsL8HpcA4P4RMwx51re iZgeKwmHBpQOIkheWFwMhqlJsIl3Jvp5mg3zBNTZ7Cl0lTCat1ETF9rE0bVhE9L2TlBm aGD9Pm6ggAugEph21NhICO4m6jqMiIiSwENqvqJjhGGGvZXKbevcoJX3sqEcuFe0K+Sp YpkvaTKe9YHnviY5zCBPL8mbbLZK6/kDIanvlZlO468QgUf4hclUCW5zH9yV3iB/uEh/ e7BQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@ti.com header.s=ti-com-17Q1 header.b=KRtaowdH; spf=pass (google.com: best guess record for domain of linux-omap-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-omap-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h1-v6si15640pli.645.2018.03.14.06.53.36; Wed, 14 Mar 2018 06:53:36 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-omap-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@ti.com header.s=ti-com-17Q1 header.b=KRtaowdH; spf=pass (google.com: best guess record for domain of linux-omap-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-omap-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751977AbeCNNxf (ORCPT + 5 others); Wed, 14 Mar 2018 09:53:35 -0400 Received: from lelnx194.ext.ti.com ([198.47.27.80]:21553 "EHLO lelnx194.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751964AbeCNNxd (ORCPT ); Wed, 14 Mar 2018 09:53:33 -0400 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by lelnx194.ext.ti.com (8.15.1/8.15.1) with ESMTP id w2EDrGLo019354; Wed, 14 Mar 2018 08:53:16 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1521035596; bh=+pHSdIUlE1A78kRObQzmVw9SLMT1/D5P5kCFKy65Hcs=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=KRtaowdHF8GnVpnP2ibXwpQYPwe6cCEMj/9WES6+ECq8Sh6CBpHd7UgN8gTptqmoL 6IjnYarTbJe3EWpE8+K59OaKdWTOI8bSqwDE3aAeFj3Kw90rLpLvnwt4zQlacm/qQK mnGTfuyYoq60cYq+pRqevPGfMDvzc+YurOG6AfeY= Received: from DFLE101.ent.ti.com (dfle101.ent.ti.com [10.64.6.22]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id w2EDrGti018025; Wed, 14 Mar 2018 08:53:16 -0500 Received: from DFLE103.ent.ti.com (10.64.6.24) by DFLE101.ent.ti.com (10.64.6.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1261.35; Wed, 14 Mar 2018 08:53:15 -0500 Received: from dflp32.itg.ti.com (10.64.6.15) by DFLE103.ent.ti.com (10.64.6.24) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1261.35 via Frontend Transport; Wed, 14 Mar 2018 08:53:15 -0500 Received: from feketebors.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp32.itg.ti.com (8.14.3/8.13.8) with ESMTP id w2EDrCg2025495; Wed, 14 Mar 2018 08:53:14 -0500 From: Peter Ujfalusi To: , CC: , Subject: [PATCH v2 1/6] ARM: omap2+: control: add support for auxiliary control module instances Date: Wed, 14 Mar 2018 15:53:10 +0200 Message-ID: <20180314135315.11215-2-peter.ujfalusi@ti.com> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180314135315.11215-1-peter.ujfalusi@ti.com> References: <20180314135315.11215-1-peter.ujfalusi@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org From: Tero Kristo Control module can have multiple instances in a system, each with separate address space and features. Add base support for these auxiliary instances, with support for syscon and clock mappings under them. Signed-off-by: Tero Kristo Tested-by: Peter Ujfalusi --- arch/arm/mach-omap2/control.c | 15 +++++++++++---- include/linux/clk/ti.h | 1 + 2 files changed, 12 insertions(+), 4 deletions(-) -- Peter Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/arch/arm/mach-omap2/control.c b/arch/arm/mach-omap2/control.c index bd8089ff929f..632adb2b7d03 100644 --- a/arch/arm/mach-omap2/control.c +++ b/arch/arm/mach-omap2/control.c @@ -623,6 +623,7 @@ void __init omap3_ctrl_init(void) struct control_init_data { int index; + void __iomem *mem; s16 offset; }; @@ -660,15 +661,21 @@ int __init omap2_control_base_init(void) struct device_node *np; const struct of_device_id *match; struct control_init_data *data; + void __iomem *mem; for_each_matching_node_and_match(np, omap_scrm_dt_match_table, &match) { data = (struct control_init_data *)match->data; - omap2_ctrl_base = of_iomap(np, 0); - if (!omap2_ctrl_base) + mem = of_iomap(np, 0); + if (!mem) return -ENOMEM; - omap2_ctrl_offset = data->offset; + if (data->index == TI_CLKM_CTRL) { + omap2_ctrl_base = mem; + omap2_ctrl_offset = data->offset; + } + + data->mem = mem; } return 0; @@ -713,7 +720,7 @@ int __init omap_control_init(void) } else { /* No scm_conf found, direct access */ ret = omap2_clk_provider_init(np, data->index, NULL, - omap2_ctrl_base); + data->mem); if (ret) return ret; } diff --git a/include/linux/clk/ti.h b/include/linux/clk/ti.h index d18da839b810..7e3bceee3489 100644 --- a/include/linux/clk/ti.h +++ b/include/linux/clk/ti.h @@ -203,6 +203,7 @@ enum { TI_CLKM_PRM, TI_CLKM_SCRM, TI_CLKM_CTRL, + TI_CLKM_CTRL_AUX, TI_CLKM_PLLSS, CLK_MAX_MEMMAPS };