linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] dspi: config dspi master regmap with right mode depend on BE or LE
@ 2016-04-13 11:03 Po Liu
       [not found] ` <1460545402-8162-1-git-send-email-po.liu-3arQi8VN3Tc@public.gmane.org>
  2016-04-17  2:41 ` Scott Wood
  0 siblings, 2 replies; 5+ messages in thread
From: Po Liu @ 2016-04-13 11:03 UTC (permalink / raw)
  To: broonie-DgEjT+Ai2ygdnm+yROfE0A
  Cc: linux-spi-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA, Po Liu

When kernel config with big endian mode, spi master need
to config regmap data value to be little endian mode. Or else,
the kernel boot will hang.

Signed-off-by: Po Liu <po.liu-3arQi8VN3Tc@public.gmane.org>
---
 drivers/spi/spi-fsl-dspi.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/spi/spi-fsl-dspi.c b/drivers/spi/spi-fsl-dspi.c
index 39412c9..a1d893c 100644
--- a/drivers/spi/spi-fsl-dspi.c
+++ b/drivers/spi/spi-fsl-dspi.c
@@ -637,6 +637,9 @@ static const struct regmap_config dspi_regmap_config = {
 	.val_bits = 32,
 	.reg_stride = 4,
 	.max_register = 0x88,
+#ifdef CONFIG_CPU_BIG_ENDIAN
+	.val_format_endian = REGMAP_ENDIAN_LITTLE,
+#endif
 };
 
 static int dspi_probe(struct platform_device *pdev)
-- 
2.1.0.27.g96db324

--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-04-19  2:30 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-13 11:03 [PATCH] dspi: config dspi master regmap with right mode depend on BE or LE Po Liu
     [not found] ` <1460545402-8162-1-git-send-email-po.liu-3arQi8VN3Tc@public.gmane.org>
2016-04-13 14:06   ` Mark Brown
2016-04-17  2:41 ` Scott Wood
     [not found]   ` <DB5PR0401MB19281A317BFB1D9001F97ABB916A0-GXldUsIPo7Z/SeJcUcAJq43W/0Ik+aLCnBOFsp37pqbUKgpGm//BTAC/G2K4zDHf@public.gmane.org>
2016-04-18 10:11     ` Mark Brown
     [not found]       ` <20160418101117.GP3217-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2016-04-19  2:30         ` Po Liu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).