From patchwork Sat Jun 23 21:08:05 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Lechner X-Patchwork-Id: 10483849 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 324536054B for ; Sat, 23 Jun 2018 21:09:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 23901289AD for ; Sat, 23 Jun 2018 21:09:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 17C9328A11; Sat, 23 Jun 2018 21:09:35 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A8F68289B0 for ; Sat, 23 Jun 2018 21:09:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751895AbeFWVJc (ORCPT ); Sat, 23 Jun 2018 17:09:32 -0400 Received: from vern.gendns.com ([206.190.152.46]:36174 "EHLO vern.gendns.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751794AbeFWVJ3 (ORCPT ); Sat, 23 Jun 2018 17:09:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lechnology.com; s=default; h=References:In-Reply-To:Message-Id:Date:Subject :Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=maEMz18pCKG24uaA32JCn8pQVV5NOMrBgt8j+PS1fP0=; b=nbPaJlB1gtHLeiICM5m48YNO2 sLYRT8NzDCFtRnGeOW0MlK3+Qrm/ToEIq+n19MUjUTW0UmAcNn22W2++ic/NW9wX6aSdgWnIkc+wX FBBQaYFEV47ohwWkMs2bjBdCQpmxPlf9si5rSQego8h5h5mLgycC8m/FVyJlrDu4BQlnrl/YJDOAi oq0OvO/fOt05quSRrNg6SRD+z+eLFvh7HQlqqs+TPWu0OVqQClVB214RtL0+/W9BtpkJybJ1+d8hX U9UiaEwsRj2dnzMe3vzV59UHz0uF4Q02dkZfDTRhGUBV3PbyOvF/tWweT7BW5M4CXG7idPdnBf9aw V+cdItSbw==; Received: from 108-198-5-147.lightspeed.okcbok.sbcglobal.net ([108.198.5.147]:51098 helo=freyr.lechnology.com) by vern.gendns.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.91) (envelope-from ) id 1fWpmh-00CkwS-22; Sat, 23 Jun 2018 17:09:27 -0400 From: David Lechner To: linux-remoteproc@vger.kernel.org, devicetree@vger.kernel.org, linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: David Lechner , Ohad Ben-Cohen , Bjorn Andersson , Rob Herring , Mark Rutland , =?UTF-8?q?Beno=C3=AEt=20Cousson?= , Tony Lindgren , Sekhar Nori , Kevin Hilman , linux-kernel@vger.kernel.org Subject: [PATCH 3/8] ARM: OMAP2+: add pdata quirks for PRUSS reset Date: Sat, 23 Jun 2018 16:08:05 -0500 Message-Id: <20180623210810.21232-4-david@lechnology.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180623210810.21232-1-david@lechnology.com> References: <20180623210810.21232-1-david@lechnology.com> X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - vern.gendns.com X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - lechnology.com X-Get-Message-Sender-Via: vern.gendns.com: authenticated_id: davidmain+lechnology.com/only user confirmed/virtual account not confirmed X-Authenticated-Sender: vern.gendns.com: davidmain@lechnology.com X-Source: X-Source-Args: X-Source-Dir: Sender: linux-remoteproc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-remoteproc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This adds platform data for the PRUSS reset on OMAP2+. This is following the pattern used by several other platform devices on these SoCs since there is not a proper reset controller. Signed-off-by: David Lechner --- arch/arm/mach-omap2/pdata-quirks.c | 9 +++++++++ include/linux/platform_data/ti-pruss.h | 18 ++++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 include/linux/platform_data/ti-pruss.h diff --git a/arch/arm/mach-omap2/pdata-quirks.c b/arch/arm/mach-omap2/pdata-quirks.c index 7f02743edbe4..8ea35d6cded5 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 #include @@ -424,6 +425,12 @@ static struct wkup_m3_platform_data wkup_m3_data = { .assert_reset = omap_device_assert_hardreset, .deassert_reset = omap_device_deassert_hardreset, }; + +static struct ti_pruss_platform_data pruss_data = { + .reset_name = "pruss", + .assert_reset = omap_device_assert_hardreset, + .deassert_reset = omap_device_deassert_hardreset, +}; #endif #ifdef CONFIG_SOC_OMAP5 @@ -568,6 +575,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,am3352-pru-rproc", 0x4a300000, "4a300000.cpu", + &pruss_data), #endif #ifdef CONFIG_SOC_AM43XX OF_DEV_AUXDATA("ti,am4372-wkup-m3", 0x44d00000, "44d00000.wkup_m3", diff --git a/include/linux/platform_data/ti-pruss.h b/include/linux/platform_data/ti-pruss.h new file mode 100644 index 000000000000..e401e621ebdf --- /dev/null +++ b/include/linux/platform_data/ti-pruss.h @@ -0,0 +1,18 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * TI PRU remote processor platform data + */ + +#ifndef _LINUX_PLATFORM_DATA_TI_PRU_H +#define _LINUX_PLATFORM_DATA_TI_PRU_H + +struct platform_device; + +struct ti_pruss_platform_data { + const char *reset_name; + + int (*assert_reset)(struct platform_device *pdev, const char *name); + int (*deassert_reset)(struct platform_device *pdev, const char *name); +}; + +#endif /* _LINUX_PLATFORM_DATA_TI_PRU_H */