Commit 5d896570 authored by Ilya Lipnitskiy's avatar Ilya Lipnitskiy Committed by Thomas Bogendoerfer

MIPS: ralink: mt7621: use bitwise NOT instead of logical

It was the intention to reverse the bits, not make them all zero by
using logical NOT operator.

Fixes: cc19db8b ("MIPS: ralink: mt7621: do memory detection on KSEG1")
Suggested-by: default avatarChuanhong Guo <gch981213@gmail.com>
Signed-off-by: default avatarIlya Lipnitskiy <ilya.lipnitskiy@gmail.com>
Reviewed-by: default avatarSergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: default avatarThomas Bogendoerfer <tsbogend@alpha.franken.de>
parent 1e6ae0e4
...@@ -69,7 +69,7 @@ static bool __init mt7621_addr_wraparound_test(phys_addr_t size) ...@@ -69,7 +69,7 @@ static bool __init mt7621_addr_wraparound_test(phys_addr_t size)
__raw_writel(MT7621_MEM_TEST_PATTERN, dm); __raw_writel(MT7621_MEM_TEST_PATTERN, dm);
if (__raw_readl(dm) != __raw_readl(dm + size)) if (__raw_readl(dm) != __raw_readl(dm + size))
return false; return false;
__raw_writel(!MT7621_MEM_TEST_PATTERN, dm); __raw_writel(~MT7621_MEM_TEST_PATTERN, dm);
return __raw_readl(dm) == __raw_readl(dm + size); return __raw_readl(dm) == __raw_readl(dm + size);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment