From patchwork Mon Aug 21 23:48:12 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Suman Anna X-Patchwork-Id: 110599 Delivered-To: patch@linaro.org Received: by 10.140.95.78 with SMTP id h72csp1931053qge; Mon, 21 Aug 2017 16:48:54 -0700 (PDT) X-Received: by 10.84.230.134 with SMTP id e6mr21782836plk.2.1503359334299; Mon, 21 Aug 2017 16:48:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1503359334; cv=none; d=google.com; s=arc-20160816; b=SA+Nks5PWP0/EFp0U7/fXjO1C9tmf7T7LWKMpDrtYSL15RfTUK8AvOfHh5Vh/t5Ei4 5Xv4C3Lf1MrT0wLaYGIIo233F/1Vh1lvlcCcc1viTAmwoivpJ5WtTe9atY1yWMVA5MxN sXOMRIfFV0HuRNJ3noq7whzNVtOo3LTmmH3PiO1hWhlRUX3R4LSMNpjS1axIAEZIC81L I49V18qyp1S44vhhLBBPxQ/EbsgEkrFWGHmuSTd/ocTBB2jRBa0pHjJswwYpldcUq0Q2 RvgvHG+SOcRtErtyYLN7ZwMdKWIfe/G932b3Qql6rDi2+D0kPF4heHr2IeUap6u/jm2o 1Rfg== 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 :arc-authentication-results; bh=BOoIGLIiUSjrxv5Gdp4VJ9ioh3yyZHyXxSxNnK+iPn0=; b=DVAFQFAsj+MDyViLLfVSigGE16mbDU83GdwVcazpw83K+iyngWV+EOuoUUBGSBcUGL 0GgyjCGZXoVplmFUfgEz3S2Cp5aZQ1YziYwy0TA2kNep2Ts4Lwijjf2XU6CbrgE6UVwY d0rHA0p+KXsZ6paKSxL9JIvOr4NG2BXtYliCmX0D+bHcIyUr2zxjo91VpN8zsiSJ24P7 nvCIDW/3q5kNbMAtBHApyAciwAoBiVdEnwS3lut8MI6kMQ6w7bKGcK0fRDKQi6GtWCET PV7ZKIQvOcFGpTuAeAOookGfTn44MiBy143jo4VojtPefoF65Z1c1cUSqp5M+tJ49DMJ fyFA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@ti.com header.s=ti-com-17Q1 header.b=AgROb4TD; 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=fail (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 b1si8624655pld.664.2017.08.21.16.48.54; Mon, 21 Aug 2017 16:48:54 -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=neutral (body hash did not verify) header.i=@ti.com header.s=ti-com-17Q1 header.b=AgROb4TD; 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=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754168AbdHUXsw (ORCPT + 3 others); Mon, 21 Aug 2017 19:48:52 -0400 Received: from lelnx193.ext.ti.com ([198.47.27.77]:45841 "EHLO lelnx193.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754015AbdHUXsu (ORCPT ); Mon, 21 Aug 2017 19:48:50 -0400 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by lelnx193.ext.ti.com (8.15.1/8.15.1) with ESMTP id v7LNmKZ5028079; Mon, 21 Aug 2017 18:48:20 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1503359301; bh=U99UCTDwiXrTUv+WZDAmfNqlj38dWgCw1fQCsEdw37k=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=AgROb4TD99/tf7QApNfnmeVDJHsz4XaOfirII3d5Bpqe2BzhU0KQLslnGJMPMUCsS 4NgfW8ijpEy/addvEhX0OBjxePXw/J88Q8kHFysNF/JOaKqoIqgRHMJ5mY7bvZuoKi fbQvhu3/ZCgEEjLs7D0jTHfCO9dsFgDwNRz6brcs= Received: from DFLE105.ent.ti.com (dfle105.ent.ti.com [10.64.6.26]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id v7LNmKxF005764; Mon, 21 Aug 2017 18:48:20 -0500 Received: from DFLE104.ent.ti.com (10.64.6.25) by DFLE105.ent.ti.com (10.64.6.26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.1.845.34; Mon, 21 Aug 2017 18:48:20 -0500 Received: from dlep33.itg.ti.com (157.170.170.75) by DFLE104.ent.ti.com (10.64.6.25) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.845.34 via Frontend Transport; Mon, 21 Aug 2017 18:48:20 -0500 Received: from legion.dal.design.ti.com (legion.dal.design.ti.com [128.247.22.53]) by dlep33.itg.ti.com (8.14.3/8.13.8) with ESMTP id v7LNmKfk025298; Mon, 21 Aug 2017 18:48:20 -0500 Received: from localhost (irmo.dhcp.ti.com [128.247.58.153]) by legion.dal.design.ti.com (8.11.7p1+Sun/8.11.7) with ESMTP id v7LNmK307082; Mon, 21 Aug 2017 18:48:20 -0500 (CDT) From: Suman Anna To: Tony Lindgren CC: Paul Walmsley , , , Tero Kristo , Suman Anna Subject: [PATCH 2/8] ARM: DRA7: hwmod data: Add MMU data for DSPs Date: Mon, 21 Aug 2017 18:48:12 -0500 Message-ID: <20170821234818.4755-3-s-anna@ti.com> X-Mailer: git-send-email 2.13.1 In-Reply-To: <20170821234818.4755-1-s-anna@ti.com> References: <20170821234818.4755-1-s-anna@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 the data structures for representing the MMUs within the DSP processor subsystems present in DRA7xx/AM57xx SoCs. The DRA7xx family of SoCs usually have one or two DSPs. The DRA74x/DRA76x family has two DSPs, while DRA72x/DRA71x has only a single DSP. Each DSP subsystem has two MMUs, one for the processor core and the other for the internal EDMA block. The hwmod data for the second DSP is only added for DRA74x/DRA76x family of SoCs. Both these MMUs share a common reset line, the MMU on the EDMA port is expected to be mirror-programmed alongside the primary MMU. The reset data is added to both the MMUs to allow the omap_hwmod layer to skip the enabling and idling of these devices, as that would require the reset be released, which is outside the scope of the hwmod core code. The other PRCM data fields are also skipped for both the second MMUs, this will be handled as part of the primary MMU enabling sequence. The pdata quirks will also not be added for the second MMU as the OMAP IOMMU driver releases the reset once and is expected to program both the MMUs together. Signed-off-by: Suman Anna --- arch/arm/mach-omap2/omap_hwmod_7xx_data.c | 109 ++++++++++++++++++++++++++++++ 1 file changed, 109 insertions(+) -- 2.13.1 -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/arch/arm/mach-omap2/omap_hwmod_7xx_data.c b/arch/arm/mach-omap2/omap_hwmod_7xx_data.c index bf55802448ac..63ad0d3217dc 100644 --- a/arch/arm/mach-omap2/omap_hwmod_7xx_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_7xx_data.c @@ -1821,6 +1821,77 @@ static struct omap_hwmod_class dra7xx_mmu_hwmod_class = { .sysc = &dra7xx_mmu_sysc, }; +/* DSP MMUs */ +static struct omap_hwmod_rst_info dra7xx_mmu_dsp_resets[] = { + { .name = "mmu_cache", .rst_shift = 1 }, +}; + +/* mmu0 - dsp1 */ +static struct omap_hwmod dra7xx_mmu0_dsp1_hwmod = { + .name = "mmu0_dsp1", + .class = &dra7xx_mmu_hwmod_class, + .clkdm_name = "dsp1_clkdm", + .rst_lines = dra7xx_mmu_dsp_resets, + .rst_lines_cnt = ARRAY_SIZE(dra7xx_mmu_dsp_resets), + .main_clk = "dpll_dsp_m2_ck", + .prcm = { + .omap4 = { + .clkctrl_offs = DRA7XX_CM_DSP1_DSP1_CLKCTRL_OFFSET, + .rstctrl_offs = DRA7XX_RM_DSP1_RSTCTRL_OFFSET, + .context_offs = DRA7XX_RM_DSP1_DSP1_CONTEXT_OFFSET, + .modulemode = MODULEMODE_HWCTRL, + }, + }, +}; + +/* mmu1 - dsp1 */ +static struct omap_hwmod dra7xx_mmu1_dsp1_hwmod = { + .name = "mmu1_dsp1", + .class = &dra7xx_mmu_hwmod_class, + .clkdm_name = "dsp1_clkdm", + .rst_lines = dra7xx_mmu_dsp_resets, + .rst_lines_cnt = ARRAY_SIZE(dra7xx_mmu_dsp_resets), + .main_clk = "dpll_dsp_m2_ck", + .prcm = { + .omap4 = { + .rstctrl_offs = DRA7XX_RM_DSP1_RSTCTRL_OFFSET, + }, + }, +}; + +/* mmu0 - dsp2 */ +static struct omap_hwmod dra7xx_mmu0_dsp2_hwmod = { + .name = "mmu0_dsp2", + .class = &dra7xx_mmu_hwmod_class, + .clkdm_name = "dsp2_clkdm", + .rst_lines = dra7xx_mmu_dsp_resets, + .rst_lines_cnt = ARRAY_SIZE(dra7xx_mmu_dsp_resets), + .main_clk = "dpll_dsp_m2_ck", + .prcm = { + .omap4 = { + .clkctrl_offs = DRA7XX_CM_DSP2_DSP2_CLKCTRL_OFFSET, + .rstctrl_offs = DRA7XX_RM_DSP2_RSTCTRL_OFFSET, + .context_offs = DRA7XX_RM_DSP2_DSP2_CONTEXT_OFFSET, + .modulemode = MODULEMODE_HWCTRL, + }, + }, +}; + +/* mmu1 - dsp2 */ +static struct omap_hwmod dra7xx_mmu1_dsp2_hwmod = { + .name = "mmu1_dsp2", + .class = &dra7xx_mmu_hwmod_class, + .clkdm_name = "dsp2_clkdm", + .rst_lines = dra7xx_mmu_dsp_resets, + .rst_lines_cnt = ARRAY_SIZE(dra7xx_mmu_dsp_resets), + .main_clk = "dpll_dsp_m2_ck", + .prcm = { + .omap4 = { + .rstctrl_offs = DRA7XX_RM_DSP2_RSTCTRL_OFFSET, + }, + }, +}; + /* IPU MMUs */ static struct omap_hwmod_rst_info dra7xx_mmu_ipu_resets[] = { { .name = "mmu_cache", .rst_shift = 2 }, @@ -2964,6 +3035,38 @@ static struct omap_hwmod_ocp_if dra7xx_l3_main_1__l4_cfg = { .user = OCP_USER_MPU | OCP_USER_SDMA, }; +/* l3_main_1 -> mmu0_dsp1 */ +static struct omap_hwmod_ocp_if dra7xx_l3_main_1__mmu0_dsp1 = { + .master = &dra7xx_l3_main_1_hwmod, + .slave = &dra7xx_mmu0_dsp1_hwmod, + .clk = "l3_iclk_div", + .user = OCP_USER_MPU | OCP_USER_SDMA, +}; + +/* l3_main_1 -> mmu1_dsp1 */ +static struct omap_hwmod_ocp_if dra7xx_l3_main_1__mmu1_dsp1 = { + .master = &dra7xx_l3_main_1_hwmod, + .slave = &dra7xx_mmu1_dsp1_hwmod, + .clk = "l3_iclk_div", + .user = OCP_USER_MPU | OCP_USER_SDMA, +}; + +/* l3_main_1 -> mmu0_dsp2 */ +static struct omap_hwmod_ocp_if dra7xx_l3_main_1__mmu0_dsp2 = { + .master = &dra7xx_l3_main_1_hwmod, + .slave = &dra7xx_mmu0_dsp2_hwmod, + .clk = "l3_iclk_div", + .user = OCP_USER_MPU | OCP_USER_SDMA, +}; + +/* l3_main_1 -> mmu1_dsp2 */ +static struct omap_hwmod_ocp_if dra7xx_l3_main_1__mmu1_dsp2 = { + .master = &dra7xx_l3_main_1_hwmod, + .slave = &dra7xx_mmu1_dsp2_hwmod, + .clk = "l3_iclk_div", + .user = OCP_USER_MPU | OCP_USER_SDMA, +}; + /* l3_main_1 -> mmu_ipu1 */ static struct omap_hwmod_ocp_if dra7xx_l3_main_1__mmu_ipu1 = { .master = &dra7xx_l3_main_1_hwmod, @@ -4089,6 +4192,8 @@ static struct omap_hwmod_ocp_if *dra7xx_hwmod_ocp_ifs[] __initdata = { &dra7xx_l4_per1__mmc2, &dra7xx_l4_per1__mmc3, &dra7xx_l4_per1__mmc4, + &dra7xx_l3_main_1__mmu0_dsp1, + &dra7xx_l3_main_1__mmu1_dsp1, &dra7xx_l3_main_1__mmu_ipu1, &dra7xx_l3_main_1__mmu_ipu2, &dra7xx_l4_cfg__mpu, @@ -4153,11 +4258,15 @@ static struct omap_hwmod_ocp_if *dra7xx_gp_hwmod_ocp_ifs[] __initdata = { /* SoC variant specific hwmod links */ static struct omap_hwmod_ocp_if *dra76x_hwmod_ocp_ifs[] __initdata = { &dra7xx_l4_per3__usb_otg_ss4, + &dra7xx_l3_main_1__mmu0_dsp2, + &dra7xx_l3_main_1__mmu1_dsp2, NULL, }; static struct omap_hwmod_ocp_if *dra74x_hwmod_ocp_ifs[] __initdata = { &dra7xx_l4_per3__usb_otg_ss4, + &dra7xx_l3_main_1__mmu0_dsp2, + &dra7xx_l3_main_1__mmu1_dsp2, NULL, };