From patchwork Thu Nov 22 11:39:10 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roger Quadros X-Patchwork-Id: 151764 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp628778ljp; Thu, 22 Nov 2018 03:40:21 -0800 (PST) X-Google-Smtp-Source: AJdET5eqZKRzWEmRo0mhhdkPRNc3itOUeu1ytzjCn3WiFQn8lkMj2KHrwVpCtS/Z8YZaLQE2MON4 X-Received: by 2002:a62:868b:: with SMTP id x133mr11650351pfd.252.1542886821101; Thu, 22 Nov 2018 03:40:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542886821; cv=none; d=google.com; s=arc-20160816; b=T3v5IKWi/oY40FKPwxS9ngHdNYMifvHyfFBHG0FSCRbernXZazNn2xFiNNhpWDc2ET +/dgCx7JlfxwIbC8M4Obk5djKzJ7/AtcreW5SD2zGHyvIMG+ZuXbDmV4aAiJ2n5XSu2y owV0i5So4x016TlYmoTmkRL/KP+VVizdbHRmyIm7soSFmeP6/x37B8baEgen5WzQaaSm gvExbMIDSgjOQ2mmEFM8e7o0f3UOLtcLGoitSTX1uM7Q8Nw8Gpe/AexvPE57dXIco9AK mfPoskpOeNnsY7OraH/HhKY5n/NrY7iQWDqblKwCmqIIa6Dy7l+thFyJ4F0VdYWIASuj YQKw== 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; bh=UH9ZtOEAkM8LjqcjlORrkmUpFi0EsfdDpou6SyOEwFc=; b=rPIQmmAmJzCHQChISXDz1iZiMCxTaFRuwizRe6T17QiCNWcfV8AyOSnLJDPn+ZCfjU g5tLwlH1obLMp845u8yLYDOVhnxaihERz74GeGMuXxYqZlOyFZaPvcVhjrwpu936MCEL QjjUVsn4BabXD6s8glxPTxolnZk3mJlKe7TyN4jtMaE5qPc5VcM+1r9A0rqazIAr9EgE AI22T/5SdDS11cB65LHnqmCmpI9LkO/kQAOVYT5azlpEfE++lgf850dqu3OLXaIEdf0I AC92XbWCR2XfJK/zIzC2TyLsEnDDO4X2ibaE2FtT+gDRYOBPO3mGKpC4u44j2fqmSflA vgmA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=NONE dis=QUARANTINE) 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 1-v6si51805960plw.81.2018.11.22.03.40.20; Thu, 22 Nov 2018 03:40:21 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=NONE dis=QUARANTINE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2394942AbeKVWTT (ORCPT + 32 others); Thu, 22 Nov 2018 17:19:19 -0500 Received: from fllv0016.ext.ti.com ([198.47.19.142]:58510 "EHLO fllv0016.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2391015AbeKVWTS (ORCPT ); Thu, 22 Nov 2018 17:19:18 -0500 Received: from lelv0266.itg.ti.com ([10.180.67.225]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id wAMBeFN6008575; Thu, 22 Nov 2018 05:40:15 -0600 Received: from DLEE112.ent.ti.com (dlee112.ent.ti.com [157.170.170.23]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id wAMBeFVn130530 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 22 Nov 2018 05:40:15 -0600 Received: from DLEE110.ent.ti.com (157.170.170.21) by DLEE112.ent.ti.com (157.170.170.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1591.10; Thu, 22 Nov 2018 05:40:15 -0600 Received: from dlep33.itg.ti.com (157.170.170.75) by DLEE110.ent.ti.com (157.170.170.21) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1591.10 via Frontend Transport; Thu, 22 Nov 2018 05:40:15 -0600 Received: from dlelxv97.itg.ti.com (dlelxv97.itg.ti.com [172.17.2.193]) by dlep33.itg.ti.com (8.14.3/8.13.8) with ESMTP id wAMBeFfn025374; Thu, 22 Nov 2018 05:40:15 -0600 Received: from localhost.localdomain (vboxa0400828d.dhcp.ti.com [172.22.239.63]) by dlelxv97.itg.ti.com (8.14.3/8.13.8) with ESMTP id wAMBdDfD013203; Thu, 22 Nov 2018 05:40:11 -0600 From: Roger Quadros To: CC: , , , , , , , , , , , , , , , , Subject: [PATCH 14/17] ARM: OMAP2+: use pdata quirks for PRUSS reset lines on AM335x Date: Thu, 22 Nov 2018 13:39:10 +0200 Message-ID: <1542886753-17625-15-git-send-email-rogerq@ti.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1542886753-17625-1-git-send-email-rogerq@ti.com> References: <1542886753-17625-1-git-send-email-rogerq@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Suman Anna The omap_device API is needed to perform the reset management for any IP instances with PRCM RSTCTRL registers (hard reset lines). This API is limited to the mach-omap2 layer, and cannot be exposed to drivers layer directly. So use platform data ops and pdata quirks for the PRUSS IP in AM335x SoCs to plumb the required omap_device API. The PRUSS SoC bus driver can then use these pdata ops to achieve the required reset functionality. This is being implemented this way as there is no separate reset driver at the moment. Signed-off-by: Suman Anna Signed-off-by: Keerthy --- arch/arm/mach-omap2/pdata-quirks.c | 11 +++++++++++ 1 file changed, 11 insertions(+) -- 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 9fec5f8..97fc5a2 100644 --- a/arch/arm/mach-omap2/pdata-quirks.c +++ b/arch/arm/mach-omap2/pdata-quirks.c @@ -26,6 +26,7 @@ #include #include #include +#include #include #include @@ -438,6 +439,14 @@ static struct wkup_m3_platform_data wkup_m3_data = { }; #endif +#ifdef CONFIG_SOC_AM33XX +static struct pruss_platform_data pruss_pdata = { + .reset_name = "pruss", + .assert_reset = omap_device_assert_hardreset, + .deassert_reset = omap_device_deassert_hardreset, +}; +#endif + #ifdef CONFIG_SOC_OMAP5 static void __init omap5_uevm_legacy_init(void) { @@ -580,6 +589,8 @@ static struct of_dev_auxdata omap_auxdata_lookup[] = { #ifdef CONFIG_SOC_AM33XX OF_DEV_AUXDATA("ti,am3352-wkup-m3", 0x44d00000, "44d00000.wkup_m3", &wkup_m3_data), + OF_DEV_AUXDATA("ti,am3356-pruss-soc-bus", 0x4a326004, + "4a326004.pruss-soc-bus", &pruss_pdata), #endif #ifdef CONFIG_SOC_AM43XX OF_DEV_AUXDATA("ti,am4372-wkup-m3", 0x44d00000, "44d00000.wkup_m3",