mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH 1/3] spi: mvebu: fix register macros for Armada 370/XP clock divider
Date: Thu,  8 Dec 2016 10:05:42 +0100	[thread overview]
Message-ID: <20161208090544.10267-1-u.kleine-koenig@pengutronix.de> (raw)

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/spi/mvebu_spi.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/spi/mvebu_spi.c b/drivers/spi/mvebu_spi.c
index 887a6a72134c..d61a545f02d8 100644
--- a/drivers/spi/mvebu_spi.c
+++ b/drivers/spi/mvebu_spi.c
@@ -50,8 +50,8 @@
 #define  IF_TRANSFER_2BYTE	BIT(5)
 #define  IF_CLK_PRESCALE_POW2	BIT(4)
 #define  IF_CLK_PRESCALE(x)	((x) & 0x0f)
-#define  IF_CLK_PRE_PRESCALE(x)	(((((x) & 0xc) << 1) | ((x) & 0x1)) << 4)
-#define  IF_CLK_PRESCALE_MASK	(IF_CLK_PRESCALE(7) | IF_CLK_PRE_PRESCALE(7))
+#define  IF_CLK_PRE_PRESCALE(x)	(((((x) & 0x6) << 6) | ((x) & 0x1)) << 4)
+#define  IF_CLK_PRESCALE_MASK	(IF_CLK_PRESCALE(0xf) | IF_CLK_PRE_PRESCALE(7))
 #define SPI_DATA_OUT		0x08
 #define SPI_DATA_IN		0x0c
 #define SPI_INT_CAUSE		0x10
-- 
2.10.2


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

             reply	other threads:[~2016-12-08  9:06 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-08  9:05 Uwe Kleine-König [this message]
2016-12-08  9:05 ` [PATCH 2/3] spi: mvebu: make sure the value calculated for PSCL is also used Uwe Kleine-König
2016-12-08  9:05 ` [PATCH 3/3] spi: mvebu: various non-critical improvements to armada_370_xp_spi_set_baudrate Uwe Kleine-König
2016-12-12  5:15 ` [PATCH 1/3] spi: mvebu: fix register macros for Armada 370/XP clock divider Sascha Hauer
2017-01-11 16:33   ` Uwe Kleine-König
2017-01-12  6:44     ` Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20161208090544.10267-1-u.kleine-koenig@pengutronix.de \
    --to=u.kleine-koenig@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox