From patchwork Thu Sep 12 11:39:07 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tero Kristo X-Patchwork-Id: 173690 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:ce:0:0:0:0 with SMTP id r14csp2003759ilq; Thu, 12 Sep 2019 04:39:42 -0700 (PDT) X-Google-Smtp-Source: APXvYqxBBkRk4t/Z8M/yVwDmylTR5n+5JX1yBWU0XJRljKzF5k0uB7p/ZLbrnbu/3XFhCsQUzMLs X-Received: by 2002:a17:906:3588:: with SMTP id o8mr33604959ejb.50.1568288382400; Thu, 12 Sep 2019 04:39:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568288382; cv=none; d=google.com; s=arc-20160816; b=b5AaG7F7GdxLWds7rkgYUOhwor45+3SLCLtOMe47uDmob+6DDzYUPIuBf5uPxTBTWv C78JfNG60Zy/41UGO6E5uu5VGt+KxwDYIozV6Wa64RtD8sWgcSNqgNjAIYuxwwuMjGUc ACYxlnzx3kxGrK8hbql5KOXefKRwWmLZX3j8HX093PaXYnDzG7RTXTuZrvx1kYz2IJAH Alf+gL+/hyA1zXb1JJP/TcSIotvN1bknvWuvYjfjjvfoBRKTXBlCx3ee9HCwbdqkogg+ OiG0AGrgmuzZsq+7qy8m1PcAYQKsioQC4uDSrSig86KBVzlJmkcmYNbO+aggxkk7iaQ1 iQBQ== 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; bh=oQxDXztiLLCcC6n0PYFQficOreSIf5synk8KoO4IaU0=; b=GmEt643kpzgh1hvXlvnu/ko9ZK1XVZcDk4aT0CAqOCZRPABzvCr8SGQ4pwCB7phQFc B84u9rolzQztCwpAUsfSc9e+SGDvC4ahERDyQDwv0NqLCL6mixWiyijnsTuna/lCogha XFKs27em2GfjR4mzcRjZNZhwMIgPBtwP1JXrDfVdZ8WMnMN+0MhdpDWCG78KFMkQ7xi3 tHs8l/EslY13JFxiIG2VC9MBfeEn47nrwMr8EcEFd1hKrc+87zYE9B43soivinzNSLwO z1Q4u7dPWHPo30BIrfJcf4hScGMbXOzW7p6Nays8xW0enNS+JxfRMcWj5DgZ8V6p9HSI A1UA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=ybZlpbY6; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (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 z20si8881422edq.250.2019.09.12.04.39.42; Thu, 12 Sep 2019 04:39:42 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=ybZlpbY6; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731337AbfILLjl (ORCPT + 8 others); Thu, 12 Sep 2019 07:39:41 -0400 Received: from lelv0142.ext.ti.com ([198.47.23.249]:54840 "EHLO lelv0142.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730680AbfILLjl (ORCPT ); Thu, 12 Sep 2019 07:39:41 -0400 Received: from lelv0265.itg.ti.com ([10.180.67.224]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id x8CBdPbD125282; Thu, 12 Sep 2019 06:39:25 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1568288365; bh=oQxDXztiLLCcC6n0PYFQficOreSIf5synk8KoO4IaU0=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=ybZlpbY6DvSrOtRNXOFwn8qVbTWd7Hci76yIEzhPOeHdapm5nBBK7F/PHXkfWrll2 Lh6utvPhf2uUNTGzAiBiQ3J74+Ce5yKNmXyYak9W/n2fWJEPusTCqz2Kr0/YguHqwD WDl9S9sMWcB5Y794CWPt9hRwxjsWs5uXmTs0MeWQ= Received: from DLEE113.ent.ti.com (dlee113.ent.ti.com [157.170.170.24]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x8CBdPhD050703 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 12 Sep 2019 06:39:25 -0500 Received: from DLEE110.ent.ti.com (157.170.170.21) by DLEE113.ent.ti.com (157.170.170.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Thu, 12 Sep 2019 06:39:25 -0500 Received: from fllv0040.itg.ti.com (10.64.41.20) by DLEE110.ent.ti.com (157.170.170.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5 via Frontend Transport; Thu, 12 Sep 2019 06:39:25 -0500 Received: from sokoban.bb.dnainternet.fi (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0040.itg.ti.com (8.15.2/8.15.2) with ESMTP id x8CBdKcq120606; Thu, 12 Sep 2019 06:39:23 -0500 From: Tero Kristo To: , , , , , CC: , Subject: [PATCHv5 01/10] dt-bindings: omap: add new binding for PRM instances Date: Thu, 12 Sep 2019 14:39:07 +0300 Message-ID: <20190912113916.20093-2-t-kristo@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190912113916.20093-1-t-kristo@ti.com> References: <20190912113916.20093-1-t-kristo@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Add new binding for OMAP PRM (Power and Reset Manager) instances. Each of these will act as a power domain controller and potentially as a reset provider. Signed-off-by: Tero Kristo --- v5: - dropped the clocks property as the dependency towards clocks was removed - changed the name of the node to be power-controller .../devicetree/bindings/arm/omap/prm-inst.txt | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 Documentation/devicetree/bindings/arm/omap/prm-inst.txt -- 2.17.1 -- Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki Reviewed-by: Rob Herring diff --git a/Documentation/devicetree/bindings/arm/omap/prm-inst.txt b/Documentation/devicetree/bindings/arm/omap/prm-inst.txt new file mode 100644 index 000000000000..942f7aac3b00 --- /dev/null +++ b/Documentation/devicetree/bindings/arm/omap/prm-inst.txt @@ -0,0 +1,27 @@ +OMAP PRM instance bindings + +Power and Reset Manager is an IP block on OMAP family of devices which +handle the power domains and their current state, and provide reset +handling for the domains and/or separate IP blocks under the power domain +hierarchy. + +Required properties: +- compatible: Must be one of: + "ti,am3-prm-inst" + "ti,am4-prm-inst" + "ti,omap4-prm-inst" + "ti,omap5-prm-inst" + "ti,dra7-prm-inst" +- reg: Contains PRM instance register address range + (base address and length) + +Optional properties: +- #reset-cells: Should be 1 if the PRM instance in question supports resets. + +Example: + +prm_dsp2: power-controller@1b00 { + compatible = "ti,dra7-prm-inst"; + reg = <0x1b00 0x40>; + #reset-cells = <1>; +}; From patchwork Thu Sep 12 11:39:09 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tero Kristo X-Patchwork-Id: 173688 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:ce:0:0:0:0 with SMTP id r14csp2003738ilq; Thu, 12 Sep 2019 04:39:41 -0700 (PDT) X-Google-Smtp-Source: APXvYqy7UT+2ewr8+8jt2FkLhX03VHR5U3dghRVdbbTlCYarmlAf8q2lrd9NIcm0Wx5hB17lE/FC X-Received: by 2002:a17:906:c359:: with SMTP id ci25mr33430850ejb.205.1568288381076; Thu, 12 Sep 2019 04:39:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568288381; cv=none; d=google.com; s=arc-20160816; b=hc8MR4JvyydKHv4hnUq6lEXyf5DGmGced2/sVPfrEoN6J+xj9REcRGAj/bILV7LIjI 7b5YFGMWJuiKhuL7HntGTMMMH3AvUSDQeC/GNDqaM7uW7rqn+mxOIvmbzzGPNqk4qXGT +qyGSXe6qOKTSQM5lhcprkZiP45PvH4XeR8OPXvrS0TYShRePg5JQ7ojkk73xr+r1A0j M0CGlnlkTB7+GfsG8x1pgTG62CMssG+QuV+insVf8WxEgO6v1merExkAnk0AGHnZaLLW 5eqkzlKDRQxM+0qknFbRPMy+NO9/gOvBfs05uBSvNCu4c2YJmfqUsEBSAq319vgtCkZF KfwQ== 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; bh=Y7vuHmki0AitevIY4QTjUpFCGHBSgA345LWzYu3kdGg=; b=K/o3baXygX4mpxGA+FNPsne1Ym+2Ia5EZlDr8oEs3Clv8I8pszZb8o7aS1dKUBwqyx GHnaB8wOFT7w4FuKZg9XliAnMPKXvsc1VC6LFX0xFXIdHTU1Ht8MktFEM+AbEidDSc9y RWwMdqhz/mbnzjKJD1xGdWLw32AQh6XwDV0F2LgSmMZk0L1oE+a2bOuwQzuR1hqfI+1g CbRHQXH6zCeSATsLIZGFK5+oxa1UPeXW4sKp3BFO56NrWN0X7E4O63t681kdRLeeI0ki b0YmiWC/suRb1HoUycJ7MjzOX4jkXxtnMtDNUnwTNBof15Eze+tJ1QP+rZkbZzT77amA jO8A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=JUHApH35; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (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 z20si8881422edq.250.2019.09.12.04.39.40; Thu, 12 Sep 2019 04:39:41 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=JUHApH35; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728298AbfILLjj (ORCPT + 8 others); Thu, 12 Sep 2019 07:39:39 -0400 Received: from lelv0143.ext.ti.com ([198.47.23.248]:58742 "EHLO lelv0143.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730268AbfILLjj (ORCPT ); Thu, 12 Sep 2019 07:39:39 -0400 Received: from fllv0035.itg.ti.com ([10.64.41.0]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id x8CBdVWb024466; Thu, 12 Sep 2019 06:39:31 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1568288371; bh=Y7vuHmki0AitevIY4QTjUpFCGHBSgA345LWzYu3kdGg=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=JUHApH358MOEJyikt2JFci4OCHJ2KvKh0ljxWHTIgizurT7vSPy1BoJI/2KWqftXw et33QuUlNQX/ExgQfoVBzjo1ygi8zgTdvso6+FtdWgfo6PbAwK3WYPlY5vBJJ/HG5o 7/h1a7Home9Mxe2ub07G1mF84Yk9tqQpblv/S24U= Received: from DFLE108.ent.ti.com (dfle108.ent.ti.com [10.64.6.29]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTP id x8CBdVFe074023; Thu, 12 Sep 2019 06:39:31 -0500 Received: from DFLE107.ent.ti.com (10.64.6.28) by DFLE108.ent.ti.com (10.64.6.29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Thu, 12 Sep 2019 06:39:30 -0500 Received: from fllv0040.itg.ti.com (10.64.41.20) by DFLE107.ent.ti.com (10.64.6.28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5 via Frontend Transport; Thu, 12 Sep 2019 06:39:29 -0500 Received: from sokoban.bb.dnainternet.fi (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0040.itg.ti.com (8.15.2/8.15.2) with ESMTP id x8CBdKcs120606; Thu, 12 Sep 2019 06:39:28 -0500 From: Tero Kristo To: , , , , , CC: , Subject: [PATCHv5 03/10] soc: ti: omap-prm: poll for reset complete during de-assert Date: Thu, 12 Sep 2019 14:39:09 +0300 Message-ID: <20190912113916.20093-4-t-kristo@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190912113916.20093-1-t-kristo@ti.com> References: <20190912113916.20093-1-t-kristo@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Poll for reset completion status during de-assertion of reset, otherwise the IP in question might be accessed before it has left reset properly. Signed-off-by: Tero Kristo --- drivers/soc/ti/omap_prm.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) -- 2.17.1 -- Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki diff --git a/drivers/soc/ti/omap_prm.c b/drivers/soc/ti/omap_prm.c index ab0b66ad715d..96fa2aad9b93 100644 --- a/drivers/soc/ti/omap_prm.c +++ b/drivers/soc/ti/omap_prm.c @@ -153,6 +153,18 @@ static int omap_reset_deassert(struct reset_controller_dev *rcdev, writel_relaxed(v, reset->prm->base + reset->prm->data->rstctrl); spin_unlock_irqrestore(&reset->lock, flags); + if (!has_rstst) + return 0; + + /* wait for the status to be set */ + ret = readl_relaxed_poll_timeout(reset->prm->base + + reset->prm->data->rstst, + v, v & BIT(st_bit), 1, + OMAP_RESET_MAX_WAIT); + if (ret) + pr_err("%s: timedout waiting for %s:%lu\n", __func__, + reset->prm->data->name, id); + return 0; } From patchwork Thu Sep 12 11:39:10 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tero Kristo X-Patchwork-Id: 173689 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:ce:0:0:0:0 with SMTP id r14csp2003749ilq; Thu, 12 Sep 2019 04:39:41 -0700 (PDT) X-Google-Smtp-Source: APXvYqwCd5okhq5fSVDAOa6LbPXMZ66Pc1K0JHQO04zccKTt6ZDeaNp8XND/919/N1tFm9X5CD3j X-Received: by 2002:aa7:c80e:: with SMTP id a14mr23587647edt.205.1568288381726; Thu, 12 Sep 2019 04:39:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568288381; cv=none; d=google.com; s=arc-20160816; b=HsQ/VKzrV5hkya/vGehW9PYOnk7LM5nIWHy4BJQZKLj7HPBd6zwV1Tf3qeAzAaWiRc MiIEyQ5NzZ8Kk4FIsm0v6lQa0QSQgdQs843IeSDS5JMydarVzUbTsMMeXaO8DYfyqXA6 V7jpSGUl8FZV1HcxT5qHki2hH8vJlHWBW2ayvMh8UvDAsJ67ZfDVHcwlK2fNXAWerlFa 2R8Iq5OMmVCXchj5eFr24YO4zWoNVXQ1bgnjcLPD5oqY5cazTWmwdgThpUdLlQQH/qum iae6dhThY400ijBuziXPG1+aPMfmxT57NVXUVUBTpCGpU42eGd1atCSl5CsbU40mnaL/ 1Rog== 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; bh=0tln0NRFdBItHIltiQcebxGnUnAgfgYhStbd62D0/jM=; b=BnqpkOqqPiqwC+V5OrCBEFSaJg8kAsK9OuoKKpnrcYPsomVHP2Qdeo3V78mvPJ873J xhXEmR7uFY2F6HRna90Q+Tbfzin1NA9qtGAx+Rcjcb2LgS6a8PUaVEauGWLcnsS56T82 keJ0lnOIBHA5Wji+DgKSEBcyjgz4kof6v1t4e5WGxWQFZBFGdSEBFZAgGHe3QWfKQbM0 EK0hlEVI9/a4d5glT7VHDBxLBBJJuQvTazk5dLUZhBtyeH8vB7SgmzxFAG25V/3FO5OK ni0JnLQhF2XgteOVWVqeIkIoIWTQrBZzZYO8zT/XCdizbP2zlJmAcFJY+ZllqsCxird/ Il8g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=x6HQtFvq; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (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 z20si8881422edq.250.2019.09.12.04.39.41; Thu, 12 Sep 2019 04:39:41 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=x6HQtFvq; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730268AbfILLjk (ORCPT + 8 others); Thu, 12 Sep 2019 07:39:40 -0400 Received: from lelv0143.ext.ti.com ([198.47.23.248]:58746 "EHLO lelv0143.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730680AbfILLjk (ORCPT ); Thu, 12 Sep 2019 07:39:40 -0400 Received: from lelv0265.itg.ti.com ([10.180.67.224]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id x8CBdWIV024471; Thu, 12 Sep 2019 06:39:32 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1568288372; bh=0tln0NRFdBItHIltiQcebxGnUnAgfgYhStbd62D0/jM=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=x6HQtFvqKb0lDjI1DuODZbUFJ2BmCBcS9WcopnrOh/P4lJ80sv9i7nsQYxsfs37/a HPABWdWSZzekEbVO2z2VXDpDHpLpnHw1sc9nbsVENzfnfECiIE0/wVMKaeUUMnEYhj KBOSFaPJrFcleVUkZIpdjOodZzFFgJRdM+WeUvks= Received: from DLEE109.ent.ti.com (dlee109.ent.ti.com [157.170.170.41]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x8CBdWJM050772 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 12 Sep 2019 06:39:32 -0500 Received: from DLEE115.ent.ti.com (157.170.170.26) by DLEE109.ent.ti.com (157.170.170.41) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Thu, 12 Sep 2019 06:39:32 -0500 Received: from fllv0040.itg.ti.com (10.64.41.20) by DLEE115.ent.ti.com (157.170.170.26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5 via Frontend Transport; Thu, 12 Sep 2019 06:39:32 -0500 Received: from sokoban.bb.dnainternet.fi (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0040.itg.ti.com (8.15.2/8.15.2) with ESMTP id x8CBdKct120606; Thu, 12 Sep 2019 06:39:30 -0500 From: Tero Kristo To: , , , , , CC: , Subject: [PATCHv5 04/10] soc: ti: omap-prm: add support for denying idle for reset clockdomain Date: Thu, 12 Sep 2019 14:39:10 +0300 Message-ID: <20190912113916.20093-5-t-kristo@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190912113916.20093-1-t-kristo@ti.com> References: <20190912113916.20093-1-t-kristo@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org TI SoCs hardware reset signals require the parent clockdomain to be in force wakeup mode while de-asserting the reset, otherwise it may never complete. To support this, add pdata hooks to control the clockdomain directly. Signed-off-by: Tero Kristo --- drivers/soc/ti/omap_prm.c | 36 ++++++++++++++++++++++++++-- include/linux/platform_data/ti-prm.h | 21 ++++++++++++++++ 2 files changed, 55 insertions(+), 2 deletions(-) create mode 100644 include/linux/platform_data/ti-prm.h -- 2.17.1 -- Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki diff --git a/drivers/soc/ti/omap_prm.c b/drivers/soc/ti/omap_prm.c index 96fa2aad9b93..3d9393ff67e3 100644 --- a/drivers/soc/ti/omap_prm.c +++ b/drivers/soc/ti/omap_prm.c @@ -16,6 +16,8 @@ #include #include +#include + struct omap_rst_map { s8 rst; s8 st; @@ -24,6 +26,7 @@ struct omap_rst_map { struct omap_prm_data { u32 base; const char *name; + const char *clkdm_name; u16 rstctrl; u16 rstst; const struct omap_rst_map *rstmap; @@ -40,6 +43,8 @@ struct omap_reset_data { struct omap_prm *prm; u32 mask; spinlock_t lock; + struct clockdomain *clkdm; + struct device *dev; }; #define to_omap_reset_data(p) container_of((p), struct omap_reset_data, rcdev) @@ -49,6 +54,7 @@ struct omap_reset_data { #define OMAP_PRM_HAS_RSTCTRL BIT(0) #define OMAP_PRM_HAS_RSTST BIT(1) +#define OMAP_PRM_HAS_NO_CLKDM BIT(2) #define OMAP_PRM_HAS_RESETS (OMAP_PRM_HAS_RSTCTRL | OMAP_PRM_HAS_RSTST) @@ -133,6 +139,8 @@ static int omap_reset_deassert(struct reset_controller_dev *rcdev, int st_bit; bool has_rstst; unsigned long flags; + struct ti_prm_platform_data *pdata = dev_get_platdata(reset->dev); + int ret = 0; has_rstst = reset->prm->data->rstst || (reset->prm->data->flags & OMAP_PRM_HAS_RSTST); @@ -146,6 +154,9 @@ static int omap_reset_deassert(struct reset_controller_dev *rcdev, writel_relaxed(v, reset->prm->base + reset->prm->data->rstst); } + if (reset->clkdm) + pdata->clkdm_deny_idle(reset->clkdm); + /* de-assert the reset control line */ spin_lock_irqsave(&reset->lock, flags); v = readl_relaxed(reset->prm->base + reset->prm->data->rstctrl); @@ -154,7 +165,7 @@ static int omap_reset_deassert(struct reset_controller_dev *rcdev, spin_unlock_irqrestore(&reset->lock, flags); if (!has_rstst) - return 0; + goto exit; /* wait for the status to be set */ ret = readl_relaxed_poll_timeout(reset->prm->base + @@ -165,7 +176,11 @@ static int omap_reset_deassert(struct reset_controller_dev *rcdev, pr_err("%s: timedout waiting for %s:%lu\n", __func__, reset->prm->data->name, id); - return 0; +exit: + if (reset->clkdm) + pdata->clkdm_allow_idle(reset->clkdm); + + return ret; } static const struct reset_control_ops omap_reset_ops = { @@ -190,6 +205,8 @@ static int omap_prm_reset_init(struct platform_device *pdev, { struct omap_reset_data *reset; const struct omap_rst_map *map; + struct ti_prm_platform_data *pdata = dev_get_platdata(&pdev->dev); + char buf[32]; /* * Check if we have controllable resets. If either rstctrl is non-zero @@ -199,6 +216,11 @@ static int omap_prm_reset_init(struct platform_device *pdev, if (!prm->data->rstctrl && !(prm->data->flags & OMAP_PRM_HAS_RSTCTRL)) return 0; + /* Check if we have the pdata callbacks in place */ + if (!pdata || !pdata->clkdm_lookup || !pdata->clkdm_deny_idle || + !pdata->clkdm_allow_idle) + return -EINVAL; + map = prm->data->rstmap; if (!map) return -EINVAL; @@ -213,10 +235,20 @@ static int omap_prm_reset_init(struct platform_device *pdev, reset->rcdev.nr_resets = OMAP_MAX_RESETS; reset->rcdev.of_xlate = omap_prm_reset_xlate; reset->rcdev.of_reset_n_cells = 1; + reset->dev = &pdev->dev; spin_lock_init(&reset->lock); reset->prm = prm; + sprintf(buf, "%s_clkdm", prm->data->clkdm_name ? prm->data->clkdm_name : + prm->data->name); + + if (!(prm->data->flags & OMAP_PRM_HAS_NO_CLKDM)) { + reset->clkdm = pdata->clkdm_lookup(buf); + if (!reset->clkdm) + return -EINVAL; + } + while (map->rst >= 0) { reset->mask |= BIT(map->rst); map++; diff --git a/include/linux/platform_data/ti-prm.h b/include/linux/platform_data/ti-prm.h new file mode 100644 index 000000000000..28154c3226c2 --- /dev/null +++ b/include/linux/platform_data/ti-prm.h @@ -0,0 +1,21 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +/* + * TI PRM (Power & Reset Manager) platform data + * + * Copyright (C) 2019 Texas Instruments, Inc. + * + * Tero Kristo + */ + +#ifndef _LINUX_PLATFORM_DATA_TI_PRM_H +#define _LINUX_PLATFORM_DATA_TI_PRM_H + +struct clockdomain; + +struct ti_prm_platform_data { + void (*clkdm_deny_idle)(struct clockdomain *clkdm); + void (*clkdm_allow_idle)(struct clockdomain *clkdm); + struct clockdomain * (*clkdm_lookup)(const char *name); +}; + +#endif /* _LINUX_PLATFORM_DATA_TI_PRM_H */ From patchwork Thu Sep 12 11:39:11 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tero Kristo X-Patchwork-Id: 173692 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:ce:0:0:0:0 with SMTP id r14csp2003791ilq; Thu, 12 Sep 2019 04:39:44 -0700 (PDT) X-Google-Smtp-Source: APXvYqzFiqS6K8VLT+SFOVyVnuzrtbCTqEQw3wthC3tSM75eWQYKwcTSt4cInRS/H5EE8JDw5zB+ X-Received: by 2002:a50:884c:: with SMTP id c12mr41140328edc.134.1568288384257; Thu, 12 Sep 2019 04:39:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568288384; cv=none; d=google.com; s=arc-20160816; b=Bdz7bOCFMDLa9jVUwb9WCgdlwbB01UU5FvXMVU01RSr06Rjn60J2qxousAAkDQzid9 /7wF6e0gme0TEwIaQavfEF/7NWluXgnvlEYAzOMW6xtlFJndh6EFJUuETAanEXWwWYgI /Jn2uAm/Zw/9LyFvuaTuEvMkvMHBUO47K8uCo0YFcxTW6EPom/2OVeXTJaq8fbp1+E8T wSvyGuoHFjTAavLEqvbO87MDwigjqGH8+7wTDlsBuDZW2n5qu/hbZYxfsP899CHSA2jN /RcjT+UvUiIlN/zhw5JOQAyV8p9e5A0w7OAjQQmob2ddgJe0TqrjEp0TR0ZhNsFUPB7d hFcA== 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; bh=hcftpBMP2gQsYIzIi5S84qh2X88Wcx3kW8vrYbRpjDU=; b=e70tQuQ7O7H94LdW3SJwx5JsZ7YUhpQGhavHkYZzD/HHM43zmhxVJglgPp+GtAFTTE 4LuxY4R8fmDS1c/f7chdTykl+SFec3QGxxZJGj3DFXyIIZpY8x3/3drhQToKdnfJiKN3 qct5je5djpj6Aaazt1l0lZ9MA5+mjGhVjNqkcQ3ByPbmYWMN200uDCITuqwlMHFNwzar bZN4i0CTE3A4aZyhm2Kj2CYu/28CV+b+3H34aF+BIgjwO/y32HJYEV9iGrrrCtE9cqGE yGAIx09iQNw8nWePijB8L/1qNyk+Ua+yaRUqzv019a/OYoKIDU/bj6jPfWm+MxYghj27 hWXA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b="OkHb/qU4"; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (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 z20si8881422edq.250.2019.09.12.04.39.44; Thu, 12 Sep 2019 04:39:44 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b="OkHb/qU4"; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731333AbfILLjn (ORCPT + 8 others); Thu, 12 Sep 2019 07:39:43 -0400 Received: from fllv0016.ext.ti.com ([198.47.19.142]:47868 "EHLO fllv0016.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731343AbfILLjm (ORCPT ); Thu, 12 Sep 2019 07:39:42 -0400 Received: from lelv0266.itg.ti.com ([10.180.67.225]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id x8CBdZiw074106; Thu, 12 Sep 2019 06:39:35 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1568288375; bh=hcftpBMP2gQsYIzIi5S84qh2X88Wcx3kW8vrYbRpjDU=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=OkHb/qU4Xuk6Ss7p+vnUEX8EV3IGcAu96ig6rcakzatoK/j6VJTJ8wGmcF3vxGkm4 TGbQuNcBhhTqBTyZZIp+wimEqcQnQR59OtGzEBaDe4k1Ku3NhnHCdWiG61pQte7k7B UKNvYR8QQjvJIPKa1qUoyXeXXTekc/+lr8Zy2CTs= Received: from DLEE109.ent.ti.com (dlee109.ent.ti.com [157.170.170.41]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x8CBdZVb012752 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 12 Sep 2019 06:39:35 -0500 Received: from DLEE111.ent.ti.com (157.170.170.22) by DLEE109.ent.ti.com (157.170.170.41) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Thu, 12 Sep 2019 06:39:34 -0500 Received: from fllv0040.itg.ti.com (10.64.41.20) by DLEE111.ent.ti.com (157.170.170.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5 via Frontend Transport; Thu, 12 Sep 2019 06:39:34 -0500 Received: from sokoban.bb.dnainternet.fi (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0040.itg.ti.com (8.15.2/8.15.2) with ESMTP id x8CBdKcu120606; Thu, 12 Sep 2019 06:39:32 -0500 From: Tero Kristo To: , , , , , CC: , Subject: [PATCHv5 05/10] soc: ti: omap-prm: add omap4 PRM data Date: Thu, 12 Sep 2019 14:39:11 +0300 Message-ID: <20190912113916.20093-6-t-kristo@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190912113916.20093-1-t-kristo@ti.com> References: <20190912113916.20093-1-t-kristo@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Add PRM data for omap4 family of SoCs. Initially this is just used to provide reset support. Signed-off-by: Tero Kristo --- drivers/soc/ti/omap_prm.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) -- 2.17.1 -- Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki diff --git a/drivers/soc/ti/omap_prm.c b/drivers/soc/ti/omap_prm.c index 3d9393ff67e3..24b1da3492c0 100644 --- a/drivers/soc/ti/omap_prm.c +++ b/drivers/soc/ti/omap_prm.c @@ -58,7 +58,29 @@ struct omap_reset_data { #define OMAP_PRM_HAS_RESETS (OMAP_PRM_HAS_RSTCTRL | OMAP_PRM_HAS_RSTST) +static const struct omap_rst_map rst_map_01[] = { + { .rst = 0, .st = 0 }, + { .rst = 1, .st = 1 }, + { .rst = -1 }, +}; + +static const struct omap_rst_map rst_map_012[] = { + { .rst = 0, .st = 0 }, + { .rst = 1, .st = 1 }, + { .rst = 2, .st = 2 }, + { .rst = -1 }, +}; + +static const struct omap_prm_data omap4_prm_data[] = { + { .name = "tesla", .base = 0x4a306400, .rstctrl = 0x10, .rstst = 0x14, .rstmap = rst_map_01 }, + { .name = "core", .base = 0x4a306700, .rstctrl = 0x210, .rstst = 0x214, .clkdm_name = "ducati", .rstmap = rst_map_012 }, + { .name = "ivahd", .base = 0x4a306f00, .rstctrl = 0x10, .rstst = 0x14, .rstmap = rst_map_012 }, + { .name = "device", .base = 0x4a307b00, .rstctrl = 0x0, .rstst = 0x4, .rstmap = rst_map_01, .flags = OMAP_PRM_HAS_RSTCTRL | OMAP_PRM_HAS_NO_CLKDM }, + { }, +}; + static const struct of_device_id omap_prm_id_table[] = { + { .compatible = "ti,omap4-prm-inst", .data = omap4_prm_data }, { }, }; From patchwork Thu Sep 12 11:39:12 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tero Kristo X-Patchwork-Id: 173693 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:ce:0:0:0:0 with SMTP id r14csp2003809ilq; Thu, 12 Sep 2019 04:39:45 -0700 (PDT) X-Google-Smtp-Source: APXvYqxS1D57O73FBJ2hl5W1IDJSPJj+IsN91OWmXV76Zt0SdNb4nTNdkEOC4ODOdzKl8puPiz31 X-Received: by 2002:a50:ccd3:: with SMTP id b19mr35716222edj.257.1568288385179; Thu, 12 Sep 2019 04:39:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568288385; cv=none; d=google.com; s=arc-20160816; b=evoI/zMDhXl7bcyPJhLDYyhzM0ysYmfCZrWoau3VC1IIYD9RoyaO0eqDfqjP/9MQ6v /DBuaYHOT7Qxz6WRdJkZR93E2Jkinpz54ha0AJKZnXl6flLg+e+UhpkRzF9nIq0G1XdW HyRuNg/bFCS7F0FGIFItLuBzM8TIXftCV5aGCo1Vrj6lzAKkX1rMsex6uj0iTGr0mGkM uIBBzmunta63BA7jWoMD9wMrxcllMUr8g/fCI/iJu91S5LueBAu1uI2Mq8Rz86T/mvJY wbSdRcf4YtcNfgG7Xohb/9Bl3U2Q9DWrUGx5dxTgJZOlqQHo3M/GEU97GllybKSRBWKL hKSw== 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; bh=jVjHqDUh4JTBppk9XVlo05dAGntMMljP5k/tZSWLMM4=; b=uO+SvmZH/xFtmQ8nkXQ9MZurLu2sQMV7XlTQyyHKsvEgFomdQDsE0gN69VX+y2IppH UT/2ES4B+Mu9+/9d3dCrNW6B074R9beunTkwa56eCA0WPmUH/ZQNrqpIoBAa6dnaKlDi LJ/e2aCltHjuN2wuQ2RRNlNVs5RogfGi3IUX56NITldS4HF9L6Qx8fmXzfKhIPNE/lg/ 08fL+wFaGi1AJHU795zT63xVyTijpPgNeDYXoNGLXKUce/Y/JEW7z3a8NNhsQkUFO73x dzLSfh0sxdbRIrB5ZRasIySzgb7IpauyL+pamvaNDFoo3817v6rotk3EAA3JJHUy6Dp6 sSJA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=LjpWqVrr; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (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 z20si8881422edq.250.2019.09.12.04.39.44; Thu, 12 Sep 2019 04:39:45 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=LjpWqVrr; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731343AbfILLjo (ORCPT + 8 others); Thu, 12 Sep 2019 07:39:44 -0400 Received: from lelv0143.ext.ti.com ([198.47.23.248]:58768 "EHLO lelv0143.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731355AbfILLjo (ORCPT ); Thu, 12 Sep 2019 07:39:44 -0400 Received: from lelv0266.itg.ti.com ([10.180.67.225]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id x8CBdbU3024489; Thu, 12 Sep 2019 06:39:37 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1568288377; bh=jVjHqDUh4JTBppk9XVlo05dAGntMMljP5k/tZSWLMM4=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=LjpWqVrrZvtj6KaOSg1I952BCkyFcwVg4idx/vR0+5NmLZp7OpkX8+8k5C8JcBLhi /SuW1gMVaU3i83dlxTVmIYcH3yrh1qoOEOE5LmZWP0NcI2FwHX3VbhrCsgZNnvmViL RiBJLSRKMCCvuFb+cWg1Fx+yNldZpV4QE96RYI/w= Received: from DFLE115.ent.ti.com (dfle115.ent.ti.com [10.64.6.36]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x8CBdbrN012772 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 12 Sep 2019 06:39:37 -0500 Received: from DFLE104.ent.ti.com (10.64.6.25) by DFLE115.ent.ti.com (10.64.6.36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Thu, 12 Sep 2019 06:39:37 -0500 Received: from fllv0040.itg.ti.com (10.64.41.20) by DFLE104.ent.ti.com (10.64.6.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5 via Frontend Transport; Thu, 12 Sep 2019 06:39:36 -0500 Received: from sokoban.bb.dnainternet.fi (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0040.itg.ti.com (8.15.2/8.15.2) with ESMTP id x8CBdKcv120606; Thu, 12 Sep 2019 06:39:35 -0500 From: Tero Kristo To: , , , , , CC: , Subject: [PATCHv5 06/10] soc: ti: omap-prm: add data for am33xx Date: Thu, 12 Sep 2019 14:39:12 +0300 Message-ID: <20190912113916.20093-7-t-kristo@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190912113916.20093-1-t-kristo@ti.com> References: <20190912113916.20093-1-t-kristo@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Add PRM instance data for AM33xx SoC. Includes some basic register definitions and reset data for now. Signed-off-by: Tero Kristo --- drivers/soc/ti/omap_prm.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) -- 2.17.1 -- Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki diff --git a/drivers/soc/ti/omap_prm.c b/drivers/soc/ti/omap_prm.c index 24b1da3492c0..a5fde34f6afd 100644 --- a/drivers/soc/ti/omap_prm.c +++ b/drivers/soc/ti/omap_prm.c @@ -58,6 +58,11 @@ struct omap_reset_data { #define OMAP_PRM_HAS_RESETS (OMAP_PRM_HAS_RSTCTRL | OMAP_PRM_HAS_RSTST) +static const struct omap_rst_map rst_map_0[] = { + { .rst = 0, .st = 0 }, + { .rst = -1 }, +}; + static const struct omap_rst_map rst_map_01[] = { { .rst = 0, .st = 0 }, { .rst = 1, .st = 1 }, @@ -79,8 +84,27 @@ static const struct omap_prm_data omap4_prm_data[] = { { }, }; +static const struct omap_rst_map am3_per_rst_map[] = { + { .rst = 1 }, + { .rst = -1 }, +}; + +static const struct omap_rst_map am3_wkup_rst_map[] = { + { .rst = 3, .st = 5 }, + { .rst = -1 }, +}; + +static const struct omap_prm_data am3_prm_data[] = { + { .name = "per", .base = 0x44e00c00, .rstctrl = 0x0, .rstmap = am3_per_rst_map, .flags = OMAP_PRM_HAS_RSTCTRL, .clkdm_name = "pruss_ocp" }, + { .name = "wkup", .base = 0x44e00d00, .rstctrl = 0x0, .rstst = 0xc, .rstmap = am3_wkup_rst_map, .flags = OMAP_PRM_HAS_RSTCTRL | OMAP_PRM_HAS_NO_CLKDM }, + { .name = "device", .base = 0x44e00f00, .rstctrl = 0x0, .rstst = 0x8, .rstmap = rst_map_01, .flags = OMAP_PRM_HAS_RSTCTRL | OMAP_PRM_HAS_NO_CLKDM }, + { .name = "gfx", .base = 0x44e01100, .rstctrl = 0x4, .rstst = 0x14, .rstmap = rst_map_0, .clkdm_name = "gfx_l3" }, + { }, +}; + static const struct of_device_id omap_prm_id_table[] = { { .compatible = "ti,omap4-prm-inst", .data = omap4_prm_data }, + { .compatible = "ti,am3-prm-inst", .data = am3_prm_data }, { }, }; From patchwork Thu Sep 12 11:39:13 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tero Kristo X-Patchwork-Id: 173694 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:ce:0:0:0:0 with SMTP id r14csp2003870ilq; Thu, 12 Sep 2019 04:39:49 -0700 (PDT) X-Google-Smtp-Source: APXvYqxXWLOPsOLtD29rFTwoWZ0fsxDdkqy8lVaQSpY6xPvvFhhPaSKc4aTcmjQ97w6p1er0Ny/3 X-Received: by 2002:a17:906:5393:: with SMTP id g19mr23942984ejo.256.1568288388939; Thu, 12 Sep 2019 04:39:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568288388; cv=none; d=google.com; s=arc-20160816; b=jaoGHtKIjHwRNQkLCtV2gfxRItBWE+zYS3JYM/Zp5m/+prK3e8qbxOCLhr/W0iN5RC 9JlQ6RXLgeClhsemZURDlwTUclgfiBD3jIgwSchse7/dAaG4NM/WolqrA989KrIGKGXn Nv+8W8RLvhhJza2GI0W/CoLanG2Oees9bz/kAbzvfxXPJ6OxxoWfUYTb8kcyR4xMi/De 0Ai7VXcyunPhcguOSsGc59EZOHlsLQKKO1SEmscMLjBTxEV6urKfgrmEewnVse54r3KY MIm2EILacV6GQDC3JdwVuJcyUcEOAAiy70w2Z6il07IYrNfAkCXaR/4ksyezu0NOl5Co tZOQ== 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; bh=pt9ZUil/2B5wcm+TkD0BrIf3fmHoBR66aLscI2ljxIs=; b=tP/A4gVcI1iK3IW+uCK9akTk+oBgFuqlsOIhl/gGIOzD3la2DX0aspekHWTZrQ2ZxB YfP4dyWuIYJc34eHTbFiZWMRyl/NeaoyCeT7n1N3nufRFnUBJDc/I+y2zr2RUJ2Ng4mP 07/BL6W6G5Yd0lvuBxOh/Gx45HXM8fxzR65BlqUns3U3b+sLyA3PXDEOoVrtgejznJFo g0CvJwz/OojxZay9iSXZ83NAOvYNQzLBMf5YbbXuvCgyMjif3keVqzmwY2GJv23Lb4Wb ax+JsS8zC5oJ0eRsc8la1r15Tpo43m1Sv3uykm9g+XpbjtIGmdOP6uG87nW8LLqHWYNx oARA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=x5BkxIjN; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (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 z20si8881422edq.250.2019.09.12.04.39.48; Thu, 12 Sep 2019 04:39:48 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=x5BkxIjN; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731387AbfILLjs (ORCPT + 8 others); Thu, 12 Sep 2019 07:39:48 -0400 Received: from fllv0015.ext.ti.com ([198.47.19.141]:48314 "EHLO fllv0015.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731376AbfILLjs (ORCPT ); Thu, 12 Sep 2019 07:39:48 -0400 Received: from fllv0034.itg.ti.com ([10.64.40.246]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id x8CBddKa116594; Thu, 12 Sep 2019 06:39:39 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1568288379; bh=pt9ZUil/2B5wcm+TkD0BrIf3fmHoBR66aLscI2ljxIs=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=x5BkxIjNpWo0LzdhCZRuZYOOOcbNl5opx5CyOv1eXPEL0Eyl5y2W1DWIgOSklKufM RjivOfkXn7JgUVczxBFYKmylA/k/12O08NblNrvoQ2sVy0sbejsvMPawFJtulzP+NZ Flib08R5/rVUmIXY834pR4RVA0PevyZ5SqaloYTs= Received: from DLEE111.ent.ti.com (dlee111.ent.ti.com [157.170.170.22]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x8CBddaa007894 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 12 Sep 2019 06:39:39 -0500 Received: from DLEE114.ent.ti.com (157.170.170.25) by DLEE111.ent.ti.com (157.170.170.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Thu, 12 Sep 2019 06:39:39 -0500 Received: from fllv0040.itg.ti.com (10.64.41.20) by DLEE114.ent.ti.com (157.170.170.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5 via Frontend Transport; Thu, 12 Sep 2019 06:39:39 -0500 Received: from sokoban.bb.dnainternet.fi (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0040.itg.ti.com (8.15.2/8.15.2) with ESMTP id x8CBdKcw120606; Thu, 12 Sep 2019 06:39:37 -0500 From: Tero Kristo To: , , , , , CC: , Subject: [PATCHv5 07/10] soc: ti: omap-prm: add dra7 PRM data Date: Thu, 12 Sep 2019 14:39:13 +0300 Message-ID: <20190912113916.20093-8-t-kristo@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190912113916.20093-1-t-kristo@ti.com> References: <20190912113916.20093-1-t-kristo@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Add PRM instance data for dra7 family of SoCs. Initially this is just used to provide reset support. Signed-off-by: Tero Kristo --- drivers/soc/ti/omap_prm.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) -- 2.17.1 -- Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki diff --git a/drivers/soc/ti/omap_prm.c b/drivers/soc/ti/omap_prm.c index a5fde34f6afd..de11ce08ff7b 100644 --- a/drivers/soc/ti/omap_prm.c +++ b/drivers/soc/ti/omap_prm.c @@ -84,6 +84,19 @@ static const struct omap_prm_data omap4_prm_data[] = { { }, }; +static const struct omap_prm_data dra7_prm_data[] = { + { .name = "dsp1", .base = 0x4ae06400, .rstctrl = 0x10, .rstst = 0x14, .rstmap = rst_map_01 }, + { .name = "ipu", .base = 0x4ae06500, .rstctrl = 0x10, .rstst = 0x14, .clkdm_name = "ipu1", .rstmap = rst_map_012 }, + { .name = "core", .base = 0x4ae06700, .rstctrl = 0x210, .rstst = 0x214, .clkdm_name = "ipu2", .rstmap = rst_map_012 }, + { .name = "iva", .base = 0x4ae06f00, .rstctrl = 0x10, .rstst = 0x14, .rstmap = rst_map_012 }, + { .name = "dsp2", .base = 0x4ae07b00, .rstctrl = 0x10, .rstst = 0x14, .rstmap = rst_map_01 }, + { .name = "eve1", .base = 0x4ae07b40, .rstctrl = 0x10, .rstst = 0x14, .rstmap = rst_map_01 }, + { .name = "eve2", .base = 0x4ae07b80, .rstctrl = 0x10, .rstst = 0x14, .rstmap = rst_map_01 }, + { .name = "eve3", .base = 0x4ae07bc0, .rstctrl = 0x10, .rstst = 0x14, .rstmap = rst_map_01 }, + { .name = "eve4", .base = 0x4ae07c00, .rstctrl = 0x10, .rstst = 0x14, .rstmap = rst_map_01 }, + { }, +}; + static const struct omap_rst_map am3_per_rst_map[] = { { .rst = 1 }, { .rst = -1 }, @@ -104,6 +117,7 @@ static const struct omap_prm_data am3_prm_data[] = { static const struct of_device_id omap_prm_id_table[] = { { .compatible = "ti,omap4-prm-inst", .data = omap4_prm_data }, + { .compatible = "ti,dra7-prm-inst", .data = dra7_prm_data }, { .compatible = "ti,am3-prm-inst", .data = am3_prm_data }, { }, }; From patchwork Thu Sep 12 11:39:15 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tero Kristo X-Patchwork-Id: 173696 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:ce:0:0:0:0 with SMTP id r14csp2003980ilq; Thu, 12 Sep 2019 04:39:55 -0700 (PDT) X-Google-Smtp-Source: APXvYqzf7/qTK+A9VzrsnEMZUH6TtSyc632e1Oor+2rAWpUie0+H+v5G0nh46juUnJLg8joh+Pc8 X-Received: by 2002:a17:906:85c8:: with SMTP id i8mr34304273ejy.178.1568288395469; Thu, 12 Sep 2019 04:39:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568288395; cv=none; d=google.com; s=arc-20160816; b=RCy/HXSgLkUovCfWYB7jbFktIw0t+81IQgeDqpdClk0M6s223x8PdOZvhVQKOA1FND v2JqgfF8aDWyAK4wD/KM8017knI/WcniWaCb397q/oHsQ5LGw8Su+o+kRyEFFD+5fO+U PLtAQksMUDnoDwNHzsJDKeayRqMe1ASEYKnO93iSpp924jHgZ5On/lpAycoxF6E8P+kA whYqkciP147HSGg5e4Geac5jWOvVoxqrRiXtweFjGTFwq9QHht+eFuo5ONj0je11AJdz PCTRZSCOjeZmHDt43hyno4gctfpwK+2+9nZe8jDIqDdLlGp3fz/yLTah2VgwYn8xwSi0 4b7g== 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; bh=fLZbcw5wepXuSeFrsWtd637NuzfIOkB+KDiZWWlKW2M=; b=EgI40BUYdBECPqlJti/vok5tHNTm548DAgqCWzGe/u4rb6BUSGEWtFIVZpNjr8Jddc oJKgTnlFhGyE6lmdqOVrVW2p0d2qMrsOGlQGcgUm5jLMY8fgMBF8zGrVY8I3F5oBRf4P chghFPNigyMJuf8vOyQRR1yaP5dM+TRdyGJXo5XGHEWqcOD3Olo6pAv8atDb5EU6Ngsj LnGPNY+Gw/jw7RIx0fIRl4uoE7WevidzpcA0UwBdaFJxUuY7vNBBqPba8ZYZp9ljZLJb vgH//6PRXAmrDQ4XV1UNs3hSOsTw4iBbFh6gXD2cO1/oDcEWvpKvnwdPmWrhhzgYqr11 0//w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b="OJy/BAwd"; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (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 c12si14652476edb.394.2019.09.12.04.39.55; Thu, 12 Sep 2019 04:39:55 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b="OJy/BAwd"; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731422AbfILLjv (ORCPT + 8 others); Thu, 12 Sep 2019 07:39:51 -0400 Received: from fllv0016.ext.ti.com ([198.47.19.142]:47890 "EHLO fllv0016.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731375AbfILLjv (ORCPT ); Thu, 12 Sep 2019 07:39:51 -0400 Received: from lelv0266.itg.ti.com ([10.180.67.225]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id x8CBdiKf074127; Thu, 12 Sep 2019 06:39:44 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1568288384; bh=fLZbcw5wepXuSeFrsWtd637NuzfIOkB+KDiZWWlKW2M=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=OJy/BAwdAkD5gi8zkwckGHfcjKsG/npDDYEjsdgICUC9l9hfjW3fNtkHA+2hb/JhU uwzo/7gfpkIkxNGVyNNpBmS5CCjp4sgTtBojPQvsgRZBAucmxSowzr5QFKSVnsbMlC VSgvC2J6FSnqz1TAobjjtwOP177GEBajKYcKZC8Y= Received: from DLEE110.ent.ti.com (dlee110.ent.ti.com [157.170.170.21]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x8CBdisK012872 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 12 Sep 2019 06:39:44 -0500 Received: from DLEE109.ent.ti.com (157.170.170.41) by DLEE110.ent.ti.com (157.170.170.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Thu, 12 Sep 2019 06:39:44 -0500 Received: from fllv0040.itg.ti.com (10.64.41.20) by DLEE109.ent.ti.com (157.170.170.41) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5 via Frontend Transport; Thu, 12 Sep 2019 06:39:43 -0500 Received: from sokoban.bb.dnainternet.fi (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0040.itg.ti.com (8.15.2/8.15.2) with ESMTP id x8CBdKd0120606; Thu, 12 Sep 2019 06:39:42 -0500 From: Tero Kristo To: , , , , , CC: , Subject: [PATCHv5 09/10] soc: ti: omap-prm: add omap5 PRM data Date: Thu, 12 Sep 2019 14:39:15 +0300 Message-ID: <20190912113916.20093-10-t-kristo@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190912113916.20093-1-t-kristo@ti.com> References: <20190912113916.20093-1-t-kristo@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Add PRM instance data for omap5 family of SoCs. Initially this is just used to provide reset support. Signed-off-by: Tero Kristo --- drivers/soc/ti/omap_prm.c | 9 +++++++++ 1 file changed, 9 insertions(+) -- 2.17.1 -- Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki diff --git a/drivers/soc/ti/omap_prm.c b/drivers/soc/ti/omap_prm.c index 73ea64896770..38e8704c51ad 100644 --- a/drivers/soc/ti/omap_prm.c +++ b/drivers/soc/ti/omap_prm.c @@ -84,6 +84,14 @@ static const struct omap_prm_data omap4_prm_data[] = { { }, }; +static const struct omap_prm_data omap5_prm_data[] = { + { .name = "dsp", .base = 0x4ae06400, .rstctrl = 0x10, .rstst = 0x14, .rstmap = rst_map_01 }, + { .name = "core", .base = 0x4ae06700, .rstctrl = 0x210, .rstst = 0x214, .clkdm_name = "ipu", .rstmap = rst_map_012 }, + { .name = "iva", .base = 0x4ae07200, .rstctrl = 0x10, .rstst = 0x14, .rstmap = rst_map_012 }, + { .name = "device", .base = 0x4ae07c00, .rstctrl = 0x0, .rstst = 0x4, .rstmap = rst_map_01, .flags = OMAP_PRM_HAS_RSTCTRL | OMAP_PRM_HAS_NO_CLKDM }, + { }, +}; + static const struct omap_prm_data dra7_prm_data[] = { { .name = "dsp1", .base = 0x4ae06400, .rstctrl = 0x10, .rstst = 0x14, .rstmap = rst_map_01 }, { .name = "ipu", .base = 0x4ae06500, .rstctrl = 0x10, .rstst = 0x14, .clkdm_name = "ipu1", .rstmap = rst_map_012 }, @@ -136,6 +144,7 @@ static const struct omap_prm_data am4_prm_data[] = { static const struct of_device_id omap_prm_id_table[] = { { .compatible = "ti,omap4-prm-inst", .data = omap4_prm_data }, + { .compatible = "ti,omap5-prm-inst", .data = omap5_prm_data }, { .compatible = "ti,dra7-prm-inst", .data = dra7_prm_data }, { .compatible = "ti,am3-prm-inst", .data = am3_prm_data }, { .compatible = "ti,am4-prm-inst", .data = am4_prm_data }, From patchwork Thu Sep 12 11:39:16 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tero Kristo X-Patchwork-Id: 173697 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:ce:0:0:0:0 with SMTP id r14csp2003991ilq; Thu, 12 Sep 2019 04:39:56 -0700 (PDT) X-Google-Smtp-Source: APXvYqxNKln4LbMDCdrxg3M0HkyYuE6zWgx8nudgrhjgKL8FL5zEH/oaXC/cO1eeQwpx/m/YUHDd X-Received: by 2002:a17:906:c669:: with SMTP id ew9mr33828810ejb.285.1568288396202; Thu, 12 Sep 2019 04:39:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568288396; cv=none; d=google.com; s=arc-20160816; b=FpcSTqGGpgYQaETbNbL+EnPwvagH9fYwiuOLGP1O6jAyYIXV3Wt9OpfxTY3xVp0qra wSiE8NpV3LvwkAuJtE1dCGJPswoNmzjZJBESImuVS0ttomwJE0PnXoVlEq1CBBL2WitF i4qBfygNFjGB7BkKlr1rTK3DmLP8XOr143tfaBueHiG2x1xFs1pZGU+vzHXs0AA5Btra Idm3ygAFjyp706MxHVLCOIr5/7hYQgWKSD7tEj5Qg8hHM08VpvzuTGl5h8W8G9L5iq7Y Es92w+A086ai+jmzoK/Xzsr5XO/NzqyA0nS5zrpZx59HFSVmPqikgcoQvBRJlxpSAaYh Q2cw== 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; bh=YLleoDeFe+/39hjFYAaiNlP+EU5/AACmJxmEmj1xr2o=; b=QsW6VJXBmvAutW8sYeNt8SdIKLgCZzbwamn5jVkQHBYz1mHHwSkh6OGgmJKlskfjzk ooCdmP2u/oxJzkAMtS5nvjVOmV7QPBrCNitB9DPx3mowojU12T9+SAOVUfve7qXbRyNb vvzcvAm7nBATUnIL6ablbNjvK+31KMvG4vCcIrDp7Gwd3EDfscZ/W8kaPfDtHFmoQNcK g9Uh3o6GVFUJrg7kP6E/i3NklTsz6TawqrIEqDr9FsZ0RVezwrCM3doJrrK3D/U3yUZY UlDUuZI6feV/ZHIfSwZxelzyu6PgrJrWOkL8/TmqoDb5KjQz3RL0VRnm/JxKyldfGqEZ 2AiA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=UKfYta98; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (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 c12si14652476edb.394.2019.09.12.04.39.55; Thu, 12 Sep 2019 04:39:56 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=UKfYta98; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731427AbfILLjx (ORCPT + 8 others); Thu, 12 Sep 2019 07:39:53 -0400 Received: from fllv0015.ext.ti.com ([198.47.19.141]:48336 "EHLO fllv0015.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731375AbfILLjx (ORCPT ); Thu, 12 Sep 2019 07:39:53 -0400 Received: from lelv0265.itg.ti.com ([10.180.67.224]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id x8CBdkfr116608; Thu, 12 Sep 2019 06:39:46 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1568288386; bh=YLleoDeFe+/39hjFYAaiNlP+EU5/AACmJxmEmj1xr2o=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=UKfYta98/Cb+jehL2iHDW+IaIaAYBTcg4S3XxUVBitRtIWUsnJQnZAArtgGPcKQO+ ogYND/kzWQKNLTTVX/Z9pGz8K1AwX0DfdvS+YZtE55gzMIg8ztgscClffOxcasqJt3 HQ+iNT6ltMRrf2zVNxm/PMfXKqZ8J02UIVkBW+2g= Received: from DFLE114.ent.ti.com (dfle114.ent.ti.com [10.64.6.35]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x8CBdkwk050898 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 12 Sep 2019 06:39:46 -0500 Received: from DFLE105.ent.ti.com (10.64.6.26) by DFLE114.ent.ti.com (10.64.6.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Thu, 12 Sep 2019 06:39:46 -0500 Received: from fllv0040.itg.ti.com (10.64.41.20) by DFLE105.ent.ti.com (10.64.6.26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5 via Frontend Transport; Thu, 12 Sep 2019 06:39:46 -0500 Received: from sokoban.bb.dnainternet.fi (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0040.itg.ti.com (8.15.2/8.15.2) with ESMTP id x8CBdKd1120606; Thu, 12 Sep 2019 06:39:44 -0500 From: Tero Kristo To: , , , , , CC: , Subject: [PATCHv5 10/10] ARM: OMAP2+: pdata-quirks: add PRM data for reset support Date: Thu, 12 Sep 2019 14:39:16 +0300 Message-ID: <20190912113916.20093-11-t-kristo@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190912113916.20093-1-t-kristo@ti.com> References: <20190912113916.20093-1-t-kristo@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org The parent clockdomain for reset must be in force wakeup mode, otherwise the reset may never complete. Add pdata quirks for this purpose for PRM driver. Signed-off-by: Tero Kristo --- arch/arm/mach-omap2/pdata-quirks.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) -- 2.17.1 -- Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki diff --git a/arch/arm/mach-omap2/pdata-quirks.c b/arch/arm/mach-omap2/pdata-quirks.c index 6c6f8fce854e..4730f8c0cb0e 100644 --- a/arch/arm/mach-omap2/pdata-quirks.c +++ b/arch/arm/mach-omap2/pdata-quirks.c @@ -25,6 +25,7 @@ #include #include #include +#include #include "clockdomain.h" #include "common.h" @@ -565,6 +566,12 @@ void omap_pcs_legacy_init(int irq, void (*rearm)(void)) pcs_pdata.rearm = rearm; } +static struct ti_prm_platform_data ti_prm_pdata = { + .clkdm_deny_idle = clkdm_deny_idle, + .clkdm_allow_idle = clkdm_allow_idle, + .clkdm_lookup = clkdm_lookup, +}; + /* * GPIOs for TWL are initialized by the I2C bus and need custom * handing until DSS has device tree bindings. @@ -664,6 +671,11 @@ static struct of_dev_auxdata omap_auxdata_lookup[] = { /* Common auxdata */ OF_DEV_AUXDATA("ti,sysc", 0, NULL, &ti_sysc_pdata), OF_DEV_AUXDATA("pinctrl-single", 0, NULL, &pcs_pdata), + OF_DEV_AUXDATA("ti,omap4-prm-inst", 0, NULL, &ti_prm_pdata), + OF_DEV_AUXDATA("ti,omap5-prm-inst", 0, NULL, &ti_prm_pdata), + OF_DEV_AUXDATA("ti,dra7-prm-inst", 0, NULL, &ti_prm_pdata), + OF_DEV_AUXDATA("ti,am3-prm-inst", 0, NULL, &ti_prm_pdata), + OF_DEV_AUXDATA("ti,am4-prm-inst", 0, NULL, &ti_prm_pdata), { /* sentinel */ }, };