Skip to contentSkip to conversation

mx6q: Factor out common DDR3 init code

PATCH Superseded Fabio Estevam 5 participants 12 messages Sep 11, 2012 – Sep 13, 2012 1 message not in the archive

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 mx6q: Factor out common DDR3 init code

Factor out common DDR3 initialization code, allowing easier maintainance of such scripts.

---
 .../arm/imx-common/ddr/mx6q_ddr3.cfg               |    0
 board/freescale/mx6qarm2/imximage.cfg              |  173 --------------------
 boards.cfg                                         |    4 +-
 3 files changed, 2 insertions(+), 175 deletions(-)
 rename board/freescale/mx6qsabrelite/imximage.cfg => arch/arm/imx-common/ddr/mx6q_ddr3.cfg (100%)
 delete mode 100644 board/freescale/mx6qarm2/imximage.cfg
arch/arm/imx-common/ddr/mx6q_ddr3.cfg renamed from board/freescale/mx6qsabrelite/imximage.cfg +0 -0
similarity index 100%
rename from board/freescale/mx6qsabrelite/imximage.cfg
rename to arch/arm/imx-common/ddr/mx6q_ddr3.cfg
board/freescale/mx6qarm2/imximage.cfg deleted +0 -173

173 lines not on this page · raw message

boards.cfg +2 -2
index 72e7803..a3bec35 100644
@@ -230,8 +230,8 @@ mx53loco                     arm         armv7       mx53loco            freesca
 mx53smd                      arm         armv7       mx53smd             freescale      mx5		mx53smd:IMX_CONFIG=board/freescale/mx53smd/imximage.cfg
 ima3-mx53                    arm         armv7       ima3-mx53           esg            mx5		ima3-mx53:IMX_CONFIG=board/esg/ima3-mx53/imximage.cfg
 vision2                      arm         armv7       vision2             ttcontrol      mx5		vision2:IMX_CONFIG=board/ttcontrol/vision2/imximage_hynix.cfg
-mx6qarm2                     arm         armv7       mx6qarm2            freescale      mx6		mx6qarm2:IMX_CONFIG=board/freescale/mx6qarm2/imximage.cfg
-mx6qsabrelite                arm         armv7       mx6qsabrelite       freescale      mx6		mx6qsabrelite:IMX_CONFIG=board/freescale/mx6qsabrelite/imximage.cfg
+mx6qarm2                     arm         armv7       mx6qarm2            freescale      mx6		mx6qarm2:IMX_CONFIG=arch/arm/imx-common/ddr/mx6q_ddr3.cfg
+mx6qsabrelite                arm         armv7       mx6qsabrelite       freescale      mx6		mx6qsabrelite:IMX_CONFIG=arch/arm/imx-common/ddr/mx6q_ddr3.cfg
 cm_t35                       arm         armv7       cm_t35              -              omap3
 omap3_overo                  arm         armv7       overo               -              omap3
 omap3_pandora                arm         armv7       pandora             -              omap3
Signature · 1 line
1.7.9.5
#1 lore raw

PATCH 2/2 mx6: Add basic support for mx6qsabresd board.

mx6qsabresd is a board based on mx6q SoC with the following features:
- 1GB of DDR3
- 1 USB OTG port
- 1 HDMI output port
- SPI NOR
- LVDS panel
- Gigabit Ethernet
- Camera Connector
- eMMC and SD card slot
- Audio

Add very basic support for it.

---
 MAINTAINERS                               |    1 +
 board/freescale/mx6qsabresd/Makefile      |   37 +++++++
 board/freescale/mx6qsabresd/mx6qsabresd.c |  118 ++++++++++++++++++++
 boards.cfg                                |    1 +
 include/configs/mx6qsabresd.h             |  171 +++++++++++++++++++++++++++++
 5 files changed, 328 insertions(+)
 create mode 100644 board/freescale/mx6qsabresd/Makefile
 create mode 100644 board/freescale/mx6qsabresd/mx6qsabresd.c
 create mode 100644 include/configs/mx6qsabresd.h
MAINTAINERS +1 -0
index 4aabcff..130d0cc 100644
@@ -654,6 +654,7 @@ Fabio Estevam <[email protected]>
 	mx31pdk		i.MX31
 	mx53ard		i.MX53
 	mx53smd		i.MX53
+	mx6qsabresd	i.MX6Q
 
 Daniel Gorsulowski <[email protected]>
 
board/freescale/mx6qsabresd/Makefile new file +37 -0
new file mode 100644
index 0000000..477bc3a
@@ -0,0 +1,37 @@
+#
+# Copyright (C) 2007, Guennadi Liakhovetski <[email protected]>
+#
+# (C) Copyright 2011 Freescale Semiconductor, Inc.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of
+# the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+
+include $(TOPDIR)/config.mk
+
+LIB    = $(obj)lib$(BOARD).o
+
+COBJS  := mx6qsabresd.o
+
+SRCS   := $(SOBJS:.o=.S) $(COBJS:.o=.c)
+OBJS   := $(addprefix $(obj),$(COBJS))
+SOBJS  := $(addprefix $(obj),$(SOBJS))
+
+$(LIB):        $(obj).depend $(OBJS) $(SOBJS)
+	$(call cmd_link_o_target, $(OBJS) $(SOBJS))
+
+#########################################################################
+
+# defines $(obj).depend target
+include $(SRCTREE)/rules.mk
+
+sinclude $(obj).depend
+
+#########################################################################
board/freescale/mx6qsabresd/mx6qsabresd.c new file +118 -0

118 lines not on this page · raw message

boards.cfg +1 -0
index a3bec35..da0ed85 100644
@@ -232,6 +232,7 @@ ima3-mx53                    arm         armv7       ima3-mx53           esg
 vision2                      arm         armv7       vision2             ttcontrol      mx5		vision2:IMX_CONFIG=board/ttcontrol/vision2/imximage_hynix.cfg
 mx6qarm2                     arm         armv7       mx6qarm2            freescale      mx6		mx6qarm2:IMX_CONFIG=arch/arm/imx-common/ddr/mx6q_ddr3.cfg
 mx6qsabrelite                arm         armv7       mx6qsabrelite       freescale      mx6		mx6qsabrelite:IMX_CONFIG=arch/arm/imx-common/ddr/mx6q_ddr3.cfg
+mx6qsabresd                  arm         armv7       mx6qsabresd         freescale      mx6           mx6qsabresd:IMX_CONFIG=arch/arm/imx-common/ddr/mx6q_ddr3.cfg
 cm_t35                       arm         armv7       cm_t35              -              omap3
 omap3_overo                  arm         armv7       overo               -              omap3
 omap3_pandora                arm         armv7       pandora             -              omap3
include/configs/mx6qsabresd.h new file +171 -0

171 lines not on this page · raw message

Signature · 1 line
1.7.9.5
#2 lore raw

PATCH 2/2 mx6: Add basic support for mx6qsabresd board.

Quoted 14 lines · Fabio Estevam

mx6qsabresd is a board based on mx6q SoC with the following features:
- 1GB of DDR3
- 1 USB OTG port
- 1 HDMI output port
- SPI NOR
- LVDS panel
- Gigabit Ethernet
- Camera Connector
- eMMC and SD card slot
- Audio

Add very basic support for it.

<snip>

include/configs/mx6qsabresd.h line 62

Quoted 5 lines
include/configs/mx6qsabresd.h new file +5 -0
+/* allow to overwrite serial and ethaddr */
+#define CONFIG_ENV_OVERWRITE
+#define CONFIG_CONS_INDEX              1
+#define CONFIG_BAUDRATE                        115200
+#define CONFIG_SYS_BAUDRATE_TABLE      {9600, 19200, 38400, 57600, 115200}

According to this commit,
"CONFIG_SYS_BAUDRATE_TABLE: Add <config_fallbacks.h>, place there" (26750c8aee2383a026e0cf89e9310628d3a5a6a0), the above line isn't required anymore. Right?

Regards,
Vikram

reviewer
#3 lore raw

PATCH 2/2 mx6: Add basic support for mx6qsabresd board.

Hi Vikram,

Quoted 4 lines · Vikram Narayanan

According to this commit,
"CONFIG_SYS_BAUDRATE_TABLE: Add <config_fallbacks.h>, place there" (26750c8aee2383a026e0cf89e9310628d3a5a6a0), the above line isn't required anymore. Right?

Yes, you are right. Will remove it in v2.

Thanks,

Fabio Estevam

#4 lore raw

PATCH 1/2 mx6q: Factor out common DDR3 init code

In reply to Fabio Estevam
Quoted 1 line

-----Original Message-----

From: [email protected] [mailto:u-boot-bounces at lists.denx.de]

Quoted 8 lines

On Behalf Of Fabio Estevam
Sent: Wednesday, September 12, 2012 2:33 AM
To: sbabic at denx.de
Cc: Estevam Fabio-R49496; u-boot at lists.denx.de
Subject: [U-Boot] [PATCH 1/2] mx6q: Factor out common DDR3 init code

Factor out common DDR3 initialization code, allowing easier maintainance of such scripts.

Are you sure that we can use on DDR3 script to cover 3 kind of boards:

ARM2/Sabrelite/SabreSD? Did you do the DDR stress test?

Quoted 12 lines

---

.../arm/imx-common/ddr/mx6q_ddr3.cfg               |    0
board/freescale/mx6qarm2/imximage.cfg              |  173 --------------------
boards.cfg                                         |    4 +-
3 files changed, 2 insertions(+), 175 deletions(-)  rename

board/freescale/mx6qsabrelite/imximage.cfg => arch/arm/imx- common/ddr/mx6q_ddr3.cfg (100%) delete mode 100644 board/freescale/mx6qarm2/imximage.cfg

arch/arm/imx- renamed from board/freescale/mx6qsabrelite/imximage.cfg +0 -0

[...]

Quoted 7 lines

1.7.9.5

_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

reviewer
#5 lore raw

PATCH 1/2 mx6q: Factor out common DDR3 init code

Quoted 8 lines · On Tue, Sep 11, 2012 at 11:26 PM, Liu Hui-R64343 <[email protected]> wrote:
Quoted 8 lines

-----Original Message-----
From: u-boot-bounces at lists.denx.de [mailto:u-boot-bounces at lists.denx.de] On Behalf Of Fabio Estevam
Sent: Wednesday, September 12, 2012 2:33 AM
To: sbabic at denx.de
Cc: Estevam Fabio-R49496; u-boot at lists.denx.de
Subject: [U-Boot] [PATCH 1/2] mx6q: Factor out common DDR3 init code

Quoted 6 lines
Quoted 2 lines

Factor out common DDR3 initialization code, allowing easier maintainance of such scripts.

Are you sure that we can use on DDR3 script to cover 3 kind of boards:

ARM2/Sabrelite/SabreSD? Did you do the DDR stress test?

Yes, mtest runs fine.

I also plan to do the same for mx53 boards.

Regards,

Fabio Estevam

A message that is not in the archive (sent off-list or not yet received): AD13664F485EE54694E29A7F9D5BE1AF348CFA@039-SN2MPN1-022.039d.mgd.msft.net

reviewer
#7 lore raw

PATCH 1/2 mx6q: Factor out common DDR3 init code

Quoted 1 line · On Tue, Sep 11, 2012 at 11:42 PM, Liu Hui-R64343 <[email protected]> wrote:

mtest is not enough, you need run FSL DDR stress test tool.

I will be glad to test it, if you port it to U-boot ;-)

#8 lore raw

PATCH 1/2 mx6q: Factor out common DDR3 init code

In reply to a message not in the archive

Am 12/09/2012 04:42, schrieb Liu Hui-R64343:

Quoted 21 lines
Quoted 21 lines

-----Original Message-----
From: Fabio Estevam [mailto:festevam at gmail.com]
Sent: Wednesday, September 12, 2012 10:33 AM
To: Liu Hui-R64343
Cc: Estevam Fabio-R49496; sbabic at denx.de; u-boot at lists.denx.de
Subject: Re: [U-Boot] [PATCH 1/2] mx6q: Factor out common DDR3 init code

Quoted 12 lines · On Tue, Sep 11, 2012 at 11:26 PM, Liu Hui-R64343 <[email protected]> wrote:
Quoted 11 lines

-----Original Message-----
From: u-boot-bounces at lists.denx.de [mailto:u-boot-bounces at lists.denx.de]
On Behalf Of Fabio Estevam
Sent: Wednesday, September 12, 2012 2:33 AM
To: sbabic at denx.de
Cc: Estevam Fabio-R49496; u-boot at lists.denx.de
Subject: [U-Boot] [PATCH 1/2] mx6q: Factor out common DDR3 init code

Factor out common DDR3 initialization code, allowing easier maintainance of such scripts.

Quoted 7 lines
Quoted 5 lines
Quoted 3 lines

Are you sure that we can use on DDR3 script to cover 3 kind of boards:

ARM2/Sabrelite/SabreSD? Did you do the DDR stress test?

Yes, mtest runs fine.

mtest is not enough, you need run FSL DDR stress test tool.

Then you are saying the *current* configuration in u-boot is already buggy. Fabio has only moved the setup but the boards use now the same configuration. Can you tell us which problem you have found with the current code ?

Best regards,
Stefano Babic

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: office at denx.de
=====================================================================
reviewer
#9 lore raw

PATCH 1/2 mx6q: Factor out common DDR3 init code

In reply to Liu Hui-R64343

Jason,

Quoted 3 lines · On Tue, Sep 11, 2012 at 11:26 PM, Liu Hui-R64343 <[email protected]> wrote:

Are you sure that we can use on DDR3 script to cover 3 kind of boards:

ARM2/Sabrelite/SabreSD? Did you do the DDR stress test?

Ok, looking more closely at this I will keep the ARM2 DDR3 init as is in my v2 series.

sabrelite and sabresd does have the same DDR3 init as per the FSL U-boot source.

arm2 has a different DDR3 density, so I will not touch this file.

Regards,

Fabio Estevam

#10 lore raw

PATCH 1/2 mx6q: Factor out common DDR3 init code

Am 12/09/2012 20:22, schrieb Fabio Estevam:

Quoted 2 lines

Jason,

Hi Fabio,

Quoted 12 lines · On Tue, Sep 11, 2012 at 11:26 PM, Liu Hui-R64343 <[email protected]> wrote:
Quoted 4 lines

Are you sure that we can use on DDR3 script to cover 3 kind of boards:

ARM2/Sabrelite/SabreSD? Did you do the DDR stress test?

Ok, looking more closely at this I will keep the ARM2 DDR3 init as is in my v2 series.

sabrelite and sabresd does have the same DDR3 init as per the FSL U-boot source.

arm2 has a different DDR3 density, so I will not touch this file.

Ok - before you put your next version, is imx-common the right place fir it ? I mean, in imx-common we should put code that can be shared among different Freescale's SOCs. The imximage you want to share is common to some boards, not SOCs. Should we put it into a freescale's directory, let see something into boards/freescale ? There is already a boards/freescale/common, but it is PowerPC specific, so maybe it is not the right place, but we could add a new one. What do you think ?

Best regards,
Stefano

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: office at denx.de
=====================================================================
reviewer
#11 lore raw

PATCH 1/2 mx6q: Factor out common DDR3 init code

Hi Stefano,

Quoted 7 lines · stefano babic

Ok - before you put your next version, is imx-common the right place fir it ? I mean, in imx-common we should put code that can be shared among different Freescale's SOCs. The imximage you want to share is common to some boards, not SOCs. Should we put it into a freescale's directory, let see something into boards/freescale ? There is already a boards/freescale/common, but it is PowerPC specific, so maybe it is not the right place, but we could add a new one. What do you think ?

Ok, good point. What about boards/freescale/imx/ddr ?

Regards,

Fabio Estevam

#12 lore raw

PATCH 1/2 mx6q: Factor out common DDR3 init code

Am 13/09/2012 06:57, schrieb Fabio Estevam:

Quoted 12 lines

Hi Stefano,

Quoted 7 lines · stefano babic

Ok - before you put your next version, is imx-common the right place fir it ? I mean, in imx-common we should put code that can be shared among different Freescale's SOCs. The imximage you want to share is common to some boards, not SOCs. Should we put it into a freescale's directory, let see something into boards/freescale ? There is already a boards/freescale/common, but it is PowerPC specific, so maybe it is not the right place, but we could add a new one. What do you think ?

Quoted 1 line

Ok, good point. What about boards/freescale/imx/ddr ?

It is fine with me

Regards,
Stefano Babic

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