[PATCH v2 15/21] net: designware: socfpga: Secure register access in MAC driver
chee.hong.ang at intel.com
chee.hong.ang at intel.com
Wed Feb 19 13:25:40 CET 2020
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 e93561d..293c660 100644
--- a/drivers/net/dwmac_socfpga.c
+++ b/drivers/net/dwmac_socfpga.c
@@ -17,6 +17,7 @@
#include <dm/device_compat.h>
#include <linux/err.h>
+#include <asm/arch/secure_reg_helper.h>
#include <asm/arch/system_manager.h>
struct dwmac_socfpga_platdata {
@@ -98,8 +99,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