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: 10483885 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 56F4560380 for ; Sat, 23 Jun 2018 21:11:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 475EA289AD for ; Sat, 23 Jun 2018 21:11:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3BA4E289BA; Sat, 23 Jun 2018 21:11:01 +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=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id DA2D2289AD for ; Sat, 23 Jun 2018 21:11:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=KY/gQ5iiyyFKBcZ9xtcjsl16f9Rwh7+oKA+pe5KSNfA=; b=WWuz98TrNv9pDViAk+QzWZPI2E AtIs4cd+hvM8OcU6av5wXd6vc8Fmi/0DFFaOKg5+2rPylzfe+v0oizhHbhPbsR8ZOeWfNanbrqubF Y3cu9m+6oYXy7+zZg+N1Od3axepaqrDxblF+KEhTj9CyQXt8LGynYFe2FejAIJWJjeJq6KSjewjHA fjm1+UTNcSBZ9m+5e9cdabzYKwI7W2efRalXjYg33rkGO6LPb3Q9/rJJg4qWzX5Xk4lmEGBkohHmZ 8XyBtgU7lFDs8wdzNjKhH5IgXo0/mb9CNv63B1/WPDPZXAWgMfRZd3JJo1bFqty44fQYiZTL34Y/m ifEeOg5A==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fWpo2-0003nj-CB; Sat, 23 Jun 2018 21:10:50 +0000 Received: from vern.gendns.com ([206.190.152.46]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fWpnX-0002EF-Oe for linux-arm-kernel@lists.infradead.org; Sat, 23 Jun 2018 21:10:21 +0000 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 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 - lists.infradead.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: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180623_141019_864954_9A7F5CB7 X-CRM114-Status: GOOD ( 11.14 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ohad Ben-Cohen , Mark Rutland , David Lechner , Kevin Hilman , Tony Lindgren , Sekhar Nori , linux-kernel@vger.kernel.org, Bjorn Andersson , Rob Herring , =?UTF-8?q?Beno=C3=AEt=20Cousson?= MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.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 */