All of lore.kernel.org
 help / color / mirror / Atom feed
From: chee.hong.ang at intel.com <chee.hong.ang@intel.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v1 14/20] mmc: dwmmc: socfpga: Secure register access in MMC driver
Date: Mon,  2 Dec 2019 02:25:15 -0800	[thread overview]
Message-ID: <1575282321-11597-15-git-send-email-chee.hong.ang@intel.com> (raw)
In-Reply-To: <1575282321-11597-1-git-send-email-chee.hong.ang@intel.com>

From: Chee Hong Ang <chee.hong.ang@intel.com>

Allow MMC driver to access System Manager's SDMMC control
register in non-secure mode (EL2).

Signed-off-by: Chee Hong Ang <chee.hong.ang@intel.com>
---
 drivers/mmc/socfpga_dw_mmc.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/mmc/socfpga_dw_mmc.c b/drivers/mmc/socfpga_dw_mmc.c
index 568a3e7..b856a0b 100644
--- a/drivers/mmc/socfpga_dw_mmc.c
+++ b/drivers/mmc/socfpga_dw_mmc.c
@@ -5,6 +5,7 @@
 
 #include <common.h>
 #include <asm/arch/clock_manager.h>
+#include <asm/arch/secure_reg_helper.h>
 #include <asm/arch/system_manager.h>
 #include <clk.h>
 #include <dm.h>
@@ -56,10 +57,12 @@ static void socfpga_dwmci_clksel(struct dwmci_host *host)
 
 	debug("%s: drvsel %d smplsel %d\n", __func__,
 	      priv->drvsel, priv->smplsel);
-	writel(sdmmc_mask, socfpga_get_sysmgr_addr() + SYSMGR_SDMMC);
+	socfpga_secure_reg_write32(sdmmc_mask, socfpga_get_sysmgr_addr() +
+				   SYSMGR_SDMMC);
 
 	debug("%s: SYSMGR_SDMMCGRP_CTRL_REG = 0x%x\n", __func__,
-		readl(socfpga_get_sysmgr_addr() + SYSMGR_SDMMC));
+	      socfpga_secure_reg_read32(socfpga_get_sysmgr_addr() +
+	      SYSMGR_SDMMC));
 
 	/* Enable SDMMC clock */
 	setbits_le32(socfpga_get_clkmgr_addr() + CLKMGR_PERPLL_EN,
-- 
2.7.4

  parent reply	other threads:[~2019-12-02 10:25 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-02 10:25 [U-Boot] [PATCH v1 00/20] Enable ARM Trusted Firmware for U-Boot chee.hong.ang at intel.com
2019-12-02 10:25 ` [U-Boot] [PATCH v1 01/20] configs: stratix10: Remove CONFIG_OF_EMBED chee.hong.ang at intel.com
2019-12-02 10:25 ` [U-Boot] [PATCH v1 02/20] arm: socfpga: add fit source file for pack itb with ATF chee.hong.ang at intel.com
2019-12-02 10:25 ` [U-Boot] [PATCH v1 03/20] arm: socfpga: Add function for checking description from FIT image chee.hong.ang at intel.com
2019-12-02 10:25 ` [U-Boot] [PATCH v1 04/20] arm: socfpga: Load FIT image with ATF support chee.hong.ang at intel.com
2019-12-02 10:25 ` [U-Boot] [PATCH v1 05/20] arm: socfpga: Override 'lowlevel_init' to support ATF chee.hong.ang at intel.com
2019-12-02 10:25 ` [U-Boot] [PATCH v1 06/20] configs: socfpga: Enable FIT image loading with ATF support chee.hong.ang at intel.com
2019-12-02 10:25 ` [U-Boot] [PATCH v1 07/20] arm: socfpga: Disable "spin-table" method for booting Linux chee.hong.ang at intel.com
2019-12-02 10:25 ` [U-Boot] [PATCH v1 08/20] arm: socfpga: Add SMC helper function for Intel SOCFPGA (64bits) chee.hong.ang at intel.com
2019-12-02 10:25 ` [U-Boot] [PATCH v1 09/20] arm: socfpga: Define SMC function identifiers for PSCI SiP services chee.hong.ang at intel.com
2019-12-02 10:25 ` [U-Boot] [PATCH v1 10/20] arm: socfpga: Add secure register access helper functions for SoC 64bits chee.hong.ang at intel.com
2019-12-02 10:25 ` [U-Boot] [PATCH v1 11/20] arm: socfpga: Secure register access for clock manager (SoC 64bits) chee.hong.ang at intel.com
2019-12-02 10:25 ` [U-Boot] [PATCH v1 12/20] arm: socfpga: Secure register access in PHY mode setup chee.hong.ang at intel.com
2019-12-02 10:25 ` [U-Boot] [PATCH v1 13/20] arm: socfpga: Secure register access for reading PLL frequency chee.hong.ang at intel.com
2019-12-02 10:25 ` chee.hong.ang at intel.com [this message]
2019-12-02 10:25 ` [U-Boot] [PATCH v1 15/20] net: designware: socfpga: Secure register access in MAC driver chee.hong.ang at intel.com
2019-12-02 10:25 ` [U-Boot] [PATCH v1 16/20] arm: socfpga: Secure register access in Reset Manager driver chee.hong.ang at intel.com
2019-12-02 10:25 ` [U-Boot] [PATCH v1 17/20] arm: socfpga: stratix10: Initialize timer in SPL chee.hong.ang at intel.com
2019-12-02 10:25 ` [U-Boot] [PATCH v1 18/20] arm: socfpga: stratix10: Refactor FPGA reconfig driver to support ATF chee.hong.ang at intel.com
2019-12-02 10:25 ` [U-Boot] [PATCH v1 19/20] arm: socfpga: Bridge reset now invokes SMC calls to query FPGA config status chee.hong.ang at intel.com
2019-12-02 10:25 ` [U-Boot] [PATCH v1 20/20] sysreset: socfpga: Invoke PSCI call for COLD reset chee.hong.ang at intel.com
2019-12-02 13:27 ` [U-Boot] [PATCH v1 00/20] Enable ARM Trusted Firmware for U-Boot Simon Goldschmidt
2019-12-02 13:38   ` Ang, Chee Hong
2019-12-02 13:53     ` Simon Goldschmidt
2019-12-02 14:05       ` Ang, Chee Hong
2019-12-02 14:19         ` Ang, Chee Hong
2019-12-02 14:28         ` Simon Goldschmidt
2019-12-02 15:18           ` Ang, Chee Hong
2019-12-02 15:32             ` Simon Goldschmidt
2019-12-02 16:10               ` Ang, Chee Hong
2019-12-02 20:40                 ` Simon Goldschmidt
2019-12-03  1:37                   ` Ang, Chee Hong
2019-12-03 11:35                     ` Simon Goldschmidt
2019-12-03 14:45                       ` Ang, Chee Hong
2019-12-03 14:59                         ` Dalon L Westergreen
2019-12-03 20:09                           ` Simon Goldschmidt
2019-12-03 23:18                             ` Tom Rini
2019-12-03 15:10                         ` Simon Goldschmidt
2019-12-03 18:31                           ` Ang, Chee Hong
2019-12-03 20:08                             ` Simon Goldschmidt
2019-12-04  7:34                               ` Ang, Chee Hong
2019-12-03 20:29 ` Simon Goldschmidt
2019-12-04  7:40   ` Ang, Chee Hong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1575282321-11597-15-git-send-email-chee.hong.ang@intel.com \
    --to=chee.hong.ang@intel.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.