[U-Boot] [PATCH v1 15/20] net: designware: socfpga: Secure register access in MAC driver

chee.hong.ang at intel.com chee.hong.ang at intel.com
Mon Dec 2 11:25:16 CET 2019


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

Allow MAC driver to access System Manager's EMAC control
registers in non-secure mode.

Signed-off-by: Chee Hong Ang <chee.hong.ang at intel.com>
---
 drivers/net/dwmac_socfpga.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/net/dwmac_socfpga.c b/drivers/net/dwmac_socfpga.c
index b7bf5db..ae747ca 100644
--- a/drivers/net/dwmac_socfpga.c
+++ b/drivers/net/dwmac_socfpga.c
@@ -16,6 +16,7 @@
 #include "designware.h"
 
 #include <asm/arch/system_manager.h>
+#include <asm/arch/secure_reg_helper.h>
 
 struct dwmac_socfpga_platdata {
 	struct dw_eth_pdata	dw_eth_pdata;
@@ -96,8 +97,8 @@ static int dwmac_socfpga_probe(struct udevice *dev)
 	reset_assert_bulk(&reset_bulk);
 
 	modemask = SYSMGR_EMACGRP_CTRL_PHYSEL_MASK << pdata->reg_shift;
-	clrsetbits_le32(pdata->phy_intf, modemask,
-			modereg << pdata->reg_shift);
+	socfpga_secure_reg_update32((phys_addr_t)pdata->phy_intf, modemask,
+				    modereg << pdata->reg_shift);
 
 	reset_release_bulk(&reset_bulk);
 
-- 
2.7.4



More information about the U-Boot mailing list