All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 01/13] mxs: Reset the EMI block on mx23
@ 2013-02-23 12:42 Marek Vasut
  2013-02-23 12:42 ` [U-Boot] [PATCH 02/13] mxs: mmc: spi: dma: Better wrap the MXS differences Marek Vasut
                   ` (13 more replies)
  0 siblings, 14 replies; 25+ messages in thread
From: Marek Vasut @ 2013-02-23 12:42 UTC (permalink / raw)
  To: u-boot

The real reason for memory instability was the fact that the EMI block
was gated and not reset throughout the boards' operation. This patch
resets the EMI block properly while also reverts the memory voltage bump.
The memory stability issues were caused by the EMI not being reset properly
and thus there is no longer need to run the memory at higher voltage than
it ought to run at.

This partly reverts 8303ed128a55519f19c5f11087032d4bc4e0537a .

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Cc: Otavio Salvador <otavio@ossystems.com.br>
Cc: Stefano Babic <sbabic@denx.de>
---
 arch/arm/cpu/arm926ejs/mxs/spl_mem_init.c |   12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/arch/arm/cpu/arm926ejs/mxs/spl_mem_init.c b/arch/arm/cpu/arm926ejs/mxs/spl_mem_init.c
index f8392f6..4a0a5aa 100644
--- a/arch/arm/cpu/arm926ejs/mxs/spl_mem_init.c
+++ b/arch/arm/cpu/arm926ejs/mxs/spl_mem_init.c
@@ -27,6 +27,7 @@
 #include <config.h>
 #include <asm/io.h>
 #include <asm/arch/imx-regs.h>
+#include <asm/arch/sys_proto.h>
 #include <linux/compiler.h>
 
 #include "mxs_init.h"
@@ -229,7 +230,7 @@ static void mx23_mem_setup_vddmem(void)
 	struct mxs_power_regs *power_regs =
 		(struct mxs_power_regs *)MXS_POWER_BASE;
 
-	writel((0x12 << POWER_VDDMEMCTRL_TRG_OFFSET) |
+	writel((0x10 << POWER_VDDMEMCTRL_TRG_OFFSET) |
 		POWER_VDDMEMCTRL_ENABLE_ILIMIT |
 		POWER_VDDMEMCTRL_ENABLE_LINREG |
 		POWER_VDDMEMCTRL_PULLDOWN_ACTIVE,
@@ -237,13 +238,20 @@ static void mx23_mem_setup_vddmem(void)
 
 	early_delay(10000);
 
-	writel((0x12 << POWER_VDDMEMCTRL_TRG_OFFSET) |
+	writel((0x10 << POWER_VDDMEMCTRL_TRG_OFFSET) |
 		POWER_VDDMEMCTRL_ENABLE_LINREG,
 		&power_regs->hw_power_vddmemctrl);
 }
 
 static void mx23_mem_init(void)
 {
+	/*
+	 * Reset/ungate the EMI block. This is essential, otherwise the system
+	 * suffers from memory instability. This thing is mx23 specific and is
+	 * no longer present on mx28.
+	 */
+	mxs_reset_block((struct mxs_register_32 *)MXS_EMI_BASE);
+
 	mx23_mem_setup_vddmem();
 
 	/*
-- 
1.7.10.4

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

* [U-Boot] [PATCH 02/13] mxs: mmc: spi: dma: Better wrap the MXS differences
  2013-02-23 12:42 [U-Boot] [PATCH 01/13] mxs: Reset the EMI block on mx23 Marek Vasut
@ 2013-02-23 12:42 ` Marek Vasut
  2013-02-23 12:42 ` [U-Boot] [PATCH 03/13] mxs: spi: Fix the MXS SPI for mx23 Marek Vasut
                   ` (12 subsequent siblings)
  13 siblings, 0 replies; 25+ messages in thread
From: Marek Vasut @ 2013-02-23 12:42 UTC (permalink / raw)
  To: u-boot

This patch streamlines the differences between the MX23 and MX28 by
implementing a few helper functions to handle different DMA channel
mapping, different clock domain for SSP block and fixes a few minor
bugs.

First of all, the DMA channel mapping is now fixed in dma.h by defining
the actual channel map for both MX23 and MX28. Thus, MX23 now does no
longer use MX28 channel map which was wrong. Also, there is a fix for
MX28 DMA channel map, where the last four channels were incorrect.

Next, because correct DMA channel map is in place, the mxs_dma_init_channel()
call now bases the channel ID starting from SSP port #0. This removes the
need for DMA channel offset being added and cleans up the code. For the
same reason, the SSP0 offset can now be used in mxs_dma_desc_append(), thus
no need to adjust dma channel number in the driver either.

Lastly, the SSP clock ID is now retrieved by calling mxs_ssp_clock_by_bus()
which handles the fact that MX23 has shared SSP clock for both ports, while
MX28 has per-port SSP clock.

Finally, the mxs_ssp_bus_id_valid() pulls out two implementations of the
same functionality from MMC and SPI driver into common code.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Cc: Otavio Salvador <otavio@ossystems.com.br>
Cc: Stefano Babic <sbabic@denx.de>
---
 arch/arm/cpu/arm926ejs/mxs/clock.c       |    3 ++-
 arch/arm/include/asm/arch-mxs/dma.h      |   19 ++++++++++++++++++-
 arch/arm/include/asm/arch-mxs/regs-ssp.h |   26 ++++++++++++++++++++++++++
 drivers/mmc/mxsmmc.c                     |   20 ++++----------------
 drivers/spi/mxs_spi.c                    |    4 ++--
 5 files changed, 52 insertions(+), 20 deletions(-)

diff --git a/arch/arm/cpu/arm926ejs/mxs/clock.c b/arch/arm/cpu/arm926ejs/mxs/clock.c
index 00b9aba..43e7663 100644
--- a/arch/arm/cpu/arm926ejs/mxs/clock.c
+++ b/arch/arm/cpu/arm926ejs/mxs/clock.c
@@ -289,7 +289,8 @@ static uint32_t mxs_get_sspclk(enum mxs_sspclock ssp)
 void mxs_set_ssp_busclock(unsigned int bus, uint32_t freq)
 {
 	struct mxs_ssp_regs *ssp_regs;
-	const uint32_t sspclk = mxs_get_sspclk(bus);
+	const enum mxs_sspclock clk = mxs_ssp_clock_by_bus(bus);
+	const uint32_t sspclk = mxs_get_sspclk(clk);
 	uint32_t reg;
 	uint32_t divide, rate, tgtclk;
 
diff --git a/arch/arm/include/asm/arch-mxs/dma.h b/arch/arm/include/asm/arch-mxs/dma.h
index a0a0ea5..1ac8696 100644
--- a/arch/arm/include/asm/arch-mxs/dma.h
+++ b/arch/arm/include/asm/arch-mxs/dma.h
@@ -40,6 +40,19 @@
 /*
  * MXS DMA channels
  */
+#if defined(CONFIG_MX23)
+enum {
+	MXS_DMA_CHANNEL_AHB_APBH_LCDIF = 0,
+	MXS_DMA_CHANNEL_AHB_APBH_SSP0,
+	MXS_DMA_CHANNEL_AHB_APBH_SSP1,
+	MXS_DMA_CHANNEL_AHB_APBH_RESERVED0,
+	MXS_DMA_CHANNEL_AHB_APBH_GPMI0,
+	MXS_DMA_CHANNEL_AHB_APBH_GPMI1,
+	MXS_DMA_CHANNEL_AHB_APBH_GPMI2,
+	MXS_DMA_CHANNEL_AHB_APBH_GPMI3,
+	MXS_MAX_DMA_CHANNELS,
+};
+#elif defined(CONFIG_MX28)
 enum {
 	MXS_DMA_CHANNEL_AHB_APBH_SSP0 = 0,
 	MXS_DMA_CHANNEL_AHB_APBH_SSP1,
@@ -53,9 +66,13 @@ enum {
 	MXS_DMA_CHANNEL_AHB_APBH_GPMI5,
 	MXS_DMA_CHANNEL_AHB_APBH_GPMI6,
 	MXS_DMA_CHANNEL_AHB_APBH_GPMI7,
-	MXS_DMA_CHANNEL_AHB_APBH_SSP,
+	MXS_DMA_CHANNEL_AHB_APBH_HSADC,
+	MXS_DMA_CHANNEL_AHB_APBH_LCDIF,
+	MXS_DMA_CHANNEL_AHB_APBH_RESERVED0,
+	MXS_DMA_CHANNEL_AHB_APBH_RESERVED1,
 	MXS_MAX_DMA_CHANNELS,
 };
+#endif
 
 /*
  * MXS DMA hardware command.
diff --git a/arch/arm/include/asm/arch-mxs/regs-ssp.h b/arch/arm/include/asm/arch-mxs/regs-ssp.h
index 9b30f56..5920f9b 100644
--- a/arch/arm/include/asm/arch-mxs/regs-ssp.h
+++ b/arch/arm/include/asm/arch-mxs/regs-ssp.h
@@ -74,6 +74,32 @@ struct mxs_ssp_regs {
 };
 #endif
 
+static inline int mxs_ssp_bus_id_valid(int bus)
+{
+#if defined(CONFIG_MX23)
+	const unsigned int mxs_ssp_chan_count = 2;
+#elif defined(CONFIG_MX28)
+	const unsigned int mxs_ssp_chan_count = 4;
+#endif
+
+	if (bus >= mxs_ssp_chan_count)
+		return 0;
+
+	if (bus < 0)
+		return 0;
+
+	return 1;
+}
+
+static inline int mxs_ssp_clock_by_bus(unsigned int clock)
+{
+#if defined(CONFIG_MX23)
+	return 0;
+#elif defined(CONFIG_MX28)
+	return clock;
+#endif
+}
+
 static inline struct mxs_ssp_regs *mxs_ssp_regs_by_bus(unsigned int port)
 {
 	switch (port) {
diff --git a/drivers/mmc/mxsmmc.c b/drivers/mmc/mxsmmc.c
index a72f66c..b1537e2 100644
--- a/drivers/mmc/mxsmmc.c
+++ b/drivers/mmc/mxsmmc.c
@@ -53,12 +53,6 @@ struct mxsmmc_priv {
 	struct mxs_dma_desc	*desc;
 };
 
-#if defined(CONFIG_MX23)
-static const unsigned int mxsmmc_id_offset = 1;
-#elif defined(CONFIG_MX28)
-static const unsigned int mxsmmc_id_offset = 0;
-#endif
-
 #define	MXSMMC_MAX_TIMEOUT	10000
 #define MXSMMC_SMALL_TRANSFER	512
 
@@ -137,7 +131,7 @@ static int mxsmmc_send_cmd_dma(struct mxsmmc_priv *priv, struct mmc_data *data)
 	priv->desc->cmd.data |= MXS_DMA_DESC_IRQ | MXS_DMA_DESC_DEC_SEM |
 				(data_count << MXS_DMA_DESC_BYTES_OFFSET);
 
-	dmach = MXS_DMA_CHANNEL_AHB_APBH_SSP0 + priv->id + mxsmmc_id_offset;
+	dmach = MXS_DMA_CHANNEL_AHB_APBH_SSP0 + priv->id;
 	mxs_dma_desc_append(dmach, priv->desc);
 	if (mxs_dma_go(dmach)) {
 		bounce_buffer_stop(&bbstate);
@@ -390,15 +384,9 @@ int mxsmmc_initialize(bd_t *bis, int id, int (*wp)(int), int (*cd)(int))
 	struct mmc *mmc = NULL;
 	struct mxsmmc_priv *priv = NULL;
 	int ret;
-#if defined(CONFIG_MX23)
-	const unsigned int mxsmmc_max_id = 2;
-	const unsigned int mxsmmc_clk_id = 0;
-#elif defined(CONFIG_MX28)
-	const unsigned int mxsmmc_max_id = 4;
-	const unsigned int mxsmmc_clk_id = id;
-#endif
+	const unsigned int mxsmmc_clk_id = mxs_ssp_clock_by_bus(id);
 
-	if (id >= mxsmmc_max_id)
+	if (!mxs_ssp_bus_id_valid(id))
 		return -ENODEV;
 
 	mmc = malloc(sizeof(struct mmc));
@@ -418,7 +406,7 @@ int mxsmmc_initialize(bd_t *bis, int id, int (*wp)(int), int (*cd)(int))
 		return -ENOMEM;
 	}
 
-	ret = mxs_dma_init_channel(id + mxsmmc_id_offset);
+	ret = mxs_dma_init_channel(MXS_DMA_CHANNEL_AHB_APBH_SSP0 + id);
 	if (ret)
 		return ret;
 
diff --git a/drivers/spi/mxs_spi.c b/drivers/spi/mxs_spi.c
index bb865b7..6acc95a 100644
--- a/drivers/spi/mxs_spi.c
+++ b/drivers/spi/mxs_spi.c
@@ -70,7 +70,7 @@ void spi_init(void)
 int spi_cs_is_valid(unsigned int bus, unsigned int cs)
 {
 	/* MXS SPI: 4 ports and 3 chip selects maximum */
-	if (bus > 3 || cs > 2)
+	if (!mxs_ssp_bus_id_valid(bus) || cs > 2)
 		return 0;
 	else
 		return 1;
@@ -92,7 +92,7 @@ struct spi_slave *spi_setup_slave(unsigned int bus, unsigned int cs,
 	if (!mxs_slave)
 		return NULL;
 
-	if (mxs_dma_init_channel(bus))
+	if (mxs_dma_init_channel(MXS_DMA_CHANNEL_AHB_APBH_SSP0 + bus))
 		goto err_init;
 
 	mxs_slave->slave.bus = bus;
-- 
1.7.10.4

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

* [U-Boot] [PATCH 03/13] mxs: spi: Fix the MXS SPI for mx23
  2013-02-23 12:42 [U-Boot] [PATCH 01/13] mxs: Reset the EMI block on mx23 Marek Vasut
  2013-02-23 12:42 ` [U-Boot] [PATCH 02/13] mxs: mmc: spi: dma: Better wrap the MXS differences Marek Vasut
@ 2013-02-23 12:42 ` Marek Vasut
  2013-02-23 15:28   ` Otavio Salvador
  2013-02-23 12:43 ` [U-Boot] [PATCH 04/13] mxs: spi: Remove CONFIG_MXS_SPI_DMA_ENABLE Marek Vasut
                   ` (11 subsequent siblings)
  13 siblings, 1 reply; 25+ messages in thread
From: Marek Vasut @ 2013-02-23 12:42 UTC (permalink / raw)
  To: u-boot

The MX23 has slightly different register layout. Adjust the SPI
driver to match the layout, both the PIO and DMA part.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Cc: Otavio Salvador <otavio@ossystems.com.br>
Cc: Stefano Babic <sbabic@denx.de>
---
 drivers/spi/mxs_spi.c |   19 +++++++++++++++++--
 1 file changed, 17 insertions(+), 2 deletions(-)

diff --git a/drivers/spi/mxs_spi.c b/drivers/spi/mxs_spi.c
index 6acc95a..b5b32dc 100644
--- a/drivers/spi/mxs_spi.c
+++ b/drivers/spi/mxs_spi.c
@@ -168,7 +168,12 @@ static int mxs_spi_xfer_pio(struct mxs_spi_slave *slave,
 
 	while (length--) {
 		/* We transfer 1 byte */
+#if defined(CONFIG_MX23)
+		writel(SSP_CTRL0_XFER_COUNT_MASK, &ssp_regs->hw_ssp_ctrl0_clr);
+		writel(1, &ssp_regs->hw_ssp_ctrl0_set);
+#elif defined(CONFIG_MX28)
 		writel(1, &ssp_regs->hw_ssp_xfer_size);
+#endif
 
 		if ((flags & SPI_XFER_END) && !length)
 			mxs_spi_end_xfer(ssp_regs);
@@ -226,6 +231,12 @@ static int mxs_spi_xfer_dma(struct mxs_spi_slave *slave,
 	int tl;
 	int ret = 0;
 
+#if defined(CONFIG_MX23)
+	const int mxs_spi_pio_words = 1;
+#elif defined(CONFIG_MX28)
+	const int mxs_spi_pio_words = 4;
+#endif
+
 	ALLOC_CACHE_ALIGN_BUFFER(struct mxs_dma_desc, desc, desc_count);
 
 	memset(desc, 0, sizeof(struct mxs_dma_desc) * desc_count);
@@ -281,7 +292,7 @@ static int mxs_spi_xfer_dma(struct mxs_spi_slave *slave,
 
 		dp->cmd.data |=
 			((tl & 0xffff) << MXS_DMA_DESC_BYTES_OFFSET) |
-			(4 << MXS_DMA_DESC_PIO_WORDS_OFFSET) |
+			(mxs_spi_pio_words << MXS_DMA_DESC_PIO_WORDS_OFFSET) |
 			MXS_DMA_DESC_HALT_ON_TERMINATE |
 			MXS_DMA_DESC_TERMINATE_FLUSH;
 
@@ -298,15 +309,19 @@ static int mxs_spi_xfer_dma(struct mxs_spi_slave *slave,
 		}
 
 		/*
-		 * Write CTRL0, CMD0, CMD1, XFER_SIZE registers. It is
+		 * Write CTRL0, CMD0, CMD1 and XFER_SIZE registers in
+		 * case of MX28, write only CTRL0 in case of MX23 due
+		 * to the difference in register layout. It is utterly
 		 * essential that the XFER_SIZE register is written on
 		 * a per-descriptor basis with the same size as is the
 		 * descriptor!
 		 */
 		dp->cmd.pio_words[0] = ctrl0;
+#ifdef CONFIG_MX28
 		dp->cmd.pio_words[1] = 0;
 		dp->cmd.pio_words[2] = 0;
 		dp->cmd.pio_words[3] = tl;
+#endif
 
 		mxs_dma_desc_append(dmach, dp);
 
-- 
1.7.10.4

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

* [U-Boot] [PATCH 04/13] mxs: spi: Remove CONFIG_MXS_SPI_DMA_ENABLE
  2013-02-23 12:42 [U-Boot] [PATCH 01/13] mxs: Reset the EMI block on mx23 Marek Vasut
  2013-02-23 12:42 ` [U-Boot] [PATCH 02/13] mxs: mmc: spi: dma: Better wrap the MXS differences Marek Vasut
  2013-02-23 12:42 ` [U-Boot] [PATCH 03/13] mxs: spi: Fix the MXS SPI for mx23 Marek Vasut
@ 2013-02-23 12:43 ` Marek Vasut
  2013-02-23 14:11   ` Fabio Estevam
  2013-02-23 12:43 ` [U-Boot] [PATCH 05/13] mxs: Squash the header file usage in ehci-mxs Marek Vasut
                   ` (10 subsequent siblings)
  13 siblings, 1 reply; 25+ messages in thread
From: Marek Vasut @ 2013-02-23 12:43 UTC (permalink / raw)
  To: u-boot

The CONFIG_MXS_SPI_DMA_ENABLE is no longer relevant as the SPI DMA
has proven to work correctly. Remove this configuration option.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Cc: Otavio Salvador <otavio@ossystems.com.br>
Cc: Stefano Babic <sbabic@denx.de>
---
 drivers/spi/mxs_spi.c     |   16 ----------------
 include/configs/m28evk.h  |    1 -
 include/configs/mx28evk.h |    1 -
 3 files changed, 18 deletions(-)

diff --git a/drivers/spi/mxs_spi.c b/drivers/spi/mxs_spi.c
index b5b32dc..ffa3c1d 100644
--- a/drivers/spi/mxs_spi.c
+++ b/drivers/spi/mxs_spi.c
@@ -40,17 +40,6 @@
 
 #define MXSSSP_SMALL_TRANSFER	512
 
-/*
- * CONFIG_MXS_SPI_DMA_ENABLE: Experimental mixed PIO/DMA support for MXS SPI
- *                            host. Use with utmost caution!
- *
- *                            Enabling this is not yet recommended since this
- *                            still doesn't support transfers to/from unaligned
- *                            addresses. Therefore this driver will not work
- *                            for example with saving environment. This is
- *                            caused by DMA alignment constraints on MXS.
- */
-
 struct mxs_spi_slave {
 	struct spi_slave	slave;
 	uint32_t		max_khz;
@@ -347,12 +336,7 @@ int spi_xfer(struct spi_slave *slave, unsigned int bitlen,
 	char dummy;
 	int write = 0;
 	char *data = NULL;
-
-#ifdef CONFIG_MXS_SPI_DMA_ENABLE
 	int dma = 1;
-#else
-	int dma = 0;
-#endif
 
 	if (bitlen == 0) {
 		if (flags & SPI_XFER_END) {
diff --git a/include/configs/m28evk.h b/include/configs/m28evk.h
index 1b51fe2..59a7be9 100644
--- a/include/configs/m28evk.h
+++ b/include/configs/m28evk.h
@@ -244,7 +244,6 @@
 #ifdef	CONFIG_CMD_SPI
 #define	CONFIG_HARD_SPI
 #define	CONFIG_MXS_SPI
-#define	CONFIG_MXS_SPI_DMA_ENABLE
 #define	CONFIG_SPI_HALF_DUPLEX
 #define	CONFIG_DEFAULT_SPI_BUS		2
 #define	CONFIG_DEFAULT_SPI_CS		0
diff --git a/include/configs/mx28evk.h b/include/configs/mx28evk.h
index 71447d9..6a46f3c 100644
--- a/include/configs/mx28evk.h
+++ b/include/configs/mx28evk.h
@@ -202,7 +202,6 @@
 #ifdef CONFIG_CMD_SPI
 #define CONFIG_HARD_SPI
 #define CONFIG_MXS_SPI
-#define CONFIG_MXS_SPI_DMA_ENABLE
 #define CONFIG_SPI_HALF_DUPLEX
 #define CONFIG_DEFAULT_SPI_BUS		2
 #define CONFIG_DEFAULT_SPI_MODE		SPI_MODE_0
-- 
1.7.10.4

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

* [U-Boot] [PATCH 05/13] mxs: Squash the header file usage in ehci-mxs
  2013-02-23 12:42 [U-Boot] [PATCH 01/13] mxs: Reset the EMI block on mx23 Marek Vasut
                   ` (2 preceding siblings ...)
  2013-02-23 12:43 ` [U-Boot] [PATCH 04/13] mxs: spi: Remove CONFIG_MXS_SPI_DMA_ENABLE Marek Vasut
@ 2013-02-23 12:43 ` Marek Vasut
  2013-02-23 15:32   ` Otavio Salvador
  2013-02-23 12:43 ` [U-Boot] [PATCH 06/13] mxs: Make ehci-mxs multiport capable Marek Vasut
                   ` (9 subsequent siblings)
  13 siblings, 1 reply; 25+ messages in thread
From: Marek Vasut @ 2013-02-23 12:43 UTC (permalink / raw)
  To: u-boot

The ehci-mxs driver included the register definitions directly.
Use imx-regs.h instead since it contains proper handling of the
differences between mx23 and mx28.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Cc: Otavio Salvador <otavio@ossystems.com.br>
Cc: Stefano Babic <sbabic@denx.de>
---
 arch/arm/include/asm/arch-mxs/imx-regs.h |    2 ++
 drivers/usb/host/ehci-mxs.c              |    6 +-----
 2 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/arch/arm/include/asm/arch-mxs/imx-regs.h b/arch/arm/include/asm/arch-mxs/imx-regs.h
index 05eb63c..8f67497 100644
--- a/arch/arm/include/asm/arch-mxs/imx-regs.h
+++ b/arch/arm/include/asm/arch-mxs/imx-regs.h
@@ -36,6 +36,8 @@
 #include <asm/arch/regs-rtc.h>
 #include <asm/arch/regs-ssp.h>
 #include <asm/arch/regs-timrot.h>
+#include <asm/arch/regs-usb.h>
+#include <asm/arch/regs-usbphy.h>
 
 #ifdef CONFIG_MX23
 #include <asm/arch/regs-clkctrl-mx23.h>
diff --git a/drivers/usb/host/ehci-mxs.c b/drivers/usb/host/ehci-mxs.c
index 5062af5..0ca7545 100644
--- a/drivers/usb/host/ehci-mxs.c
+++ b/drivers/usb/host/ehci-mxs.c
@@ -21,11 +21,7 @@
 
 #include <common.h>
 #include <asm/io.h>
-#include <asm/arch/regs-common.h>
-#include <asm/arch/regs-base.h>
-#include <asm/arch/regs-clkctrl-mx28.h>
-#include <asm/arch/regs-usb.h>
-#include <asm/arch/regs-usbphy.h>
+#include <asm/arch/imx-regs.h>
 
 #include "ehci.h"
 
-- 
1.7.10.4

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

* [U-Boot] [PATCH 06/13] mxs: Make ehci-mxs multiport capable
  2013-02-23 12:42 [U-Boot] [PATCH 01/13] mxs: Reset the EMI block on mx23 Marek Vasut
                   ` (3 preceding siblings ...)
  2013-02-23 12:43 ` [U-Boot] [PATCH 05/13] mxs: Squash the header file usage in ehci-mxs Marek Vasut
@ 2013-02-23 12:43 ` Marek Vasut
  2013-02-23 15:31   ` Otavio Salvador
  2013-02-23 12:43 ` [U-Boot] [PATCH 07/13] mxs: m28: Enable power to USB port 0 Marek Vasut
                   ` (8 subsequent siblings)
  13 siblings, 1 reply; 25+ messages in thread
From: Marek Vasut @ 2013-02-23 12:43 UTC (permalink / raw)
  To: u-boot

Rework ehci-mxs so it supports both ports on MX28. It was necessary
to wrap the per-port configuration into struct ehci_mxs_port and pull
out the clock configuration function.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Cc: Otavio Salvador <otavio@ossystems.com.br>
Cc: Stefano Babic <sbabic@denx.de>
---
 drivers/usb/host/ehci-mxs.c  |  149 +++++++++++++++++++++++-------------------
 include/configs/apx4devkit.h |    3 +-
 include/configs/m28evk.h     |    4 +-
 include/configs/mx28evk.h    |    3 +-
 include/configs/sc_sps_1.h   |    3 +-
 5 files changed, 90 insertions(+), 72 deletions(-)

NOTE: For MX23, just use this setup:
#define CONFIG_EHCI_MXS_PORT0
#define CONFIG_USB_MAX_CONTROLLER_COUNT	1

diff --git a/drivers/usb/host/ehci-mxs.c b/drivers/usb/host/ehci-mxs.c
index 0ca7545..f320d3e 100644
--- a/drivers/usb/host/ehci-mxs.c
+++ b/drivers/usb/host/ehci-mxs.c
@@ -22,86 +22,106 @@
 #include <common.h>
 #include <asm/io.h>
 #include <asm/arch/imx-regs.h>
+#include <errno.h>
 
 #include "ehci.h"
 
-#if	(CONFIG_EHCI_MXS_PORT != 0) && (CONFIG_EHCI_MXS_PORT != 1)
-#error	"MXS EHCI: Invalid port selected!"
-#endif
-
-#ifndef	CONFIG_EHCI_MXS_PORT
-#error	"MXS EHCI: Please define correct port using CONFIG_EHCI_MXS_PORT!"
-#endif
+/* This DIGCTL register ungates clock to USB */
+#define	HW_DIGCTL_CTRL			0x8001c000
+#define	HW_DIGCTL_CTRL_USB0_CLKGATE	(1 << 2)
+#define	HW_DIGCTL_CTRL_USB1_CLKGATE	(1 << 16)
 
-static struct ehci_mxs {
-	struct mxs_usb_regs	*usb_regs;
+struct ehci_mxs_port {
+	uint32_t		usb_regs;
 	struct mxs_usbphy_regs	*phy_regs;
-} ehci_mxs;
 
-int mxs_ehci_get_port(struct ehci_mxs *mxs_usb, int port)
+	struct mxs_register_32	*pll;
+	uint32_t		pll_en_bits;
+	uint32_t		pll_dis_bits;
+	uint32_t		gate_bits;
+};
+
+static const struct ehci_mxs_port mxs_port[] = {
+#ifdef CONFIG_EHCI_MXS_PORT0
+	{
+		MXS_USBCTRL0_BASE,
+		(struct mxs_usbphy_regs *)MXS_USBPHY0_BASE,
+		(struct mxs_register_32 *)(MXS_CLKCTRL_BASE +
+			offsetof(struct mxs_clkctrl_regs,
+			hw_clkctrl_pll0ctrl0_reg)),
+		CLKCTRL_PLL0CTRL0_EN_USB_CLKS | CLKCTRL_PLL0CTRL0_POWER,
+		CLKCTRL_PLL0CTRL0_EN_USB_CLKS,
+		HW_DIGCTL_CTRL_USB0_CLKGATE,
+	},
+#endif
+#ifdef CONFIG_EHCI_MXS_PORT1
+	{
+		MXS_USBCTRL1_BASE,
+		(struct mxs_usbphy_regs *)MXS_USBPHY1_BASE,
+		(struct mxs_register_32 *)(MXS_CLKCTRL_BASE +
+			offsetof(struct mxs_clkctrl_regs,
+			hw_clkctrl_pll1ctrl0_reg)),
+		CLKCTRL_PLL1CTRL0_EN_USB_CLKS | CLKCTRL_PLL1CTRL0_POWER,
+		CLKCTRL_PLL1CTRL0_EN_USB_CLKS,
+		HW_DIGCTL_CTRL_USB1_CLKGATE,
+	},
+#endif
+};
+
+static int ehci_mxs_toggle_clock(const struct ehci_mxs_port *port, int enable)
 {
-	uint32_t usb_base, phy_base;
-	switch (port) {
-	case 0:
-		usb_base = MXS_USBCTRL0_BASE;
-		phy_base = MXS_USBPHY0_BASE;
-		break;
-	case 1:
-		usb_base = MXS_USBCTRL1_BASE;
-		phy_base = MXS_USBPHY1_BASE;
-		break;
-	default:
-		printf("CONFIG_EHCI_MXS_PORT (port = %d)\n", port);
-		return -1;
+	struct mxs_register_32 *digctl_ctrl =
+		(struct mxs_register_32 *)HW_DIGCTL_CTRL;
+	int pll_offset, dig_offset;
+
+	if (enable) {
+		pll_offset = offsetof(struct mxs_register_32, reg_set);
+		dig_offset = offsetof(struct mxs_register_32, reg_clr);
+		writel(port->gate_bits, (u32)&digctl_ctrl->reg + dig_offset);
+		writel(port->pll_en_bits, (u32)port->pll + pll_offset);
+	} else {
+		pll_offset = offsetof(struct mxs_register_32, reg_clr);
+		dig_offset = offsetof(struct mxs_register_32, reg_set);
+		writel(port->pll_dis_bits, (u32)port->pll + pll_offset);
+		writel(port->gate_bits, (u32)&digctl_ctrl->reg + dig_offset);
 	}
 
-	mxs_usb->usb_regs = (struct mxs_usb_regs *)usb_base;
-	mxs_usb->phy_regs = (struct mxs_usbphy_regs *)phy_base;
 	return 0;
 }
 
-/* This DIGCTL register ungates clock to USB */
-#define	HW_DIGCTL_CTRL			0x8001c000
-#define	HW_DIGCTL_CTRL_USB0_CLKGATE	(1 << 2)
-#define	HW_DIGCTL_CTRL_USB1_CLKGATE	(1 << 16)
-
 int ehci_hcd_init(int index, struct ehci_hccr **hccr, struct ehci_hcor **hcor)
 {
 
 	int ret;
 	uint32_t usb_base, cap_base;
-	struct mxs_register_32 *digctl_ctrl =
-		(struct mxs_register_32 *)HW_DIGCTL_CTRL;
-	struct mxs_clkctrl_regs *clkctrl_regs =
-		(struct mxs_clkctrl_regs *)MXS_CLKCTRL_BASE;
+	const struct ehci_mxs_port *port;
 
-	ret = mxs_ehci_get_port(&ehci_mxs, CONFIG_EHCI_MXS_PORT);
-	if (ret)
-		return ret;
+	if ((index < 0) || (index >= ARRAY_SIZE(mxs_port))) {
+		printf("Invalid port index (index = %d)!\n", index);
+		return -EINVAL;
+	}
+
+	port = &mxs_port[index];
 
 	/* Reset the PHY block */
-	writel(USBPHY_CTRL_SFTRST, &ehci_mxs.phy_regs->hw_usbphy_ctrl_set);
+	writel(USBPHY_CTRL_SFTRST, &port->phy_regs->hw_usbphy_ctrl_set);
 	udelay(10);
 	writel(USBPHY_CTRL_SFTRST | USBPHY_CTRL_CLKGATE,
-		&ehci_mxs.phy_regs->hw_usbphy_ctrl_clr);
+		&port->phy_regs->hw_usbphy_ctrl_clr);
 
 	/* Enable USB clock */
-	writel(CLKCTRL_PLL0CTRL0_EN_USB_CLKS | CLKCTRL_PLL0CTRL0_POWER,
-			&clkctrl_regs->hw_clkctrl_pll0ctrl0_set);
-	writel(CLKCTRL_PLL1CTRL0_EN_USB_CLKS | CLKCTRL_PLL1CTRL0_POWER,
-			&clkctrl_regs->hw_clkctrl_pll1ctrl0_set);
-
-	writel(HW_DIGCTL_CTRL_USB0_CLKGATE | HW_DIGCTL_CTRL_USB1_CLKGATE,
-		&digctl_ctrl->reg_clr);
+	ret = ehci_mxs_toggle_clock(port, 1);
+	if (ret)
+		return ret;
 
 	/* Start USB PHY */
-	writel(0, &ehci_mxs.phy_regs->hw_usbphy_pwd);
+	writel(0, &port->phy_regs->hw_usbphy_pwd);
 
 	/* Enable UTMI+ Level 2 and Level 3 compatibility */
 	writel(USBPHY_CTRL_ENUTMILEVEL3 | USBPHY_CTRL_ENUTMILEVEL2 | 1,
-		&ehci_mxs.phy_regs->hw_usbphy_ctrl_set);
+		&port->phy_regs->hw_usbphy_ctrl_set);
 
-	usb_base = ((uint32_t)ehci_mxs.usb_regs) + 0x100;
+	usb_base = port->usb_regs + 0x100;
 	*hccr = (struct ehci_hccr *)usb_base;
 
 	cap_base = ehci_readl(&(*hccr)->cr_capbase);
@@ -114,19 +134,19 @@ int ehci_hcd_stop(int index)
 {
 	int ret;
 	uint32_t usb_base, cap_base, tmp;
-	struct mxs_register_32 *digctl_ctrl =
-		(struct mxs_register_32 *)HW_DIGCTL_CTRL;
-	struct mxs_clkctrl_regs *clkctrl_regs =
-		(struct mxs_clkctrl_regs *)MXS_CLKCTRL_BASE;
 	struct ehci_hccr *hccr;
 	struct ehci_hcor *hcor;
+	const struct ehci_mxs_port *port;
 
-	ret = mxs_ehci_get_port(&ehci_mxs, CONFIG_EHCI_MXS_PORT);
-	if (ret)
-		return ret;
+	if ((index < 0) || (index >= ARRAY_SIZE(mxs_port))) {
+		printf("Invalid port index (index = %d)!\n", index);
+		return -EINVAL;
+	}
+
+	port = &mxs_port[index];
 
 	/* Stop the USB port */
-	usb_base = ((uint32_t)ehci_mxs.usb_regs) + 0x100;
+	usb_base = port->usb_regs + 0x100;
 	hccr = (struct ehci_hccr *)usb_base;
 	cap_base = ehci_readl(&hccr->cr_capbase);
 	hcor = (struct ehci_hcor *)(usb_base + HC_LENGTH(cap_base));
@@ -140,17 +160,10 @@ int ehci_hcd_stop(int index)
 		USBPHY_PWD_RXPWD1PT1 | USBPHY_PWD_RXPWDENV |
 		USBPHY_PWD_TXPWDV2I | USBPHY_PWD_TXPWDIBIAS |
 		USBPHY_PWD_TXPWDFS;
-	writel(tmp, &ehci_mxs.phy_regs->hw_usbphy_pwd);
+	writel(tmp, &port->phy_regs->hw_usbphy_pwd);
 
 	/* Disable USB clock */
-	writel(CLKCTRL_PLL0CTRL0_EN_USB_CLKS,
-			&clkctrl_regs->hw_clkctrl_pll0ctrl0_clr);
-	writel(CLKCTRL_PLL1CTRL0_EN_USB_CLKS,
-			&clkctrl_regs->hw_clkctrl_pll1ctrl0_clr);
+	ret = ehci_mxs_toggle_clock(port, 0);
 
-	/* Gate off the USB clock */
-	writel(HW_DIGCTL_CTRL_USB0_CLKGATE | HW_DIGCTL_CTRL_USB1_CLKGATE,
-		&digctl_ctrl->reg_set);
-
-	return 0;
+	return ret;
 }
diff --git a/include/configs/apx4devkit.h b/include/configs/apx4devkit.h
index 6764b47..8b67a38 100644
--- a/include/configs/apx4devkit.h
+++ b/include/configs/apx4devkit.h
@@ -183,7 +183,8 @@
 #ifdef CONFIG_CMD_USB
 #define CONFIG_USB_EHCI
 #define CONFIG_USB_EHCI_MXS
-#define CONFIG_EHCI_MXS_PORT		1
+#define CONFIG_EHCI_MXS_PORT1
+#define CONFIG_USB_MAX_CONTROLLER_COUNT	1
 #define CONFIG_EHCI_IS_TDI
 #define CONFIG_USB_STORAGE
 #endif
diff --git a/include/configs/m28evk.h b/include/configs/m28evk.h
index 59a7be9..f2725cc 100644
--- a/include/configs/m28evk.h
+++ b/include/configs/m28evk.h
@@ -233,7 +233,9 @@
 #ifdef	CONFIG_CMD_USB
 #define	CONFIG_USB_EHCI
 #define	CONFIG_USB_EHCI_MXS
-#define	CONFIG_EHCI_MXS_PORT		1
+#define CONFIG_EHCI_MXS_PORT0
+#define CONFIG_EHCI_MXS_PORT1
+#define CONFIG_USB_MAX_CONTROLLER_COUNT	2
 #define	CONFIG_EHCI_IS_TDI
 #define	CONFIG_USB_STORAGE
 #endif
diff --git a/include/configs/mx28evk.h b/include/configs/mx28evk.h
index 6a46f3c..0d918a1 100644
--- a/include/configs/mx28evk.h
+++ b/include/configs/mx28evk.h
@@ -181,7 +181,8 @@
 #ifdef	CONFIG_CMD_USB
 #define	CONFIG_USB_EHCI
 #define	CONFIG_USB_EHCI_MXS
-#define	CONFIG_EHCI_MXS_PORT 1
+#define CONFIG_EHCI_MXS_PORT1
+#define CONFIG_USB_MAX_CONTROLLER_COUNT	1
 #define	CONFIG_EHCI_IS_TDI
 #define	CONFIG_USB_STORAGE
 #define	CONFIG_USB_HOST_ETHER
diff --git a/include/configs/sc_sps_1.h b/include/configs/sc_sps_1.h
index 21c76b52..b175ca4 100644
--- a/include/configs/sc_sps_1.h
+++ b/include/configs/sc_sps_1.h
@@ -171,7 +171,8 @@
 #ifdef CONFIG_CMD_USB
 #define CONFIG_USB_EHCI
 #define CONFIG_USB_EHCI_MXS
-#define CONFIG_EHCI_MXS_PORT		0
+#define CONFIG_EHCI_MXS_PORT0
+#define CONFIG_USB_MAX_CONTROLLER_COUNT	1
 #define CONFIG_EHCI_IS_TDI
 #define CONFIG_USB_STORAGE
 #endif
-- 
1.7.10.4

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

* [U-Boot] [PATCH 07/13] mxs: m28: Enable power to USB port 0
  2013-02-23 12:42 [U-Boot] [PATCH 01/13] mxs: Reset the EMI block on mx23 Marek Vasut
                   ` (4 preceding siblings ...)
  2013-02-23 12:43 ` [U-Boot] [PATCH 06/13] mxs: Make ehci-mxs multiport capable Marek Vasut
@ 2013-02-23 12:43 ` Marek Vasut
  2013-02-23 12:43 ` [U-Boot] [PATCH 08/13] mxs: Rename CONFIG_SPL_MX28_PSWITCH_WAIT to CONFIG_SPL_MXS_PSWITCH_WAIT Marek Vasut
                   ` (7 subsequent siblings)
  13 siblings, 0 replies; 25+ messages in thread
From: Marek Vasut @ 2013-02-23 12:43 UTC (permalink / raw)
  To: u-boot

The USB port 0 can now be used alongside the USB port 1, thus enable
power to it.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Cc: Otavio Salvador <otavio@ossystems.com.br>
Cc: Stefano Babic <sbabic@denx.de>
---
 board/denx/m28evk/m28evk.c |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/board/denx/m28evk/m28evk.c b/board/denx/m28evk/m28evk.c
index d93efaf..aff7c1f 100644
--- a/board/denx/m28evk/m28evk.c
+++ b/board/denx/m28evk/m28evk.c
@@ -57,6 +57,10 @@ int board_early_init_f(void)
 	mxs_iomux_setup_pad(MX28_PAD_AUART3_TX__GPIO_3_13 |
 			MXS_PAD_12MA | MXS_PAD_3V3 | MXS_PAD_PULLUP);
 	gpio_direction_output(MX28_PAD_AUART3_TX__GPIO_3_13, 0);
+
+	mxs_iomux_setup_pad(MX28_PAD_AUART3_RX__GPIO_3_12 |
+			MXS_PAD_12MA | MXS_PAD_3V3 | MXS_PAD_PULLUP);
+	gpio_direction_output(MX28_PAD_AUART3_RX__GPIO_3_12, 0);
 #endif
 
 	return 0;
-- 
1.7.10.4

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

* [U-Boot] [PATCH 08/13] mxs: Rename CONFIG_SPL_MX28_PSWITCH_WAIT to CONFIG_SPL_MXS_PSWITCH_WAIT
  2013-02-23 12:42 [U-Boot] [PATCH 01/13] mxs: Reset the EMI block on mx23 Marek Vasut
                   ` (5 preceding siblings ...)
  2013-02-23 12:43 ` [U-Boot] [PATCH 07/13] mxs: m28: Enable power to USB port 0 Marek Vasut
@ 2013-02-23 12:43 ` Marek Vasut
  2013-02-23 12:43 ` [U-Boot] [PATCH 09/13] mx23: Document the tRAS lockout setting in memory initialization Marek Vasut
                   ` (6 subsequent siblings)
  13 siblings, 0 replies; 25+ messages in thread
From: Marek Vasut @ 2013-02-23 12:43 UTC (permalink / raw)
  To: u-boot

From: Otavio Salvador <otavio@ossystems.com.br>

The power switch option is compatible with i.MX23 and i.MX28 so the
configration option needs to reflect it. We choose
'CONFIG_SPL_MXS_PSWITCH_WAIT' for the option name.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Acked-by: Marek Vasut <marex@denx.de>
---
 arch/arm/cpu/arm926ejs/mxs/mxs_init.h       |    2 +-
 arch/arm/cpu/arm926ejs/mxs/spl_power_init.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/cpu/arm926ejs/mxs/mxs_init.h b/arch/arm/cpu/arm926ejs/mxs/mxs_init.h
index 2ddc5bc..084def5 100644
--- a/arch/arm/cpu/arm926ejs/mxs/mxs_init.h
+++ b/arch/arm/cpu/arm926ejs/mxs/mxs_init.h
@@ -30,7 +30,7 @@ void early_delay(int delay);
 
 void mxs_power_init(void);
 
-#ifdef	CONFIG_SPL_MX28_PSWITCH_WAIT
+#ifdef	CONFIG_SPL_MXS_PSWITCH_WAIT
 void mxs_power_wait_pswitch(void);
 #else
 static inline void mxs_power_wait_pswitch(void) { }
diff --git a/arch/arm/cpu/arm926ejs/mxs/spl_power_init.c b/arch/arm/cpu/arm926ejs/mxs/spl_power_init.c
index e9d6302..287c698 100644
--- a/arch/arm/cpu/arm926ejs/mxs/spl_power_init.c
+++ b/arch/arm/cpu/arm926ejs/mxs/spl_power_init.c
@@ -921,7 +921,7 @@ void mxs_power_init(void)
 	early_delay(1000);
 }
 
-#ifdef	CONFIG_SPL_MX28_PSWITCH_WAIT
+#ifdef	CONFIG_SPL_MXS_PSWITCH_WAIT
 void mxs_power_wait_pswitch(void)
 {
 	struct mxs_power_regs *power_regs =
-- 
1.7.10.4

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

* [U-Boot] [PATCH 09/13] mx23: Document the tRAS lockout setting in memory initialization
  2013-02-23 12:42 [U-Boot] [PATCH 01/13] mxs: Reset the EMI block on mx23 Marek Vasut
                   ` (6 preceding siblings ...)
  2013-02-23 12:43 ` [U-Boot] [PATCH 08/13] mxs: Rename CONFIG_SPL_MX28_PSWITCH_WAIT to CONFIG_SPL_MXS_PSWITCH_WAIT Marek Vasut
@ 2013-02-23 12:43 ` Marek Vasut
  2013-02-23 12:43 ` [U-Boot] [PATCH 10/13] mx23evk: Adjust DRAM control register to use full 128MB of RAM Marek Vasut
                   ` (5 subsequent siblings)
  13 siblings, 0 replies; 25+ messages in thread
From: Marek Vasut @ 2013-02-23 12:43 UTC (permalink / raw)
  To: u-boot

From: Otavio Salvador <otavio@ossystems.com.br>

Add a comment about the tRAS lockout setting of HW_DRAM_CTL08 to
enable the 'Fast Auto Pre-Charge' found in the memory chip. The
setting is applied after memory initialization and it is worth
document it.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
---
 arch/arm/cpu/arm926ejs/mxs/spl_mem_init.c |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/arm/cpu/arm926ejs/mxs/spl_mem_init.c b/arch/arm/cpu/arm926ejs/mxs/spl_mem_init.c
index 4a0a5aa..fdac73c 100644
--- a/arch/arm/cpu/arm926ejs/mxs/spl_mem_init.c
+++ b/arch/arm/cpu/arm926ejs/mxs/spl_mem_init.c
@@ -120,6 +120,10 @@ static void initialize_dram_values(void)
 		writel(dram_vals[i], MXS_DRAM_BASE + (4 * i));
 
 #ifdef CONFIG_MX23
+	/*
+	 * Enable tRAS lockout in HW_DRAM_CTL08 ; it must be the last
+	 * element to be set
+	 */
 	writel((1 << 24), MXS_DRAM_BASE + (4 * 8));
 #endif
 }
-- 
1.7.10.4

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

* [U-Boot] [PATCH 10/13] mx23evk: Adjust DRAM control register to use full 128MB of RAM
  2013-02-23 12:42 [U-Boot] [PATCH 01/13] mxs: Reset the EMI block on mx23 Marek Vasut
                   ` (7 preceding siblings ...)
  2013-02-23 12:43 ` [U-Boot] [PATCH 09/13] mx23: Document the tRAS lockout setting in memory initialization Marek Vasut
@ 2013-02-23 12:43 ` Marek Vasut
  2013-02-23 12:43 ` [U-Boot] [PATCH 11/13] led: Use STATUS_LED_ON and STATUS_LED_OFF when calling __led_set Marek Vasut
                   ` (4 subsequent siblings)
  13 siblings, 0 replies; 25+ messages in thread
From: Marek Vasut @ 2013-02-23 12:43 UTC (permalink / raw)
  To: u-boot

From: Otavio Salvador <otavio@ossystems.com.br>

Adjust HW_DRAM_CTL14 to enable the chip selects to allow usage of full
128MB of RAM.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
---
 board/freescale/mx23evk/spl_boot.c |   10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/board/freescale/mx23evk/spl_boot.c b/board/freescale/mx23evk/spl_boot.c
index 6007433..b6f4e7e 100644
--- a/board/freescale/mx23evk/spl_boot.c
+++ b/board/freescale/mx23evk/spl_boot.c
@@ -98,6 +98,16 @@ const iomux_cfg_t iomux_setup[] = {
 		(MXS_PAD_4MA | MXS_PAD_3V3 | MXS_PAD_NOPULL),
 };
 
+#define HW_DRAM_CTL14	(0x38 >> 2)
+#define CS_MAP		0x3
+#define INTAREF		0x2
+#define HW_DRAM_CTL14_CONFIG	(INTAREF << 8 | CS_MAP)
+
+void mxs_adjust_memory_params(uint32_t *dram_vals)
+{
+	dram_vals[HW_DRAM_CTL14] = HW_DRAM_CTL14_CONFIG;
+}
+
 void board_init_ll(void)
 {
 	mxs_common_spl_init(iomux_setup, ARRAY_SIZE(iomux_setup));
-- 
1.7.10.4

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

* [U-Boot] [PATCH 11/13] led: Use STATUS_LED_ON and STATUS_LED_OFF when calling __led_set
  2013-02-23 12:42 [U-Boot] [PATCH 01/13] mxs: Reset the EMI block on mx23 Marek Vasut
                   ` (8 preceding siblings ...)
  2013-02-23 12:43 ` [U-Boot] [PATCH 10/13] mx23evk: Adjust DRAM control register to use full 128MB of RAM Marek Vasut
@ 2013-02-23 12:43 ` Marek Vasut
  2013-02-23 12:43 ` [U-Boot] [PATCH 12/13] mxs: Fix iomux.h to not break build during assembly stage Marek Vasut
                   ` (3 subsequent siblings)
  13 siblings, 0 replies; 25+ messages in thread
From: Marek Vasut @ 2013-02-23 12:43 UTC (permalink / raw)
  To: u-boot

From: Otavio Salvador <otavio@ossystems.com.br>

This fixes the gpio_led driver which needs to compare againt a
STATUS_LED_ON to enable a led.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
---
 common/cmd_led.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/common/cmd_led.c b/common/cmd_led.c
index 7f5ab43..84f79fa 100644
--- a/common/cmd_led.c
+++ b/common/cmd_led.c
@@ -110,13 +110,15 @@ int do_led (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 				if (led_commands[i].on)
 					led_commands[i].on();
 				else
-					__led_set(led_commands[i].mask, 1);
+					__led_set(led_commands[i].mask,
+							  STATUS_LED_ON);
 				break;
 			case LED_OFF:
 				if (led_commands[i].off)
 					led_commands[i].off();
 				else
-					__led_set(led_commands[i].mask, 0);
+					__led_set(led_commands[i].mask,
+							  STATUS_LED_OFF);
 				break;
 			case LED_TOGGLE:
 				if (led_commands[i].toggle)
-- 
1.7.10.4

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

* [U-Boot] [PATCH 12/13] mxs: Fix iomux.h to not break build during assembly stage
  2013-02-23 12:42 [U-Boot] [PATCH 01/13] mxs: Reset the EMI block on mx23 Marek Vasut
                   ` (9 preceding siblings ...)
  2013-02-23 12:43 ` [U-Boot] [PATCH 11/13] led: Use STATUS_LED_ON and STATUS_LED_OFF when calling __led_set Marek Vasut
@ 2013-02-23 12:43 ` Marek Vasut
  2013-02-23 12:43 ` [U-Boot] [PATCH 13/13] mx23_olinuxino: Add support for status LED Marek Vasut
                   ` (2 subsequent siblings)
  13 siblings, 0 replies; 25+ messages in thread
From: Marek Vasut @ 2013-02-23 12:43 UTC (permalink / raw)
  To: u-boot

From: Otavio Salvador <otavio@ossystems.com.br>

This fixes the build failure when included in mx23_olinuxino.h board
config; the addition of "asm/types.h" is due "u32" being otherwise
undefined.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
---
 arch/arm/include/asm/arch-mxs/iomux.h |    5 +++++
 1 file changed, 5 insertions(+)

diff --git a/arch/arm/include/asm/arch-mxs/iomux.h b/arch/arm/include/asm/arch-mxs/iomux.h
index 7abdf58..4288715 100644
--- a/arch/arm/include/asm/arch-mxs/iomux.h
+++ b/arch/arm/include/asm/arch-mxs/iomux.h
@@ -21,6 +21,10 @@
 #ifndef __MACH_MXS_IOMUX_H__
 #define __MACH_MXS_IOMUX_H__
 
+#ifndef __ASSEMBLY__
+
+#include <asm/types.h>
+
 /*
  * IOMUX/PAD Bit field definitions
  *
@@ -165,4 +169,5 @@ int mxs_iomux_setup_pad(iomux_cfg_t pad);
  */
 int mxs_iomux_setup_multiple_pads(const iomux_cfg_t *pad_list, unsigned count);
 
+#endif /* __ASSEMBLY__ */
 #endif /* __MACH_MXS_IOMUX_H__*/
-- 
1.7.10.4

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

* [U-Boot] [PATCH 13/13] mx23_olinuxino: Add support for status LED
  2013-02-23 12:42 [U-Boot] [PATCH 01/13] mxs: Reset the EMI block on mx23 Marek Vasut
                   ` (10 preceding siblings ...)
  2013-02-23 12:43 ` [U-Boot] [PATCH 12/13] mxs: Fix iomux.h to not break build during assembly stage Marek Vasut
@ 2013-02-23 12:43 ` Marek Vasut
  2013-02-23 15:27 ` [U-Boot] [PATCH 01/13] mxs: Reset the EMI block on mx23 Otavio Salvador
  2013-03-07 16:56 ` Stefano Babic
  13 siblings, 0 replies; 25+ messages in thread
From: Marek Vasut @ 2013-02-23 12:43 UTC (permalink / raw)
  To: u-boot

From: Otavio Salvador <otavio@ossystems.com.br>

This allow user to know if the bootloader is running, even without a
serial console.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
---
 board/olimex/mx23_olinuxino/mx23_olinuxino.c |    7 +++++++
 board/olimex/mx23_olinuxino/spl_boot.c       |    4 ++++
 include/configs/mx23_olinuxino.h             |   14 ++++++++++++++
 3 files changed, 25 insertions(+)

diff --git a/board/olimex/mx23_olinuxino/mx23_olinuxino.c b/board/olimex/mx23_olinuxino/mx23_olinuxino.c
index 6a6053b..2501417 100644
--- a/board/olimex/mx23_olinuxino/mx23_olinuxino.c
+++ b/board/olimex/mx23_olinuxino/mx23_olinuxino.c
@@ -28,6 +28,9 @@
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/sys_proto.h>
+#ifdef CONFIG_STATUS_LED
+#include <status_led.h>
+#endif
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -67,5 +70,9 @@ int board_init(void)
 	/* Adress of boot parameters */
 	gd->bd->bi_boot_params = PHYS_SDRAM_1 + 0x100;
 
+#if defined(CONFIG_STATUS_LED) && defined(STATUS_LED_BOOT)
+	status_led_set(STATUS_LED_BOOT, STATUS_LED_STATE);
+#endif
+
 	return 0;
 }
diff --git a/board/olimex/mx23_olinuxino/spl_boot.c b/board/olimex/mx23_olinuxino/spl_boot.c
index 7def8bc..3bbf5ad 100644
--- a/board/olimex/mx23_olinuxino/spl_boot.c
+++ b/board/olimex/mx23_olinuxino/spl_boot.c
@@ -84,6 +84,10 @@ const iomux_cfg_t iomux_setup[] = {
 	MX23_PAD_EMI_RASN__EMI_RASN | MUX_CONFIG_EMI,
 	MX23_PAD_EMI_WEN__EMI_WEN | MUX_CONFIG_EMI,
 
+	/* Green LED */
+	MX23_PAD_SSP1_DETECT__GPIO_2_1 |
+		(MXS_PAD_3V3 | MXS_PAD_4MA | MXS_PAD_NOPULL),
+
 	/* MMC 0 */
 	MX23_PAD_SSP1_CMD__SSP1_CMD | MUX_CONFIG_SSP,
 	MX23_PAD_SSP1_DATA0__SSP1_DATA0 | MUX_CONFIG_SSP,
diff --git a/include/configs/mx23_olinuxino.h b/include/configs/mx23_olinuxino.h
index 7983c5d..d019944 100644
--- a/include/configs/mx23_olinuxino.h
+++ b/include/configs/mx23_olinuxino.h
@@ -19,6 +19,8 @@
 #ifndef __MX23_OLINUXINO_CONFIG_H__
 #define __MX23_OLINUXINO_CONFIG_H__
 
+#include <asm/arch/iomux-mx23.h>
+
 /*
  * SoC configurations
  */
@@ -56,6 +58,7 @@
 #define	CONFIG_CMD_EXT2
 #define	CONFIG_CMD_FAT
 #define	CONFIG_CMD_GPIO
+#define	CONFIG_CMD_LED
 #define	CONFIG_CMD_MMC
 
 /*
@@ -112,6 +115,17 @@
 #define	CONFIG_BAUDRATE			115200	/* Default baud rate */
 
 /*
+ * Status LED
+ */
+#define	CONFIG_STATUS_LED
+#define	CONFIG_GPIO_LED
+#define	CONFIG_BOARD_SPECIFIC_LED
+#define	STATUS_LED_BOOT	0
+#define	STATUS_LED_BIT	MX23_PAD_SSP1_DETECT__GPIO_2_1
+#define	STATUS_LED_STATE	STATUS_LED_ON
+#define	STATUS_LED_PERIOD	(CONFIG_SYS_HZ / 2)
+
+/*
  * MMC Driver
  */
 #ifdef	CONFIG_CMD_MMC
-- 
1.7.10.4

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

* [U-Boot] [PATCH 04/13] mxs: spi: Remove CONFIG_MXS_SPI_DMA_ENABLE
  2013-02-23 12:43 ` [U-Boot] [PATCH 04/13] mxs: spi: Remove CONFIG_MXS_SPI_DMA_ENABLE Marek Vasut
@ 2013-02-23 14:11   ` Fabio Estevam
  2013-02-23 17:25     ` Marek Vasut
  0 siblings, 1 reply; 25+ messages in thread
From: Fabio Estevam @ 2013-02-23 14:11 UTC (permalink / raw)
  To: u-boot

Hi Marek,

On Sat, Feb 23, 2013 at 9:43 AM, Marek Vasut <marex@denx.de> wrote:

> -
> -#ifdef CONFIG_MXS_SPI_DMA_ENABLE
>         int dma = 1;

Can't we get rid of the 'dma'  variable now?

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

* [U-Boot] [PATCH 01/13] mxs: Reset the EMI block on mx23
  2013-02-23 12:42 [U-Boot] [PATCH 01/13] mxs: Reset the EMI block on mx23 Marek Vasut
                   ` (11 preceding siblings ...)
  2013-02-23 12:43 ` [U-Boot] [PATCH 13/13] mx23_olinuxino: Add support for status LED Marek Vasut
@ 2013-02-23 15:27 ` Otavio Salvador
  2013-02-23 17:41   ` Marek Vasut
  2013-02-23 17:55   ` Marek Vasut
  2013-03-07 16:56 ` Stefano Babic
  13 siblings, 2 replies; 25+ messages in thread
From: Otavio Salvador @ 2013-02-23 15:27 UTC (permalink / raw)
  To: u-boot

On Sat, Feb 23, 2013 at 9:42 AM, Marek Vasut <marex@denx.de> wrote:
> The real reason for memory instability was the fact that the EMI block
> was gated and not reset throughout the boards' operation. This patch
> resets the EMI block properly while also reverts the memory voltage bump.
> The memory stability issues were caused by the EMI not being reset properly
> and thus there is no longer need to run the memory at higher voltage than
> it ought to run at.
>
> This partly reverts 8303ed128a55519f19c5f11087032d4bc4e0537a .
>
> Signed-off-by: Marek Vasut <marex@denx.de>

What the changes from v1? Last time I tested it, it broke mx23evk as
it made it fail in mtest.

-- 
Otavio Salvador                             O.S. Systems
E-mail: otavio at ossystems.com.br  http://www.ossystems.com.br
Mobile: +55 53 9981-7854              http://projetos.ossystems.com.br

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

* [U-Boot] [PATCH 03/13] mxs: spi: Fix the MXS SPI for mx23
  2013-02-23 12:42 ` [U-Boot] [PATCH 03/13] mxs: spi: Fix the MXS SPI for mx23 Marek Vasut
@ 2013-02-23 15:28   ` Otavio Salvador
  2013-02-23 17:41     ` Marek Vasut
  0 siblings, 1 reply; 25+ messages in thread
From: Otavio Salvador @ 2013-02-23 15:28 UTC (permalink / raw)
  To: u-boot

On Sat, Feb 23, 2013 at 9:42 AM, Marek Vasut <marex@denx.de> wrote:
> The MX23 has slightly different register layout. Adjust the SPI
> driver to match the layout, both the PIO and DMA part.
>
> Signed-off-by: Marek Vasut <marex@denx.de>

What the changes from v1?

-- 
Otavio Salvador                             O.S. Systems
E-mail: otavio at ossystems.com.br  http://www.ossystems.com.br
Mobile: +55 53 9981-7854              http://projetos.ossystems.com.br

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

* [U-Boot] [PATCH 06/13] mxs: Make ehci-mxs multiport capable
  2013-02-23 12:43 ` [U-Boot] [PATCH 06/13] mxs: Make ehci-mxs multiport capable Marek Vasut
@ 2013-02-23 15:31   ` Otavio Salvador
  0 siblings, 0 replies; 25+ messages in thread
From: Otavio Salvador @ 2013-02-23 15:31 UTC (permalink / raw)
  To: u-boot

On Sat, Feb 23, 2013 at 9:43 AM, Marek Vasut <marex@denx.de> wrote:
> Rework ehci-mxs so it supports both ports on MX28. It was necessary
> to wrap the per-port configuration into struct ehci_mxs_port and pull
> out the clock configuration function.
>
> Signed-off-by: Marek Vasut <marex@denx.de>

I couldn't test it yet but it is much nicer than my version :-)

Will give it a try ...

-- 
Otavio Salvador                             O.S. Systems
E-mail: otavio at ossystems.com.br  http://www.ossystems.com.br
Mobile: +55 53 9981-7854              http://projetos.ossystems.com.br

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

* [U-Boot] [PATCH 05/13] mxs: Squash the header file usage in ehci-mxs
  2013-02-23 12:43 ` [U-Boot] [PATCH 05/13] mxs: Squash the header file usage in ehci-mxs Marek Vasut
@ 2013-02-23 15:32   ` Otavio Salvador
  0 siblings, 0 replies; 25+ messages in thread
From: Otavio Salvador @ 2013-02-23 15:32 UTC (permalink / raw)
  To: u-boot

On Sat, Feb 23, 2013 at 9:43 AM, Marek Vasut <marex@denx.de> wrote:
> The ehci-mxs driver included the register definitions directly.
> Use imx-regs.h instead since it contains proper handling of the
> differences between mx23 and mx28.
>
> Signed-off-by: Marek Vasut <marex@denx.de>

Acked-by: Otavio Salvador <otavio@ossystems.com.br>

-- 
Otavio Salvador                             O.S. Systems
E-mail: otavio at ossystems.com.br  http://www.ossystems.com.br
Mobile: +55 53 9981-7854              http://projetos.ossystems.com.br

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

* [U-Boot] [PATCH 04/13] mxs: spi: Remove CONFIG_MXS_SPI_DMA_ENABLE
  2013-02-23 14:11   ` Fabio Estevam
@ 2013-02-23 17:25     ` Marek Vasut
  0 siblings, 0 replies; 25+ messages in thread
From: Marek Vasut @ 2013-02-23 17:25 UTC (permalink / raw)
  To: u-boot

Dear Fabio Estevam,

> Hi Marek,
> 
> On Sat, Feb 23, 2013 at 9:43 AM, Marek Vasut <marex@denx.de> wrote:
> > -
> > -#ifdef CONFIG_MXS_SPI_DMA_ENABLE
> > 
> >         int dma = 1;
> 
> Can't we get rid of the 'dma'  variable now?

No, we still use it for DMA switching. DMA is enabled only for aligned 
transfers.

Best regards,
Marek Vasut

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

* [U-Boot] [PATCH 01/13] mxs: Reset the EMI block on mx23
  2013-02-23 15:27 ` [U-Boot] [PATCH 01/13] mxs: Reset the EMI block on mx23 Otavio Salvador
@ 2013-02-23 17:41   ` Marek Vasut
  2013-02-23 17:54     ` Otavio Salvador
  2013-02-23 17:55   ` Marek Vasut
  1 sibling, 1 reply; 25+ messages in thread
From: Marek Vasut @ 2013-02-23 17:41 UTC (permalink / raw)
  To: u-boot

Dear Otavio Salvador,

> On Sat, Feb 23, 2013 at 9:42 AM, Marek Vasut <marex@denx.de> wrote:
> > The real reason for memory instability was the fact that the EMI block
> > was gated and not reset throughout the boards' operation. This patch
> > resets the EMI block properly while also reverts the memory voltage bump.
> > The memory stability issues were caused by the EMI not being reset
> > properly and thus there is no longer need to run the memory at higher
> > voltage than it ought to run at.
> > 
> > This partly reverts 8303ed128a55519f19c5f11087032d4bc4e0537a .
> > 
> > Signed-off-by: Marek Vasut <marex@denx.de>
> 
> What the changes from v1? Last time I tested it, it broke mx23evk as
> it made it fail in mtest.

The MX23EVK reboots unconditionally when I attempt mtest with or without this 
patch.

And there's no previous version, this patch is V1. The stuff sent before shall 
be ignored.

Best regards,
Marek Vasut

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

* [U-Boot] [PATCH 03/13] mxs: spi: Fix the MXS SPI for mx23
  2013-02-23 15:28   ` Otavio Salvador
@ 2013-02-23 17:41     ` Marek Vasut
  0 siblings, 0 replies; 25+ messages in thread
From: Marek Vasut @ 2013-02-23 17:41 UTC (permalink / raw)
  To: u-boot

Dear Otavio Salvador,

> On Sat, Feb 23, 2013 at 9:42 AM, Marek Vasut <marex@denx.de> wrote:
> > The MX23 has slightly different register layout. Adjust the SPI
> > driver to match the layout, both the PIO and DMA part.
> > 
> > Signed-off-by: Marek Vasut <marex@denx.de>
> 
> What the changes from v1?

Same applies to 01/13, this is V1.

Best regards,
Marek Vasut

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

* [U-Boot] [PATCH 01/13] mxs: Reset the EMI block on mx23
  2013-02-23 17:41   ` Marek Vasut
@ 2013-02-23 17:54     ` Otavio Salvador
  2013-02-23 18:48       ` Marek Vasut
  0 siblings, 1 reply; 25+ messages in thread
From: Otavio Salvador @ 2013-02-23 17:54 UTC (permalink / raw)
  To: u-boot

On Sat, Feb 23, 2013 at 2:41 PM, Marek Vasut <marex@denx.de> wrote:
> Dear Otavio Salvador,
>
>> On Sat, Feb 23, 2013 at 9:42 AM, Marek Vasut <marex@denx.de> wrote:
>> > The real reason for memory instability was the fact that the EMI block
>> > was gated and not reset throughout the boards' operation. This patch
>> > resets the EMI block properly while also reverts the memory voltage bump.
>> > The memory stability issues were caused by the EMI not being reset
>> > properly and thus there is no longer need to run the memory at higher
>> > voltage than it ought to run at.
>> >
>> > This partly reverts 8303ed128a55519f19c5f11087032d4bc4e0537a .
>> >
>> > Signed-off-by: Marek Vasut <marex@denx.de>
>>
>> What the changes from v1? Last time I tested it, it broke mx23evk as
>> it made it fail in mtest.
>
> The MX23EVK reboots unconditionally when I attempt mtest with or without this
> patch.

Here it works fine.

> And there's no previous version, this patch is V1. The stuff sent before shall
> be ignored.

So does it change something from initial post?

-- 
Otavio Salvador                             O.S. Systems
E-mail: otavio at ossystems.com.br  http://www.ossystems.com.br
Mobile: +55 53 9981-7854              http://projetos.ossystems.com.br

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

* [U-Boot] [PATCH 01/13] mxs: Reset the EMI block on mx23
  2013-02-23 15:27 ` [U-Boot] [PATCH 01/13] mxs: Reset the EMI block on mx23 Otavio Salvador
  2013-02-23 17:41   ` Marek Vasut
@ 2013-02-23 17:55   ` Marek Vasut
  1 sibling, 0 replies; 25+ messages in thread
From: Marek Vasut @ 2013-02-23 17:55 UTC (permalink / raw)
  To: u-boot

Dear Otavio Salvador,

> On Sat, Feb 23, 2013 at 9:42 AM, Marek Vasut <marex@denx.de> wrote:
> > The real reason for memory instability was the fact that the EMI block
> > was gated and not reset throughout the boards' operation. This patch
> > resets the EMI block properly while also reverts the memory voltage bump.
> > The memory stability issues were caused by the EMI not being reset
> > properly and thus there is no longer need to run the memory at higher
> > voltage than it ought to run at.
> > 
> > This partly reverts 8303ed128a55519f19c5f11087032d4bc4e0537a .
> > 
> > Signed-off-by: Marek Vasut <marex@denx.de>
> 
> What the changes from v1? Last time I tested it, it broke mx23evk as
> it made it fail in mtest.

I just tested this on MX23EVK, I detect no problem.

Best regards,
Marek Vasut

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

* [U-Boot] [PATCH 01/13] mxs: Reset the EMI block on mx23
  2013-02-23 17:54     ` Otavio Salvador
@ 2013-02-23 18:48       ` Marek Vasut
  0 siblings, 0 replies; 25+ messages in thread
From: Marek Vasut @ 2013-02-23 18:48 UTC (permalink / raw)
  To: u-boot

Dear Otavio Salvador,

> On Sat, Feb 23, 2013 at 2:41 PM, Marek Vasut <marex@denx.de> wrote:
> > Dear Otavio Salvador,
> > 
> >> On Sat, Feb 23, 2013 at 9:42 AM, Marek Vasut <marex@denx.de> wrote:
> >> > The real reason for memory instability was the fact that the EMI block
> >> > was gated and not reset throughout the boards' operation. This patch
> >> > resets the EMI block properly while also reverts the memory voltage
> >> > bump. The memory stability issues were caused by the EMI not being
> >> > reset properly and thus there is no longer need to run the memory at
> >> > higher voltage than it ought to run at.
> >> > 
> >> > This partly reverts 8303ed128a55519f19c5f11087032d4bc4e0537a .
> >> > 
> >> > Signed-off-by: Marek Vasut <marex@denx.de>
> >> 
> >> What the changes from v1? Last time I tested it, it broke mx23evk as
> >> it made it fail in mtest.
> > 
> > The MX23EVK reboots unconditionally when I attempt mtest with or without
> > this patch.
> 
> Here it works fine.
> 
> > And there's no previous version, this patch is V1. The stuff sent before
> > shall be ignored.
> 
> So does it change something from initial post?

I do not know, that's why this is V1.

Best regards,
Marek Vasut

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

* [U-Boot] [PATCH 01/13] mxs: Reset the EMI block on mx23
  2013-02-23 12:42 [U-Boot] [PATCH 01/13] mxs: Reset the EMI block on mx23 Marek Vasut
                   ` (12 preceding siblings ...)
  2013-02-23 15:27 ` [U-Boot] [PATCH 01/13] mxs: Reset the EMI block on mx23 Otavio Salvador
@ 2013-03-07 16:56 ` Stefano Babic
  13 siblings, 0 replies; 25+ messages in thread
From: Stefano Babic @ 2013-03-07 16:56 UTC (permalink / raw)
  To: u-boot

On 23/02/2013 13:42, Marek Vasut wrote:
> The real reason for memory instability was the fact that the EMI block
> was gated and not reset throughout the boards' operation. This patch
> resets the EMI block properly while also reverts the memory voltage bump.
> The memory stability issues were caused by the EMI not being reset properly
> and thus there is no longer need to run the memory at higher voltage than
> it ought to run at.
> 
> This partly reverts 8303ed128a55519f19c5f11087032d4bc4e0537a .
> 
> Signed-off-by: Marek Vasut <marex@denx.de>
> Cc: Fabio Estevam <fabio.estevam@freescale.com>
> Cc: Otavio Salvador <otavio@ossystems.com.br>
> Cc: Stefano Babic <sbabic@denx.de>
> ---

Applied (whole series) to u-boot-imx, thanks.

Best regards,
Stefano Babic

-- 
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================

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

end of thread, other threads:[~2013-03-07 16:56 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-23 12:42 [U-Boot] [PATCH 01/13] mxs: Reset the EMI block on mx23 Marek Vasut
2013-02-23 12:42 ` [U-Boot] [PATCH 02/13] mxs: mmc: spi: dma: Better wrap the MXS differences Marek Vasut
2013-02-23 12:42 ` [U-Boot] [PATCH 03/13] mxs: spi: Fix the MXS SPI for mx23 Marek Vasut
2013-02-23 15:28   ` Otavio Salvador
2013-02-23 17:41     ` Marek Vasut
2013-02-23 12:43 ` [U-Boot] [PATCH 04/13] mxs: spi: Remove CONFIG_MXS_SPI_DMA_ENABLE Marek Vasut
2013-02-23 14:11   ` Fabio Estevam
2013-02-23 17:25     ` Marek Vasut
2013-02-23 12:43 ` [U-Boot] [PATCH 05/13] mxs: Squash the header file usage in ehci-mxs Marek Vasut
2013-02-23 15:32   ` Otavio Salvador
2013-02-23 12:43 ` [U-Boot] [PATCH 06/13] mxs: Make ehci-mxs multiport capable Marek Vasut
2013-02-23 15:31   ` Otavio Salvador
2013-02-23 12:43 ` [U-Boot] [PATCH 07/13] mxs: m28: Enable power to USB port 0 Marek Vasut
2013-02-23 12:43 ` [U-Boot] [PATCH 08/13] mxs: Rename CONFIG_SPL_MX28_PSWITCH_WAIT to CONFIG_SPL_MXS_PSWITCH_WAIT Marek Vasut
2013-02-23 12:43 ` [U-Boot] [PATCH 09/13] mx23: Document the tRAS lockout setting in memory initialization Marek Vasut
2013-02-23 12:43 ` [U-Boot] [PATCH 10/13] mx23evk: Adjust DRAM control register to use full 128MB of RAM Marek Vasut
2013-02-23 12:43 ` [U-Boot] [PATCH 11/13] led: Use STATUS_LED_ON and STATUS_LED_OFF when calling __led_set Marek Vasut
2013-02-23 12:43 ` [U-Boot] [PATCH 12/13] mxs: Fix iomux.h to not break build during assembly stage Marek Vasut
2013-02-23 12:43 ` [U-Boot] [PATCH 13/13] mx23_olinuxino: Add support for status LED Marek Vasut
2013-02-23 15:27 ` [U-Boot] [PATCH 01/13] mxs: Reset the EMI block on mx23 Otavio Salvador
2013-02-23 17:41   ` Marek Vasut
2013-02-23 17:54     ` Otavio Salvador
2013-02-23 18:48       ` Marek Vasut
2013-02-23 17:55   ` Marek Vasut
2013-03-07 16:56 ` Stefano Babic

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.