From patchwork Thu Nov 22 11:38:58 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roger Quadros X-Patchwork-Id: 151752 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp627920ljp; Thu, 22 Nov 2018 03:39:35 -0800 (PST) X-Google-Smtp-Source: AFSGD/XgUTgsF4yn1kjZ16LEGeH/jNQ0fWVmye/OFL3ITf7ku+QWmSYxwDnI0ZfT5gwvxCZmINgJ X-Received: by 2002:a63:d604:: with SMTP id q4mr9658317pgg.175.1542886775760; Thu, 22 Nov 2018 03:39:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542886775; cv=none; d=google.com; s=arc-20160816; b=0T0Xbk2Mn9pPgUZgvnSUVD7ZxRTHXzGUwSZgZDkFq3W48HbvomPQa1ibhZ5ByGCavv X4eV9dHeh8vOlKdXgTKJuIXIbzrl3NKwidyN6aRuKr0tI15SqrgrEqDsKkVKxhbd6Ov3 ocOVKpJqQB5Ouum0Q9S2G07RjnRojaDVRytmGJWFxOBlvFqMpMgSQ0jtDU1NmjB1YGnD X/xFYgLSZlej4j6HW9ybq4kQT+BVIQuNE8TV8hhC/8feihIRooYb/x1K7g/rHjXNAD+G c3tb7njBDXr77foVkZbrzNNu8J1rHA6XU8ifyzfAIMfc8QBDCsHLt3OWooLGAnCNQVAu Ui4A== 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=Vsu2WMTLUTp5sgvxFU35Wft62tcCmDLzcWY8Z57l2ig=; b=Uypas78dlvWX0v+A1/C3wK/j4LiQa17kKqT5MROuYmi1Ks9+/NhS78cD+I/8V1VZjz DUtdLJ6TUZ3wu3XJ9kmXKyLjHPiaCA/zGF+FNDMgzljuy7RtT1cawfD9RWOEZhQvicZD Oj1P5LLeCwDyFAeQmu3RvrWvKyWBwQpvkVz58a437kSsYce3AotRfq+9BkXsg/7HXHyk QbIemCGue/YA71sTcIjLk6//itUJ4UVmoEfSEO4p7Gydb7pVcbnGWQ3AkPfyAVv3bnYV UAyZsD55/BBje6VYXkpmNBXO7/AeGLZcBVwsR73w7sg0Zw6a5BufHfBL5OYKOUg3Kskp ZxCA== 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 w7-v6si50040491pgh.131.2018.11.22.03.39.35; Thu, 22 Nov 2018 03:39:35 -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 S2405555AbeKVWSe (ORCPT + 32 others); Thu, 22 Nov 2018 17:18:34 -0500 Received: from fllv0016.ext.ti.com ([198.47.19.142]:58390 "EHLO fllv0016.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2405540AbeKVWSc (ORCPT ); Thu, 22 Nov 2018 17:18:32 -0500 Received: from fllv0035.itg.ti.com ([10.64.41.0]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id wAMBdSe3008384; Thu, 22 Nov 2018 05:39:28 -0600 Received: from DLEE112.ent.ti.com (dlee112.ent.ti.com [157.170.170.23]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTPS id wAMBdSkq106871 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 22 Nov 2018 05:39:28 -0600 Received: from DLEE113.ent.ti.com (157.170.170.24) 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:39:26 -0600 Received: from dlep32.itg.ti.com (157.170.170.100) by DLEE113.ent.ti.com (157.170.170.24) 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:39:26 -0600 Received: from dlelxv97.itg.ti.com (dlelxv97.itg.ti.com [172.17.2.193]) by dlep32.itg.ti.com (8.14.3/8.13.8) with ESMTP id wAMBdQdb011201; Thu, 22 Nov 2018 05:39:26 -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 wAMBdDf1013203; Thu, 22 Nov 2018 05:39:22 -0600 From: Roger Quadros To: CC: , , , , , , , , , , , , , , , , Subject: [PATCH 02/17] soc: ti: pruss: Define platform data for PRUSS bus driver Date: Thu, 22 Nov 2018 13:38:58 +0200 Message-ID: <1542886753-17625-3-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 PRUSS can have a PRCM reset line associated with the IP on some OMAP architecture based SoCs. The reset needs to be programmed properly before accessing any of the internal registers in the PRUSS. This functionality is achieved through the omap_device layer, which is not exposed outside of mach-omap2 layer. Define a platform data structure for PRUSS so that this API can be invoked through platform data ops from the driver. Signed-off-by: Suman Anna --- include/linux/platform_data/ti-pruss.h | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 include/linux/platform_data/ti-pruss.h -- Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki diff --git a/include/linux/platform_data/ti-pruss.h b/include/linux/platform_data/ti-pruss.h new file mode 100644 index 0000000..96a66cc --- /dev/null +++ b/include/linux/platform_data/ti-pruss.h @@ -0,0 +1,25 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Platform data for PRUSS on TI SoCs + * + * Copyright (C) 2014-2018 Texas Instruments Incorporated - http://www.ti.com/ + */ + +#ifndef _PLAT_TI_PRUSS_H +#define _PLAT_TI_PRUSS_H + +struct platform_device; + +/** + * struct pruss_platform_data - PRUSS platform data + * @reset_name: name of the reset + * @assert_reset: PRU-specific handler for putting the device in reset + * @deassert_reset: PRU-specific handler for releasing the device from reset + */ +struct 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 /* _PLAT_TI_PRUSS_H */