projects
/
platform
/
kernel
/
u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
eae62ae
)
arm: socfpga: misc_s10: Fix EMAC register address calculation
author
Ley Foon Tan
<ley.foon.tan@intel.com>
Thu, 25 Jun 2020 11:19:09 +0000
(19:19 +0800)
committer
Ley Foon Tan
<ley.foon.tan@intel.com>
Fri, 26 Jun 2020 03:30:24 +0000
(11:30 +0800)
Fix EMAC register address calculation, address need to multiply
with sizeof(u32) or 4.
This fixes write to invalid address.
Signed-off-by: Ley Foon Tan <ley.foon.tan@intel.com>
arch/arm/mach-socfpga/misc_s10.c
patch
|
blob
|
history
diff --git
a/arch/arm/mach-socfpga/misc_s10.c
b/arch/arm/mach-socfpga/misc_s10.c
index
ccff78a
..
670bfa1
100644
(file)
--- a/
arch/arm/mach-socfpga/misc_s10.c
+++ b/
arch/arm/mach-socfpga/misc_s10.c
@@
-68,7
+68,7
@@
static u32 socfpga_phymode_setup(u32 gmac_index, const char *phymode)
return -EINVAL;
clrsetbits_le32(socfpga_get_sysmgr_addr() + SYSMGR_SOC64_EMAC0 +
-
gmac_index
,
+
(gmac_index * sizeof(u32))
,
SYSMGR_EMACGRP_CTRL_PHYSEL_MASK, modereg);
return 0;