From patchwork Tue Oct 8 07:19: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: 175455 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp5334638ill; Tue, 8 Oct 2019 00:19:42 -0700 (PDT) X-Google-Smtp-Source: APXvYqzIJuqcys5qeOHjduUO/ABOTmrS7UQqFvPdF+qA7LTRH6DWb9K8LNk23U0DD1pvazaYpVbv X-Received: by 2002:a50:ab58:: with SMTP id t24mr32473330edc.131.1570519182406; Tue, 08 Oct 2019 00:19:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570519182; cv=none; d=google.com; s=arc-20160816; b=G/NsTA9Kl0zxMG0U/wxttUZXhwBrwCZcRalcGmJjThyFNDl+DSsAG41AscKe1AsD9O Sus6OGuvVdCYSbjNL/6/mN0BLJhGWJEB5e8mmAgOWt2p4iga6XbKQwa9B3vRFWU4qrs8 smFg4JYyJywkcMCfSWc9opYnC2iR64LDn18zZFbXvKOnTDscGxLyVEGbbeelGLlfJvbg 72TjEtMSTVsUnAIb44YN2RTJ2QQyjLni7HbIkmOt90ZThzMcIOSCW9WWDc4m8L9oNNpt LH7YLAC719UOIekm9eyDQHteHHh+Nq8G140mx5StRdHC+B4iNdvXD72kNBF4r7ZVlTJg Ciew== 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=AI7/1r1iKLY0MGsxTyQxbf9w0nKjGKX6U8MlMjF8ewVOp/uEDE/lVFDJ56MwDoTpBp 7cZtnq4QfPqDcuw2kLSDrLAgUPiTct/clR71WV4K33eIUDDV0e6d4RAiG4TWay9mYXMx HuMcpJlrKyzyj8KcqL63Y+8TCiU9YNd3lIyjDdZMlJJis/LjDU63gsfjVS/iL6v0fzhW AeM2fcpLd3vAzXgmlCZs+k0xxp3kL8CEHyctD1G6OzgqhaFEB6KRuBiXXY92tbm+8E9z GR+m4RrY2wI4wtGoWxvSrDHL+KUbIqNnVh00UNBGZRTMWy271uPTuoeDJFzbM+6R27Vy s6xg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=XxJVogC+; 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=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 m24si8494415ejx.286.2019.10.08.00.19.42; Tue, 08 Oct 2019 00:19:42 -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=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=XxJVogC+; 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=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729740AbfJHHTg (ORCPT + 5 others); Tue, 8 Oct 2019 03:19:36 -0400 Received: from fllv0016.ext.ti.com ([198.47.19.142]:34656 "EHLO fllv0016.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730156AbfJHHTg (ORCPT ); Tue, 8 Oct 2019 03:19:36 -0400 Received: from lelv0265.itg.ti.com ([10.180.67.224]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id x987JSWs025151; Tue, 8 Oct 2019 02:19:28 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1570519168; bh=Y7vuHmki0AitevIY4QTjUpFCGHBSgA345LWzYu3kdGg=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=XxJVogC+ICfus+EQEnqmy4M/NgIF7sViXfL32XYZacWn9Xa0O2q8HGiaNCMhlMPLf ouaNimPomNW63vaSpcr9WxCBJrXvwVmCt/Hzx18a4yv7cqHZGfyvjw/QjyRilrLzO4 Lq2TdKLXy4Orr8R6ahaFDOiucPQoAopIJSJiIC/s= Received: from DFLE115.ent.ti.com (dfle115.ent.ti.com [10.64.6.36]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x987JSIw073220 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 8 Oct 2019 02:19:28 -0500 Received: from DFLE100.ent.ti.com (10.64.6.21) 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; Tue, 8 Oct 2019 02:19:25 -0500 Received: from lelv0326.itg.ti.com (10.180.67.84) by DFLE100.ent.ti.com (10.64.6.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; Tue, 8 Oct 2019 02:19:25 -0500 Received: from sokoban.bb.dnainternet.fi (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0326.itg.ti.com (8.15.2/8.15.2) with ESMTP id x987JJj6027770; Tue, 8 Oct 2019 02:19:26 -0500 From: Tero Kristo To: , CC: , , , , Subject: [PATCHv7 3/9] soc: ti: omap-prm: poll for reset complete during de-assert Date: Tue, 8 Oct 2019 10:19:07 +0300 Message-ID: <20191008071913.28740-4-t-kristo@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191008071913.28740-1-t-kristo@ti.com> References: <20191008071913.28740-1-t-kristo@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 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 Reviewed-by: Philipp Zabel 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 Tue Oct 8 07:19:08 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tero Kristo X-Patchwork-Id: 175457 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp5334665ill; Tue, 8 Oct 2019 00:19:43 -0700 (PDT) X-Google-Smtp-Source: APXvYqz8VjtlGFiabtVuVeGWWTkp1KxVxiLt01suVrGWWBtU7U90YakrCNVYK08I01PAkW4kJc8i X-Received: by 2002:a17:906:9483:: with SMTP id t3mr6850815ejx.319.1570519183719; Tue, 08 Oct 2019 00:19:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570519183; cv=none; d=google.com; s=arc-20160816; b=PsU6j+VVX4z/8436Gvl5Fv/RnrBXeKSvd0PlrhXNeDw0nUjMbJVLrW77OZzAneYGmd AGsW5/TY/kFzTbamxWRiZpJN1kB9tTSlflUiAXvmy1TWilUYN807VGc3gJupcgOquWtY aQcuad+KpjyweH5D9WGqMysHfez+sFTcFPqoIeIIpn2ljXHwdLW6YK8fP0TKEGQb2ujQ 5DWqKdM6Zh9a3Qfyp8dtPBIwBrzxElR7sBS2hGxoSwBtW5d5tO2y4pnDGgr/3d7YTc3Q BUpdcHnHc7BS7SCG2KImV8xx2nPa0iv/z6qvxUGf9YPb0TzZ6FtiW221ikU4OU8yWRMV v07w== 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=IEieFdyUs2HgqVuybc+2HMhNJg3Jy8Dt9pWF/yLjXD/v3tp3fof3CGudxGx6jR9wlZ hnQH6JxCfcTs/fn/8GvWnn7t4A63iP17/AxrwtbHPQhr3vXW+T9osQLm+R8UQrPYbI1O EOsm+yqtxR6RjDaa3o9eKno0rLsP5oyGEdnZRlOF6LwqMctXMAJBgf+IjQukGIbdM3/7 SLPVb4cMNEebj97RVwXdczeTe6f+z85fPP11bC0mIY/SsqAO7IAM1+HhJtYiOsVF7ZJB t3cweTLM9mxEzRwcbZRnsSBeEGtpY+rP64UCiePw5wEhpMuHXnf2U2a1B+OPQGwdNbGj yB1w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=aXoWtyAh; 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=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 m24si8494415ejx.286.2019.10.08.00.19.43; Tue, 08 Oct 2019 00:19:43 -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=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=aXoWtyAh; 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=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730275AbfJHHTi (ORCPT + 5 others); Tue, 8 Oct 2019 03:19:38 -0400 Received: from fllv0015.ext.ti.com ([198.47.19.141]:53620 "EHLO fllv0015.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730156AbfJHHTi (ORCPT ); Tue, 8 Oct 2019 03:19:38 -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 x987JUSX046372; Tue, 8 Oct 2019 02:19:30 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1570519170; bh=0tln0NRFdBItHIltiQcebxGnUnAgfgYhStbd62D0/jM=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=aXoWtyAhavZwrT8Gf172BBkRxLyMdJqLQIVPUehvfwE2xLmALDNtofKTnuFrO+eNp 7t6SYXnH1z51toDF1o3xvxDsBqX0jrjUVPcuDcTeVk1YlUhoiSviFiuNQHXVbmqJPp KBclVYxu/WXwMf7wDVhQ7zkdhmvgP5Mv2EO2H9tA= Received: from DFLE113.ent.ti.com (dfle113.ent.ti.com [10.64.6.34]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x987JUe5046135 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 8 Oct 2019 02:19:30 -0500 Received: from DFLE115.ent.ti.com (10.64.6.36) by DFLE113.ent.ti.com (10.64.6.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Tue, 8 Oct 2019 02:19:27 -0500 Received: from lelv0326.itg.ti.com (10.180.67.84) 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 via Frontend Transport; Tue, 8 Oct 2019 02:19:27 -0500 Received: from sokoban.bb.dnainternet.fi (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0326.itg.ti.com (8.15.2/8.15.2) with ESMTP id x987JJj7027770; Tue, 8 Oct 2019 02:19:28 -0500 From: Tero Kristo To: , CC: , , , , Subject: [PATCHv7 4/9] soc: ti: omap-prm: add support for denying idle for reset clockdomain Date: Tue, 8 Oct 2019 10:19:08 +0300 Message-ID: <20191008071913.28740-5-t-kristo@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191008071913.28740-1-t-kristo@ti.com> References: <20191008071913.28740-1-t-kristo@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 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 Tue Oct 8 07:19: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: 175460 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp5334722ill; Tue, 8 Oct 2019 00:19:46 -0700 (PDT) X-Google-Smtp-Source: APXvYqyWGgE4qoImtufoIB8StLpO5m7wvZ2MfOIPm+tSHHyvpQgvJd+fU7ms7mPXT8+SU8mM2oMY X-Received: by 2002:a17:906:3108:: with SMTP id 8mr28031767ejx.11.1570519186856; Tue, 08 Oct 2019 00:19:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570519186; cv=none; d=google.com; s=arc-20160816; b=jE3n4KZH1W9y+VDaRwHn2fUkN27wGYEmGsoY8nCL/D4vm8S8I73woUtLQIHCA5iLAh 019bA46LtJKg1pfyhluBWAaSaduBQ6vHa8al1q40y7RTyPbLQ5m2626YkgSEAJN588oO mGc+iXL7ZPDjWtah5sVYAYMPqH5z2VLecq2KPHBSU6UtMHvtZ4SgfThqetfnYvY1tJCs TSvBv6CAbo5TFA7OToAC+641BM24dgpnfmie4pYsqb9T/a0HijBXMLPzr/C/159xIKQc K9WL3N8HeCGm6VxJKHvBIzc2SY1DejPkUFx+8JHUV05zk15Vi3PnCAUbEZKc6twGfLvP AU3A== 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=i43fJtmGzu9z8pn+XQCLbjJYFgNsPKrsLoNWbrf2/76hxTv/nDSPsaSJTvuPIRXlVy EWl1MpL1H9nIfaX9OJOf1cW905tCTr1bbqahV92bu9aQpg+ojQUT2R7A9s6nbPV3L8jX 0dirWALCAyR1JB3KPaoLfFxy80pX7y/YFElYf4B2GndtYZT/xmhkYWDah5lXJrEuVFUn VJr5G6CBqG3je0HJHA87uIM8+9hOK6CbXlXBHF69Yn7RVGmQoa48ZYhKDeiLFVKsrpjT nA3+KdmuHnqM9MCS39zFhy29ygOTqso170HP2pKzfh5Rpy5zURWL6OG8w0NMNrBFYDUo tMrQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=qMPMlGx6; 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=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 m24si8494415ejx.286.2019.10.08.00.19.46; Tue, 08 Oct 2019 00:19:46 -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=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=qMPMlGx6; 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=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730290AbfJHHTq (ORCPT + 5 others); Tue, 8 Oct 2019 03:19:46 -0400 Received: from lelv0143.ext.ti.com ([198.47.23.248]:33700 "EHLO lelv0143.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730156AbfJHHTq (ORCPT ); Tue, 8 Oct 2019 03:19:46 -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 x987JYNu043122; Tue, 8 Oct 2019 02:19:34 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1570519174; bh=jVjHqDUh4JTBppk9XVlo05dAGntMMljP5k/tZSWLMM4=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=qMPMlGx6ecRciSgX/El2AXi9xIcKqqCY0Rc8EpuvpvNnfWyFuiq9SfotHzoilJ3iA +VK6FQjtVzU9rS9f5ropU2UT/U4OlNFRY9pTHh+igzgZp+e1wqycJjBPgXb9DsU9Nw qqVwghtflLe1hwYzA0iXGEutehBHxp41YFv2OLqk= Received: from DFLE110.ent.ti.com (dfle110.ent.ti.com [10.64.6.31]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x987JYoE049093 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 8 Oct 2019 02:19:34 -0500 Received: from DFLE112.ent.ti.com (10.64.6.33) by DFLE110.ent.ti.com (10.64.6.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Tue, 8 Oct 2019 02:19:33 -0500 Received: from lelv0326.itg.ti.com (10.180.67.84) by DFLE112.ent.ti.com (10.64.6.33) 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; Tue, 8 Oct 2019 02:19:31 -0500 Received: from sokoban.bb.dnainternet.fi (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0326.itg.ti.com (8.15.2/8.15.2) with ESMTP id x987JJj9027770; Tue, 8 Oct 2019 02:19:32 -0500 From: Tero Kristo To: , CC: , , , , Subject: [PATCHv7 6/9] soc: ti: omap-prm: add data for am33xx Date: Tue, 8 Oct 2019 10:19:10 +0300 Message-ID: <20191008071913.28740-7-t-kristo@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191008071913.28740-1-t-kristo@ti.com> References: <20191008071913.28740-1-t-kristo@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 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 Tue Oct 8 07:19: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: 175459 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp5334701ill; Tue, 8 Oct 2019 00:19:45 -0700 (PDT) X-Google-Smtp-Source: APXvYqwn+iMLSsajQ/MNFtM3wk0v2ZHthaMrOpk24gUzxLf4VFMwXTVeOlpLU/uavAfAB6HGyUp/ X-Received: by 2002:a50:a666:: with SMTP id d93mr32257590edc.217.1570519185222; Tue, 08 Oct 2019 00:19:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570519185; cv=none; d=google.com; s=arc-20160816; b=rMpCXJIWY1J1+V/SlR4YFgRWn3GQR+rEs5SZuBCBl253j0hgAUbRBgK82LsyeiDXrB 2f7gv4p80uJmxGs3m9otkxj//JG3+6/0TadTW5eVcvczfTUlBXwWzy0mp9rzKX/hikR1 3gWCwsPuDYRkEAjEtVXi7FDwl0riqBi3onmFqcrh2A8hSX70GI4fmnRNYDeBJ6E8dJZ7 aq6cFii1Og7TNkkXNdQrmemlpof9I7KKjiShHjQMwygT96gwWFm/rZ57ykmEMFHZghSb RwIMv2S3go3xojGt6auanaRtILs69xoINVXM5+jCN6cXyJ4cThs0hmKcQ3hdk1vdfFtt ofwg== 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=C2VVnrbg/JUgnnDtcqAo3ICdYd0lDb+idFe1yII7zRS6ocfNEgDkqswnZVBCwoqYSr rumlCj/INTMJjN+daxdQtNYGUfIWmCkiLE843ZstnnmZ7Qs8/mXBFxZbRp9Tp5KFpycr Qd8sI7fzh3VkXa5jW0ze0b24b9Gx09wChiFRiYxXVU11d5TiI2om3hO0aOtwA23EybZc Wza/PDCt17c8ILvztBZl3+T2tvTxD5LIl59undpxGsNBAT8p12V0Rnz73ptf5/5dcN6A MP9KMUYzN843yLv6AuTagq44Wc3OyGSwBHUBXF5+ytHKsYqnh8kgPiMRAVGYfAxIcAv3 bhGg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=kXmmpbzy; 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=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 m24si8494415ejx.286.2019.10.08.00.19.45; Tue, 08 Oct 2019 00:19:45 -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=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=kXmmpbzy; 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=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730288AbfJHHTo (ORCPT + 5 others); Tue, 8 Oct 2019 03:19:44 -0400 Received: from fllv0016.ext.ti.com ([198.47.19.142]:34704 "EHLO fllv0016.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730156AbfJHHTo (ORCPT ); Tue, 8 Oct 2019 03:19:44 -0400 Received: from lelv0265.itg.ti.com ([10.180.67.224]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id x987JawW025186; Tue, 8 Oct 2019 02:19:36 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1570519176; bh=pt9ZUil/2B5wcm+TkD0BrIf3fmHoBR66aLscI2ljxIs=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=kXmmpbzyuJZRMcx+Fr8pHKNpwneu8HcWVw4rIWC6PGfGRHJFYWQ2Xi8TLZQ2DdHSK Un9TbY5zgTnbHRurBrQsZ27ONU+GfbsZdapqe8dZEcJo405axT7H1d7Xbt0nTUdfr1 ygyLMP1tNvmM8bCSFkYG7W55gZrq4nPmrKHZeDxY= 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 x987JaR9073300 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 8 Oct 2019 02:19:36 -0500 Received: from DLEE114.ent.ti.com (157.170.170.25) 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; Tue, 8 Oct 2019 02:19:33 -0500 Received: from lelv0326.itg.ti.com (10.180.67.84) 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; Tue, 8 Oct 2019 02:19:33 -0500 Received: from sokoban.bb.dnainternet.fi (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0326.itg.ti.com (8.15.2/8.15.2) with ESMTP id x987JJjA027770; Tue, 8 Oct 2019 02:19:34 -0500 From: Tero Kristo To: , CC: , , , , Subject: [PATCHv7 7/9] soc: ti: omap-prm: add dra7 PRM data Date: Tue, 8 Oct 2019 10:19:11 +0300 Message-ID: <20191008071913.28740-8-t-kristo@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191008071913.28740-1-t-kristo@ti.com> References: <20191008071913.28740-1-t-kristo@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 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 Tue Oct 8 07:19: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: 175461 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp5334754ill; Tue, 8 Oct 2019 00:19:49 -0700 (PDT) X-Google-Smtp-Source: APXvYqyUMPFpxQQG+fs/UzIiCKLo5ECSreWNe1r/ForqNWv7wQ2dGW5GAzxNKd5v+Be1YD+rP1c+ X-Received: by 2002:a17:907:20e4:: with SMTP id rh4mr27616593ejb.59.1570519189104; Tue, 08 Oct 2019 00:19:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570519189; cv=none; d=google.com; s=arc-20160816; b=dUbHhmbhtHbcH7iV5MJR9CaXxLkWRvFODohjviZpH9xOFkicAA3w6IakMw+qkMLJuX C5tEw7jq5CcPut1yb3FODQRl9c0qgJABsU65wq7tjTMW29m/uEnibeRFWo/GAPHk01xg hsm4oqOMVZ4wtHSoesbfH0KAYiDVQvWA62YZ286/5f1Lute/bG3SeDoko74yORsAbwcZ +b+Orc+rxQqbUZia28qcWTg9PeUpx8F4btMGdcdfxTz78DeszayjaWatu7VhRlAu2suP 9vNEiozfSflcWWeZlY5FR3/Wcp8CzlFPLug1mNG5ixhSSMFNyiVEFjn9l560nAGHrZhE wygA== 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=TLJzFaDGrfR7zYUgMJnTM6uHF4H+5qrJ9lcRIUGwjDw=; b=Fvxa4bZxMDNZYIOnoQ15zEdmGIEZ/V5KYurnzYpVUwkA9qI1w3rVQX7hEkZGEmaVPK BZ8vpwQJkTZrQAs/TgHj83mGv5pdI1nbL+Rf7LyqPs/pCkt7AdZqQ7HlzoS4iBffq+19 yRiT8gbmWEdtIOIYwsaxjh+vnqJOmt0G+VFS0RoAMLv6msYToKgGfACJV+BoVNHYuDa9 mniBn0V9KhqSODKSIyrO3mNYacRFlY+0+rBq4z6StaomxRF+Cfr11DrjEDPhtbZGjZv9 U6nqdS1PIlNeu8Ri5m2f/UQ4G5D0Wd50Z+f0A17vbt032sx5oKVNRrHQ3mUWKFIfwNwc 37TA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=Eqm5kBJS; 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=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 m24si8494415ejx.286.2019.10.08.00.19.48; Tue, 08 Oct 2019 00:19:49 -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=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=Eqm5kBJS; 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=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730297AbfJHHTs (ORCPT + 5 others); Tue, 8 Oct 2019 03:19:48 -0400 Received: from lelv0142.ext.ti.com ([198.47.23.249]:40654 "EHLO lelv0142.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730156AbfJHHTs (ORCPT ); Tue, 8 Oct 2019 03:19:48 -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 x987JcXC114730; Tue, 8 Oct 2019 02:19:38 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1570519178; bh=TLJzFaDGrfR7zYUgMJnTM6uHF4H+5qrJ9lcRIUGwjDw=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=Eqm5kBJSAchtrXNE8KMMgxD6isH4qB3uJ85EldHBsHtJh487k72aHHbTf/eZI3/Q2 snyIF9rRp5V5lnemXZXHIVB2wZHs6QfEEz8j8HSlHAwHw8YZO/BxYtqu3FTxIlHL2G 1zH0eKuuPIAA2g1QuKSc97O6kYp0iZsiFWNOwuVA= 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 x987JcD0073328 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 8 Oct 2019 02:19:38 -0500 Received: from DLEE114.ent.ti.com (157.170.170.25) 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; Tue, 8 Oct 2019 02:19:35 -0500 Received: from lelv0326.itg.ti.com (10.180.67.84) 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; Tue, 8 Oct 2019 02:19:35 -0500 Received: from sokoban.bb.dnainternet.fi (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0326.itg.ti.com (8.15.2/8.15.2) with ESMTP id x987JJjB027770; Tue, 8 Oct 2019 02:19:36 -0500 From: Tero Kristo To: , CC: , , , , Subject: [PATCHv7 8/9] soc: ti: omap-prm: add am4 PRM data Date: Tue, 8 Oct 2019 10:19:12 +0300 Message-ID: <20191008071913.28740-9-t-kristo@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191008071913.28740-1-t-kristo@ti.com> References: <20191008071913.28740-1-t-kristo@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 Add PRM instance data for am4 family of SoCs. Initially this is just used to provide reset support. Signed-off-by: Tero Kristo --- drivers/soc/ti/omap_prm.c | 20 ++++++++++++++++++++ 1 file changed, 20 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 de11ce08ff7b..73ea64896770 100644 --- a/drivers/soc/ti/omap_prm.c +++ b/drivers/soc/ti/omap_prm.c @@ -115,10 +115,30 @@ static const struct omap_prm_data am3_prm_data[] = { { }, }; +static const struct omap_rst_map am4_per_rst_map[] = { + { .rst = 1, .st = 0 }, + { .rst = -1 }, +}; + +static const struct omap_rst_map am4_device_rst_map[] = { + { .rst = 0, .st = 1 }, + { .rst = 1, .st = 0 }, + { .rst = -1 }, +}; + +static const struct omap_prm_data am4_prm_data[] = { + { .name = "gfx", .base = 0x44df0400, .rstctrl = 0x10, .rstst = 0x14, .rstmap = rst_map_0, .clkdm_name = "gfx_l3" }, + { .name = "per", .base = 0x44df0800, .rstctrl = 0x10, .rstst = 0x14, .rstmap = am4_per_rst_map, .clkdm_name = "pruss_ocp" }, + { .name = "wkup", .base = 0x44df2000, .rstctrl = 0x10, .rstst = 0x14, .rstmap = am3_wkup_rst_map, .flags = OMAP_PRM_HAS_NO_CLKDM }, + { .name = "device", .base = 0x44df4000, .rstctrl = 0x0, .rstst = 0x4, .rstmap = am4_device_rst_map, .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 }, { .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 Tue Oct 8 07:19: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: 175462 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp5334770ill; Tue, 8 Oct 2019 00:19:49 -0700 (PDT) X-Google-Smtp-Source: APXvYqy1nHfTlD+XfQTRriLI5C35eI67Jbwd0OOhqM4hf+C+88G116Na28tb/Q0ceTTAFo4iFGfG X-Received: by 2002:a17:906:168f:: with SMTP id s15mr27654021ejd.109.1570519189729; Tue, 08 Oct 2019 00:19:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570519189; cv=none; d=google.com; s=arc-20160816; b=iNrwVZ7u56KZUqFV1sBYOCCvkbAA8h+0iR2SSVM5u2kpkLifNdpdNQ7qZAEEJ9w2W1 WvD7FLBxRryNYV3jij19hYPPjcKtW8ULHOe7RKXyDE+uk27YtfqxgGRWMH/+rndrGt+N hY/kXtYrqubtks7KD+5LpgmG4sdV3eyiDwLZIWqd8K4zBylA4TifGrt69Sq9AFkonFEw oYZJjSVX7L682DHzuA0i5Yl2pkt7CINEX9k0Tp9HIz0FZ4bMnHVngaFbmCXZrQ/Vwue1 jIn/xJdza7z3M9RNU3GzrQz3OQyjip3DdDGznsMcsqzm6hsDboUXUCsSIQYOImup/NZF 4XXw== 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=tzNG5PY0eOSveVOFvfHuFU43AeQ24Y0f98FAS+77LguQ9RLG/eMQ9BBVAWosH/sGHA Nr764l6hvUAQ3VFci5yYJrEDhZq2PRUnAbnv53Fwhf+8qF2lZ0sHm75UQjUhN8F66atT 1Isy5CUdYDATQperpBYqVAbWBraC3n8A2a5m4DBnoxcAw8hYmGWLJsg6ftx6BRaxEkDb roY6ORyxU92wsZPQHa6zqvuFbwtcz4dBtl8dhHwrCFwnpU0wulgkVPVqTjQ1dsyLN1G9 mKhOi06CuJe+tMkdUOeiRpcnBDm3yyuvUbO2JTei20TcpzHeJHh7ZZorYhqGi78ZYex3 H+Vg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=ua9kQoRX; 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=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 m24si8494415ejx.286.2019.10.08.00.19.49; Tue, 08 Oct 2019 00:19:49 -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=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=ua9kQoRX; 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=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730298AbfJHHTs (ORCPT + 5 others); Tue, 8 Oct 2019 03:19:48 -0400 Received: from lelv0142.ext.ti.com ([198.47.23.249]:40656 "EHLO lelv0142.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730293AbfJHHTs (ORCPT ); Tue, 8 Oct 2019 03:19:48 -0400 Received: from lelv0266.itg.ti.com ([10.180.67.225]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id x987JelW114743; Tue, 8 Oct 2019 02:19:40 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1570519180; bh=fLZbcw5wepXuSeFrsWtd637NuzfIOkB+KDiZWWlKW2M=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=ua9kQoRXHFcHjSbc3KacdaWIG0EiDiQ3Gq+kLmMHlGArUdNJujoBWt7vARZKNszPV +mGhRaHDPsW/VkUXH18g89TvDE8p0FMeYHyXJUJ+cjLQOdubetOYSsDunBkjEjjBaY sRwjlHsiZRV4yXUEdknzRvadthVpXuJq/St8lQkc= Received: from DLEE108.ent.ti.com (dlee108.ent.ti.com [157.170.170.38]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x987JePu049154 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 8 Oct 2019 02:19:40 -0500 Received: from DLEE101.ent.ti.com (157.170.170.31) by DLEE108.ent.ti.com (157.170.170.38) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Tue, 8 Oct 2019 02:19:37 -0500 Received: from lelv0326.itg.ti.com (10.180.67.84) by DLEE101.ent.ti.com (157.170.170.31) 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; Tue, 8 Oct 2019 02:19:37 -0500 Received: from sokoban.bb.dnainternet.fi (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0326.itg.ti.com (8.15.2/8.15.2) with ESMTP id x987JJjC027770; Tue, 8 Oct 2019 02:19:38 -0500 From: Tero Kristo To: , CC: , , , , Subject: [PATCHv7 9/9] soc: ti: omap-prm: add omap5 PRM data Date: Tue, 8 Oct 2019 10:19:13 +0300 Message-ID: <20191008071913.28740-10-t-kristo@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191008071913.28740-1-t-kristo@ti.com> References: <20191008071913.28740-1-t-kristo@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 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 },