mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
To: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>,
	Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>,
	Sascha Hauer <s.hauer@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: [PATCH v3 1/4] ARM: mvebu: Enable PUP register
Date: Sun,  9 Nov 2014 11:56:15 -0300	[thread overview]
Message-ID: <1415544978-22392-2-git-send-email-ezequiel.garcia@free-electrons.com> (raw)
In-Reply-To: <1415544978-22392-1-git-send-email-ezequiel.garcia@free-electrons.com>

As reported by Sebastian, we need to enable this explicitly for the
Tx clock on RGMII. While here, let's enable all the other peripherals.

Although this is documented to be required only for Armada XP SoC,
it has been found to be harmless on Armada 370, so we do it unconditionally
to simplify the code.

Reported-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Acked-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
---
 arch/arm/mach-mvebu/armada-370-xp.c                   | 5 +++++
 arch/arm/mach-mvebu/include/mach/armada-370-xp-regs.h | 7 +++++++
 2 files changed, 12 insertions(+)

diff --git a/arch/arm/mach-mvebu/armada-370-xp.c b/arch/arm/mach-mvebu/armada-370-xp.c
index 57f6a5f..244f8cd 100644
--- a/arch/arm/mach-mvebu/armada-370-xp.c
+++ b/arch/arm/mach-mvebu/armada-370-xp.c
@@ -74,6 +74,11 @@ static int armada_370_xp_init_soc(struct device_node *root, void *context)
 
 	mvebu_set_memory(phys_base, phys_size);
 
+	/* Enable peripherals PUP */
+	reg = readl(ARMADA_XP_PUP_ENABLE_BASE);
+	reg |= GE0_PUP_EN | GE1_PUP_EN | LCD_PUP_EN | NAND_PUP_EN | SPI_PUP_EN;
+	writel(reg, ARMADA_XP_PUP_ENABLE_BASE);
+
 	return 0;
 }
 
diff --git a/arch/arm/mach-mvebu/include/mach/armada-370-xp-regs.h b/arch/arm/mach-mvebu/include/mach/armada-370-xp-regs.h
index ccc687c..bac27e5 100644
--- a/arch/arm/mach-mvebu/include/mach/armada-370-xp-regs.h
+++ b/arch/arm/mach-mvebu/include/mach/armada-370-xp-regs.h
@@ -30,6 +30,13 @@
 #define  SAR_TCLK_FREQ			BIT(20)
 #define  SAR_HIGH			0x04
 
+#define ARMADA_XP_PUP_ENABLE_BASE       (ARMADA_370_XP_INT_REGS_BASE + 0x1864c)
+#define  GE0_PUP_EN			BIT(0)
+#define  GE1_PUP_EN			BIT(1)
+#define  LCD_PUP_EN			BIT(2)
+#define  NAND_PUP_EN			BIT(4)
+#define  SPI_PUP_EN			BIT(5)
+
 #define ARMADA_370_XP_SDRAM_BASE	(ARMADA_370_XP_INT_REGS_BASE + 0x20000)
 #define  DDR_BASE_CS			0x180
 #define  DDR_BASE_CSn(n)		(DDR_BASE_CS + ((n) * 0x8))
-- 
2.1.0


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

  reply	other threads:[~2014-11-09 14:58 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-09 14:56 [PATCH v3 0/4] mvebu: Add network support for Armada 370/XP Ezequiel Garcia
2014-11-09 14:56 ` Ezequiel Garcia [this message]
2014-11-09 14:56 ` [PATCH v3 2/4] net: phy: Support Marvell 88EE1545 PHY Ezequiel Garcia
2014-11-09 14:56 ` [PATCH v3 3/4] net: phy: Support Marvell 88EE1543 PHY Ezequiel Garcia
2014-11-10  6:57   ` Sascha Hauer
2014-11-09 14:56 ` [PATCH v3 4/4] net: Add driver for Armada 370/XP 10/100/1000 Mbps network controller Ezequiel Garcia
2014-11-10  8:06 ` [PATCH v3 0/4] mvebu: Add network support for Armada 370/XP Uwe Kleine-König
2014-11-10 18:10   ` Ezequiel Garcia
2014-11-10 18:43     ` Uwe Kleine-König
2014-11-10 19:36       ` Sebastian Hesselbarth
2014-11-11  9:06         ` Uwe Kleine-König
2014-11-11 14:25           ` Ezequiel Garcia
2014-11-11 14:31             ` Thomas Petazzoni
2014-11-11 14:34               ` Ezequiel Garcia
2014-11-12  7:03                 ` Sascha Hauer
2014-11-11 20:35             ` Uwe Kleine-König
2014-11-12 10:56           ` Uwe Kleine-König
2014-11-12 11:22             ` Sebastian Hesselbarth
2014-11-13  9:09               ` Uwe Kleine-König
2014-11-13  9:53                 ` Sebastian Hesselbarth
2014-11-13 10:46                   ` Uwe Kleine-König
2014-11-13 11:31                     ` Sebastian Hesselbarth
2014-11-13 18:44                       ` Uwe Kleine-König
2014-11-14  8:21                         ` Sebastian Hesselbarth
2014-11-14 20:48                           ` Uwe Kleine-König

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=1415544978-22392-2-git-send-email-ezequiel.garcia@free-electrons.com \
    --to=ezequiel.garcia@free-electrons.com \
    --cc=barebox@lists.infradead.org \
    --cc=s.hauer@pengutronix.de \
    --cc=sebastian.hesselbarth@gmail.com \
    --cc=thomas.petazzoni@free-electrons.com \
    /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