提交 01c0151a 编写于 作者: M Marek Vasut

mmc: matsushita-common: Special case only select registers in 16bit

There are only a few registerse used in the 16bit mode which are
32bit internally. Special-case only those in the IO accessors and
always write both halves. Any other register access is protected
from accidentally overwriting neighboring register.
Signed-off-by: NMarek Vasut <marek.vasut+renesas@gmail.com>
Cc: Jaehoon Chung <jh80.chung@samsung.com>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
上级 8af6737d
......@@ -68,7 +68,9 @@ void matsu_sd_writel(struct matsu_sd_priv *priv,
writel(val, priv->regbase + (reg << 1));
if (priv->caps & MATSU_SD_CAP_16BIT) {
writew(val & 0xffff, priv->regbase + (reg >> 1));
if (val >> 16)
if (reg == MATSU_SD_INFO1 || reg == MATSU_SD_INFO1_MASK ||
reg == MATSU_SD_INFO2 || reg == MATSU_SD_INFO2_MASK ||
reg == MATSU_SD_ARG)
writew(val >> 16, priv->regbase + (reg >> 1) + 2);
} else
writel(val, priv->regbase + reg);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册