Skip to contentSkip to conversation

board: add support for amcore board

PATCH Superseded Angelo Dureghello 2 participants 3 messages Jan 25, 2013

v5 of 6 Superseded Latest is v6 →

lore
Share & tools
lore
#0 lore raw

PATCH v5 2/2 board: add support for amcore board

Add support for Sysam AMCORE mcf5307 (coldfire) based board.

---
Changes for v2:
- None
Changes for v3:
- Fix code format issues
Changes for v4:
- Add MAINTAINERS file entry
- Remove all unnecessary blank lines
- Add get_ram_size in sdram init
- Reuse already existing sdram test routine
- Remove custom flash.c, used std mtd/CFI driver
Changes for v5:
- Fix MAINTAINERS bad sorted entry
- Fix incorrect indentation
- Remove #undef where not needed
- Fix CONFIG_SYS_SDRAM_SIZE to be in bytes

---
 MAINTAINERS                        |    4 +
 board/sysam/amcore/Makefile        |   43 ++++++
 board/sysam/amcore/amcore.c        |  159 +++++++++++++++++++++
 board/sysam/amcore/config.mk       |   23 +++
 board/sysam/amcore/u-boot.lds      |  101 ++++++++++++++
 boards.cfg                         |    1 +
 include/configs/amcore.h           |  209 +++++++++++++++++++++++++++
 7 files changed, 540 insertions(+), 0 deletions(-)
MAINTAINERS +4 -0
index 28c052d..f3a6d39 100644
@@ -149,6 +149,10 @@ Wolfgang Denk <[email protected]>
 	PCIPPC2		MPC750
 	PCIPPC6		MPC750
 
+Angelo Dureghello <[email protected]>
+
+        amcore          mcf5307
+
 Phil Edworthy <[email protected]>
 
 	rsk7264		SH7264
board/sysam/amcore/Makefile new file +43 -0

43 lines not on this page · raw message

board/sysam/amcore/amcore.c new file +159 -0

159 lines not on this page · raw message

board/sysam/amcore/config.mk new file +23 -0
new file mode 100644
index 0000000..cb45c2c
@@ -0,0 +1,23 @@
+#
+# Copyright (c) 2011 Angelo Dureghello <[email protected]>
+#
+# See file CREDITS for list of people who contributed to this
+# project.
+#
+# 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.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+# MA 02111-1307 USA
+#
+
+CONFIG_SYS_TEXT_BASE = 0xffc00000
board/sysam/amcore/u-boot.lds new file +101 -0

101 lines not on this page · raw message

boards.cfg +1 -0
index e4b0d44..6e9b952 100644
@@ -388,6 +388,7 @@ M5271EVB                     m68k        mcf52x2     m5271evb            freesca
 M5272C3                      m68k        mcf52x2     m5272c3             freescale
 M5275EVB                     m68k        mcf52x2     m5275evb            freescale
 M5282EVB                     m68k        mcf52x2     m5282evb            freescale
+amcore                       m68k        mcf530x     amcore              sysam
 astro_mcf5373l               m68k        mcf532x     mcf5373l            astro
 M53017EVB                    m68k        mcf532x     m53017evb           freescale
 M5329AFEE                    m68k        mcf532x     m5329evb            freescale      -           M5329EVB:NANDFLASH_SIZE=0
include/configs/amcore.h new file +209 -0

209 lines not on this page · raw message

#1 lore raw

PATCH v5 2/2 board: add support for amcore board

Dear Angelo Dureghello,

Quoted 1 line · In message <[email protected]> you wrote:

Add support for Sysam AMCORE mcf5307 (coldfire) based board.

Sorry for the late catch - this escaped me so far...

Quoted 4 lines

Changes for v5:
- Fix MAINTAINERS bad sorted entry
- Fix incorrect indentation
- Remove #undef where not needed

Did you? I still see some...

Quoted 3 lines
board/sysam/amcore/amcore.c new file +3 -0
+#if defined(CONFIG_SYS_DRAM_TEST)
+/* memory test */
+int testdram(void)

...

Quoted 1 line

+#endif

This is:

1) dead code, as you don't define CONFIG_SYS_DRAM_TEST
2) an obsolete approach that you should not use. We have a several different (and much more reliable) memory tests already - if yuou really need one, then please use the existing code. On the other hand, you are using get_ram_size, which already includes a simple memory test - so re you sure you really need an extra test?

Quoted 1 line

+#undef CONFIG_SYS_DRAM_TEST /* default undef */

==> remove.

include/configs/amcore.h line 111

Quoted 2 lines
include/configs/amcore.h new file +2 -0
+/* bypass PLL for test purpose */
+#undef	CONFIG_SYS_PLL_BYPASS

???

Best regards,

Wolfgang Denk

Signature · 4 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
The light at the end of the tunnel is usually a "No Exit" sign.
#2 lore raw

PATCH v5 2/2 board: add support for amcore board

Dear Wolfgang,

thanks for the review,

Quoted 20 lines · Wolfgang Denk

Dear Angelo Dureghello,

Quoted 1 line · In message <[email protected]> you wrote:

Add support for Sysam AMCORE mcf5307 (coldfire) based board.

Sorry for the late catch - this escaped me so far...

Quoted 4 lines

Changes for v5:
- Fix MAINTAINERS bad sorted entry
- Fix incorrect indentation
- Remove #undef where not needed

Did you? I still see some...

Quoted 3 lines
board/sysam/amcore/amcore.c new file +3 -0
+#if defined(CONFIG_SYS_DRAM_TEST)
+/* memory test */
+int testdram(void)

...

Quoted 1 line

+#endif

Quoted 12 lines

This is:

1) dead code, as you don't define CONFIG_SYS_DRAM_TEST
2) an obsolete approach that you should not use. We have a several different (and much more reliable) memory tests already - if yuou really need one, then please use the existing code. On the other hand, you are using get_ram_size, which already includes a simple memory test - so re you sure you really need an extra test?

Quoted 1 line

+#undef CONFIG_SYS_DRAM_TEST /* default undef */

I used the sdram test for some help when soldering here the prototypes. Then i disabled the test. As you already asked me, i removed my own sdram test function and used one already used from other boards, and added this in the amcore.c top coments.

* Copy memory testdram() from sandburst/common/sb_common.c

Anyway, as you said, get_ram_size is enough for me. I will remove CONFIG_SYS_DRAM_TEST and so "int testdram(void)" content.

Quoted 7 lines

==> remove.

include/configs/amcore.h line 111

Quoted 2 lines
include/configs/amcore.h new file +2 -0
+/* bypass PLL for test purpose */
+#undef	CONFIG_SYS_PLL_BYPASS

???

I apologize, forget out, fixed.

If you haven't seen anything else, i'll post next V6 shortly.

Best Regards,
Angelo Dureghello