From patchwork Sun Sep 11 09:32:23 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jit Loon Lim X-Patchwork-Id: 1676428 X-Patchwork-Delegate: marek.vasut@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=ZCKhyRIC; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4MQPf636Klz1yhR for ; Sun, 11 Sep 2022 19:32:44 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id DF23884133; Sun, 11 Sep 2022 11:32:37 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="ZCKhyRIC"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 2DA4A83FB2; Sun, 11 Sep 2022 11:32:36 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=0.9 required=5.0 tests=AC_FROM_MANY_DOTS,BAYES_00, DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.2 Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 1E7B784133 for ; Sun, 11 Sep 2022 11:32:32 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: phobos.denx.de; spf=none smtp.mailfrom=jitloonl@ecsmtp.png.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1662888753; x=1694424753; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=EKZ60JoPaJJrnuxH6AdzNNtxzHCBSSOgG1t1z0/pRzU=; b=ZCKhyRICGDAvL2LPzyPaKVB3iQuhZvwwwanfuQ6bvdLdFXPMJJO8g3We 0Zl301NBZiZ22/cEQQ5Bl1a2R7150MxkFkKRc/7e8LY7YNj1bLf6jIxye bjgIzVUeFZVkSnBe0NeQdU58pQhcpM6oS7sf/VptxN3xorRQlT+neMlM6 +upC6jFERCd5SrnTZ2+s/Szfxt2eMT//eEIz6/C4x0frnYd6MVTVBdiqZ BuXTg5YTuhkh7apqngfZFsWDkVd+HnHBauj9PYh/hDdgPQ23VZyo7jEUe jhxI67faqDMYKwR/XjZMoTsl8uNR58iCwlQUvGkxeH5fRe+ZP3/tabpps A==; X-IronPort-AV: E=McAfee;i="6500,9779,10466"; a="284727765" X-IronPort-AV: E=Sophos;i="5.93,307,1654585200"; d="scan'208";a="284727765" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Sep 2022 02:32:31 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.93,307,1654585200"; d="scan'208";a="758075009" Received: from pglmail07.png.intel.com ([10.221.193.207]) by fmsmga001.fm.intel.com with ESMTP; 11 Sep 2022 02:32:26 -0700 Received: from localhost (pgli0028.png.intel.com [10.221.84.177]) by pglmail07.png.intel.com (Postfix) with ESMTP id 529AA4842; Sun, 11 Sep 2022 17:32:26 +0800 (+08) Received: by localhost (Postfix, from userid 12048045) id 50457E00414; Sun, 11 Sep 2022 17:32:26 +0800 (+08) From: Jit Loon Lim To: u-boot@lists.denx.de Cc: Jagan Teki , Vignesh R , Marek , Simon , Tien Fong , Kok Kiang , Siew Chin , Sin Hui , Raaj , Dinesh , Boon Khai , Alif , Teik Heng , Hazim , Jit Loon Lim , Sieu Mun Tang , Thor Thayer Subject: [PATCH] arch: arm: mach-socfpga: HSD #1707095796: Remove MPFE Firewall for SMMU Date: Sun, 11 Sep 2022 17:32:23 +0800 Message-Id: <20220911093223.28029-1-jit.loon.lim@intel.com> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean From: Thor Thayer Remove firewall on MPFE so that SMMU can setup/walk tables in the DDR. Signed-off-by: Thor Thayer Signed-off-by: Jit Loon Lim --- arch/arm/mach-socfpga/firewall.c | 6 ++++++ arch/arm/mach-socfpga/include/mach/base_addr_soc64.h | 1 + arch/arm/mach-socfpga/include/mach/firewall.h | 1 + 3 files changed, 8 insertions(+) diff --git a/arch/arm/mach-socfpga/firewall.c b/arch/arm/mach-socfpga/firewall.c index 69229dc651..bbfcdbd9ae 100644 --- a/arch/arm/mach-socfpga/firewall.c +++ b/arch/arm/mach-socfpga/firewall.c @@ -104,4 +104,10 @@ void firewall_setup(void) socfpga_get_sysmgr_addr() + SYSMGR_SOC64_DMA); writel(SYSMGR_DMAPERIPH_ALL_NS, socfpga_get_sysmgr_addr() + SYSMGR_SOC64_DMA_PERIPH); + +#ifdef CONFIG_TARGET_SOCFPGA_AGILEX + /* Disable the MPFE Firewall for SMMU */ + writel(FIREWALL_MPFE_SCR_DISABLE_ALL, SOCFPGA_FW_MPFE_SCR_ADDRESS); +#endif + } diff --git a/arch/arm/mach-socfpga/include/mach/base_addr_soc64.h b/arch/arm/mach-socfpga/include/mach/base_addr_soc64.h index 3f899fcfa3..45c6458597 100644 --- a/arch/arm/mach-socfpga/include/mach/base_addr_soc64.h +++ b/arch/arm/mach-socfpga/include/mach/base_addr_soc64.h @@ -10,6 +10,7 @@ #define SOCFPGA_SDR_SCHEDULER_ADDRESS 0xf8000400 #define SOCFPGA_HMC_MMR_IO48_ADDRESS 0xf8010000 #define SOCFPGA_SDR_ADDRESS 0xf8011000 +#define SOCFPGA_FW_MPFE_SCR_ADDRESS 0xf8020000 #if IS_ENABLED(CONFIG_TARGET_SOCFPGA_AGILEX) || \ IS_ENABLED(CONFIG_TARGET_SOCFPGA_N5X) #define SOCFPGA_FW_MPU_DDR_SCR_ADDRESS 0xf8020200 diff --git a/arch/arm/mach-socfpga/include/mach/firewall.h b/arch/arm/mach-socfpga/include/mach/firewall.h index 5cb7f23f8f..885c04c27f 100644 --- a/arch/arm/mach-socfpga/include/mach/firewall.h +++ b/arch/arm/mach-socfpga/include/mach/firewall.h @@ -75,6 +75,7 @@ struct socfpga_firwall_l4_sys { }; #define FIREWALL_L4_DISABLE_ALL (BIT(0) | BIT(24) | BIT(16)) +#define FIREWALL_MPFE_SCR_DISABLE_ALL (BIT(0) | BIT(8) | BIT(16)) #define FIREWALL_BRIDGE_DISABLE_ALL (~0) /* Cache coherency unit (CCU) registers */