Skip to content
Snippets Groups Projects
Commit 55c12849 authored by Steve Sakoman's avatar Steve Sakoman Committed by Albert ARIBAUD
Browse files

omap: emif: deal with rams that return duplicate mr data on all byte lanes


Some rams (Micron for example) return duplicate mr data on all byte lanes.

Users of the get_mr function currently don't deal with this duplicated
data gracefully.  This patch detects the duplicated data and returns only
the expected 8 bit mr data.

Signed-off-by: default avatarSteve Sakoman <steve@sakoman.com>
parent 38f25b12
Branches
Tags
No related merge requests found
...@@ -77,7 +77,12 @@ static inline u32 get_mr(u32 base, u32 cs, u32 mr_addr) ...@@ -77,7 +77,12 @@ static inline u32 get_mr(u32 base, u32 cs, u32 mr_addr)
mr = readl(&emif->emif_lpddr2_mode_reg_data); mr = readl(&emif->emif_lpddr2_mode_reg_data);
debug("get_mr: EMIF%d cs %d mr %08x val 0x%x\n", emif_num(base), debug("get_mr: EMIF%d cs %d mr %08x val 0x%x\n", emif_num(base),
cs, mr_addr, mr); cs, mr_addr, mr);
return mr; if (((mr & 0x0000ff00) >> 8) == (mr & 0xff) &&
((mr & 0x00ff0000) >> 16) == (mr & 0xff) &&
((mr & 0xff000000) >> 24) == (mr & 0xff))
return mr & 0xff;
else
return mr;
} }
static inline void set_mr(u32 base, u32 cs, u32 mr_addr, u32 mr_val) static inline void set_mr(u32 base, u32 cs, u32 mr_addr, u32 mr_val)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment