add ASTRO MCF5373L board
PATCH 1/1 add ASTRO MCF5373L board
This patch adds support for ASTRO board(s) based on MCF5373L.
---
There is another board (series) in the queue to be submitted, thus I added a subdirectory for all our boards.
Makefile | 12 + board/astro/mcf5373l/Makefile | 44 +++ board/astro/mcf5373l/astro.h | 39 +++ board/astro/mcf5373l/config.mk | 28 ++ board/astro/mcf5373l/fpga.c | 424 +++++++++++++++++++++++ board/astro/mcf5373l/mcf5373l.c | 204 +++++++++++ board/astro/mcf5373l/u-boot.lds | 142 ++++++++ board/astro/mcf5373l/update.c | 699 ++++++++++++++++++++++++++++++++++++++ include/configs/astro_mcf5373l.h | 516 ++++++++++++++++++++++++++++ 9 files changed, 2108 insertions(+), 0 deletions(-) create mode 100644 board/astro/mcf5373l/Makefile create mode 100644 board/astro/mcf5373l/astro.h create mode 100644 board/astro/mcf5373l/config.mk create mode 100644 board/astro/mcf5373l/fpga.c create mode 100644 board/astro/mcf5373l/mcf5373l.c create mode 100644 board/astro/mcf5373l/u-boot.lds create mode 100644 board/astro/mcf5373l/update.c create mode 100644 include/configs/astro_mcf5373l.h
Makefile +12 -0
@@ -2263,6 +2263,18 @@ M5485HFE_config : unconfig TASREG_config : unconfig @$(MKCONFIG) $(@:_config=) m68k mcf52x2 tasreg esd +astro_mcf5373l_config \ +astro_mcf5373l_ram_config : unconfig + @if [ "$@" = "astro_mcf5373l_ram_config" ] ; then \ + echo "#define CONFIG_MONITOR_IS_IN_RAM" >> $(obj)include/config.h ; \ + echo "TEXT_BASE = 0x40020000" > $(obj)board/astro/mcf5373l/config.tmp ; \ + $(XECHO) "... for RAM boot ..." ; \ + else \ + echo "TEXT_BASE = 0x00000000" > $(obj)board/astro/mcf5373l/config.tmp ; \ + $(XECHO) "... for FLASH boot ..." ; \ + fi + @$(MKCONFIG) -a astro_mcf5373l m68k mcf532x mcf5373l astro + ######################################################################### ## MPC83xx Systems #########################################################################
board/astro/mcf5373l/Makefile new file +44 -0
44 lines not on this page · raw message
board/astro/mcf5373l/astro.h new file +39 -0
@@ -0,0 +1,39 @@ +#ifndef __ASTRO_H__ +#define __ASTRO_H__ + +int rs_serial_init (int port,int baud); +void astro_put_char (char ch); +int astro_is_char (void ); +int astro_get_char (void ); + +/* data structures used for communication (update.c) */ +typedef struct _s_karten_id { +char Kartentyp; +char Hardwareversion; +char Softwareversion; +char SoftwareSubversion;/* " ","a",.."z" */ +char FPGA_Version_Alt; +char FPGA_Version_Xil; +}s_karten_id ; + +typedef struct { +unsigned char mode; +unsigned char deviation; +unsigned short freq; +} __attribute__ ((packed))s_output_params ; + +typedef struct { +unsigned short SatFreq; +unsigned char SatDatAllg; +unsigned short Symbolrate; +unsigned char Viterbirate; +unsigned char Symbolrate_L; +s_output_params output_params; +unsigned char Reserve; +unsigned char Kartenfehler; +unsigned short dummy_ts_id; +unsigned char dummy_pat_ver; +unsigned char dummy_sdt_ver; +} __attribute__ ((packed))s_datensatz ; + +#endif /* __ASTRO_H__ */
board/astro/mcf5373l/config.mk new file +28 -0
@@ -0,0 +1,28 @@ +# +# (C) Copyright 2000-2003 +# Wolfgang Denk, DENX Software Engineering, wd at denx.de. +# Coldfire contribution by Bernhard Kuhn <[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 +# + +echo "BOARD DIR = $(BOARDDIR)" +sinclude $(OBJTREE)/board/$(BOARDDIR)/config.tmp + +PLATFORM_CPPFLAGS += -DTEXT_BASE=$(TEXT_BASE)
board/astro/mcf5373l/fpga.c new file +424 -0
424 lines not on this page · raw message
board/astro/mcf5373l/mcf5373l.c new file +204 -0
204 lines not on this page · raw message
board/astro/mcf5373l/u-boot.lds new file +142 -0
142 lines not on this page · raw message
board/astro/mcf5373l/update.c new file +699 -0
699 lines not on this page · raw message
include/configs/astro_mcf5373l.h new file +516 -0
516 lines not on this page · raw message
Signature · 1 line
1.5.6.5
Wolfgang Denk
NAKPATCH 1/1 add ASTRO MCF5373L board
Dear Wolfgang Wegner,
Quoted 17 lines · In message <[email protected]> you wrote:
This patch adds support for ASTRO board(s) based on MCF5373L.
Signed-off-by Wolfgang Wegner <[email protected]>---
There is another board (series) in the queue to be submitted, thus I added a subdirectory for all our boards.Makefile | 12 + board/astro/mcf5373l/Makefile | 44 +++ board/astro/mcf5373l/astro.h | 39 +++ board/astro/mcf5373l/config.mk | 28 ++ board/astro/mcf5373l/fpga.c | 424 +++++++++++++++++++++++ board/astro/mcf5373l/mcf5373l.c | 204 +++++++++++ board/astro/mcf5373l/u-boot.lds | 142 ++++++++ board/astro/mcf5373l/update.c | 699 ++++++++++++++++++++++++++++++++++++++ include/configs/astro_mcf5373l.h | 516 ++++++++++++++++++++++++++++ 9 files changed, 2108 insertions(+), 0 deletions(-)
Quoted 8 lines
create mode 100644 board/astro/mcf5373l/Makefile create mode 100644 board/astro/mcf5373l/astro.h create mode 100644 board/astro/mcf5373l/config.mk create mode 100644 board/astro/mcf5373l/fpga.c create mode 100644 board/astro/mcf5373l/mcf5373l.c create mode 100644 board/astro/mcf5373l/u-boot.lds create mode 100644 board/astro/mcf5373l/update.c create mode 100644 include/configs/astro_mcf5373l.h
Entries for MAINTAINERS and MAKEALL missing.
Quoted 9 lines
Makefile +1
-0@@ -2263,6 +2263,18 @@ M5485HFE_config : unconfig TASREG_config : unconfig @$(MKCONFIG) $(@:_config=) m68k mcf52x2 tasreg esd +astro_mcf5373l_config \
Makefile M5485HFE_config : unconfig · line 2276
Quoted 10 lines
Makefile +10
-0+astro_mcf5373l_ram_config : unconfig + @if [ "$@" = "astro_mcf5373l_ram_config" ] ; then \ + echo "#define CONFIG_MONITOR_IS_IN_RAM" >> $(obj)include/config.h ; \ + echo "TEXT_BASE = 0x40020000" > $(obj)board/astro/mcf5373l/config.tmp ; \ + $(XECHO) "... for RAM boot ..." ; \ + else \ + echo "TEXT_BASE = 0x00000000" > $(obj)board/astro/mcf5373l/config.tmp ; \ + $(XECHO) "... for FLASH boot ..." ; \ + fi + @$(MKCONFIG) -a astro_mcf5373l m68k mcf532x mcf5373l astro
Please keep lists sorted, and don't add such scripting to the Makefile. It is not needed any more.
Quoted 5 lines
board/astro/mcf5373l/astro.h new file +0
-0
...
board/astro/mcf5373l/astro.h line 17
Quoted 8 lines
board/astro/mcf5373l/astro.h new file +8
-0+typedef struct _s_karten_id { +char Kartentyp; +char Hardwareversion; +char Softwareversion; +char SoftwareSubversion;/* " ","a",.."z" */ +char FPGA_Version_Alt; +char FPGA_Version_Xil; +}s_karten_id ;
Variable names must be all lower case. Please fix globally.
board/astro/mcf5373l/astro.h line 23
Quoted 5 lines
board/astro/mcf5373l/astro.h new file +5
-0+typedef struct { +unsigned char mode; +unsigned char deviation; +unsigned short freq; +} __attribute__ ((packed))s_output_params ;
And please decide for one language. Don;t use half german and half English names. Note that English is striclty preferred.
Quoted 5 lines
board/astro/mcf5373l/fpga.c new file +0
-0
...
Quoted 10 lines
board/astro/mcf5373l/fpga.c new file +10
-0+/* +* Altera/Xilinx FPGA configuration support for the ASTRO "URMEL" board +*/ + +#include <common.h> +#include <watchdog.h> +#include <altera.h> +#include <ACEX1K.h> +#include <spartan3.h> +#include <command.h>
board/astro/mcf5373l/fpga.c line 51
Quoted 10 lines
board/astro/mcf5373l/fpga.c new file +10
-0+#include <asm/immap_5329.h> +#include "fpga.h" + +DECLARE_GLOBAL_DATA_PTR ; + +int altera_pre_fn (int cookie) +{ +volatile gpio_t *gpiop = (volatile gpio_t *)MMAP_GPIO ; + +/* first, set the required pins to GPIO function */
Incorrect indentation. Please fix globally.
board/astro/mcf5373l/fpga.c
Quoted 2 lines
board/astro/mcf5373l/fpga.c new file +2
-0+/* PAR_T0IN -> GPIO */ + gpiop->par_timer &=0xfc ;
Please use I/O accessors to access device registers. Please fix globally.
board/astro/mcf5373l/fpga.c line 117
Quoted 4 lines
board/astro/mcf5373l/fpga.c new file +4
-0+ +/* writes the complete buffer to the FPGA +writing the complete buffer in one function is much faster, +then calling it for every bit */
Incorrect multiline comment. Please fix globally.
Quoted 4 lines
board/astro/mcf5373l/fpga.c new file +4
-0+/* +* Test the state of the active-low FPGA INIT line. Return 1 on INIT +* asserted (low). +*/
board/astro/mcf5373l/fpga.c line 245
Quoted 10 lines
board/astro/mcf5373l/fpga.c new file +10
-0+int xilinx_init_fn (int cookie) +{ +unsigned char state; +volatile gpio_t *gpiop = (volatile gpio_t *)MMAP_GPIO ; + + state = (gpiop->ppd_pwm &0x08 ) >>3 ; +if (state) +return 0 ; +else +return 1 ;
Simplify:
return ((gpiop->ppd_pwm & 0x08) != 0);
(but use I/O accessor instead.
Quoted 2 lines
board/astro/mcf5373l/mcf5373l.c new file +0
-0
...
board/astro/mcf5373l/mcf5373l.c line 82
Quoted 1 line
board/astro/mcf5373l/mcf5373l.c new file +1
-0+return CONFIG_SYS_SDRAM_SIZE *1024 *1024 ;
Use get_ram_size() ?
board/astro/mcf5373l/mcf5373l.c line 90
Quoted 6 lines
board/astro/mcf5373l/mcf5373l.c new file +6
-0+int testdram (void ) +{ +printf ("DRAM test not implemented!\n" ); + +return (0 ); +}
We already have a number of memory tests. Don't reinvent the wheel.
board/astro/mcf5373l/mcf5373l.c line 152
Quoted 10 lines
board/astro/mcf5373l/mcf5373l.c new file +10
-0+void astro_put_char (char ch) +{ +volatile uart_t *uart; +int i; + + uart = (volatile uart_t *)(MMAP_UART0 ); +/* Wait for last character to go. */ +for (i =0 ; (i <0x10000 ); i++) +if (uart->usr &UART_USR_TXRDY ) +break ;
Braces needed for multiline statement. And you probably want to use a better timeout.
board/astro/mcf5373l/u-boot.lds
Quoted 5 lines
board/astro/mcf5373l/u-boot.lds new file +0
-0
Do you really need a board specific linker script?
Quoted 5 lines
board/astro/mcf5373l/update.c new file +0
-0
...
board/astro/mcf5373l/update.c line 42
Quoted 12 lines
board/astro/mcf5373l/update.c new file +12
-0+#define CMD_INIT 0 +#define CMD_NEW 1 +#define CMD_TX 2 +#define CMD_RX 3 +#define CMD_OK 4 +#define CMD_FAIL 5 +#define CMD_CH_RX 6 +#define CMD_TX_END 7 +#define CMD_RX_END 8 +#define CMD_TX_RDY 9 +#define CMD_RX_RDY 10 +#define CMD_RX_ERROR 11
Looks as if you wanted to use an enum here?
board/astro/mcf5373l/update.c line 88
Quoted 11 lines
board/astro/mcf5373l/update.c new file +11
-0+#define F_Daten_Speichern 0x00/* save parameters on card */ +#define F_Daten_Lesen 0x01/* read parameters */ +#define F_Karteninfo_Lesen 0x10/* read 5 Byte card information */ +#define F_Kartenfehler_Lesen 0x11/* read 4 Byte card error */ +#define F_Transparente_Daten 0x20/* length byte + data */ + +#define SC_Prepare_for_Flash_Data 0xc0 +#define SC_Flash_Data 0xc1 +#define SC_Clear_CRC 0xc2 +#define SC_Check_CRC 0xc3 +#define SC_Restart 0xc4
Macros use all caps names. And decide for _one_ language.
board/astro/mcf5373l/update.c line 129
Quoted 2 lines
board/astro/mcf5373l/update.c new file +2
-0+void do_crc (unsigned char data) +{
Cool. Yet another CRC function :-(
board/astro/mcf5373l/update.c line 148
Quoted 8 lines
board/astro/mcf5373l/update.c new file +8
-0+int dez2hex (int in) +{ +int out; + + out =16 * (in /10 ); + out += (in %10 ); +return out; +}
Get rid of this and use proper conversion routines.
board/astro/mcf5373l/update.c line 181
Quoted 9 lines
board/astro/mcf5373l/update.c new file +9
-0+if (flash_prog_stat ==FL_STAT_IDLE ) { +if (((flash_prog_count &0x1ffff ) ==0 ) && + ((flash_prog_count >>17 ) == flash_sect_count)) { +flash_protect (FLAG_PROTECT_CLEAR , fl_adr, + fl_adr +0x1ffff , flash_info); + s =flash_erase_nb (flash_info, fl_sector); + flash_prog_stat =FL_STAT_ERASE ; + } + else if ((flash_data_count >= (flash_prog_count + 64))
Move 'else' on previous line.
board/astro/mcf5373l/update.c line 191
Quoted 10 lines
board/astro/mcf5373l/update.c new file +10
-0+ || ((int_command & INT_CMD_WRITE_FLASH) + && (flash_data_count > flash_prog_count))) { + s =write_buff_nb (flash_info, + flash_buffer + + (flash_prog_count &0xffff ), + fl_adr,64 ); + flash_prog_stat =FL_STAT_PROG ; + } + } +else if (flash_prog_stat ==FL_STAT_ERASE ) {
Ditto.
board/astro/mcf5373l/update.c line 199
Quoted 8 lines
board/astro/mcf5373l/update.c new file +8
-0+ s =flash_full_status_check_nb (flash_info, fl_sector, +0 ,"erase" ); +if (s !=ERR_BUSY ) { +if (s ==ERR_OK ) { + flash_sect_count++; + flash_prog_stat =FL_STAT_IDLE ; + } +else
And again. Please fix indentation globally.
board/astro/mcf5373l/update.c line 216
Quoted 11 lines
board/astro/mcf5373l/update.c new file +11
-0+if (s !=ERR_BUSY ) { +if (s ==ERR_OK ) { + flash_prog_stat =FL_STAT_IDLE ; +for (i =0 ; i <64 ; i++) +if (flash_buffer + [(flash_prog_count + i) + &0xffff ] != + *((unsigned char *)fl_adr + + i)) + flash_prog_stat = +FL_STAT_ERROR ;
This looks very much unreadable.
Quoting "Documentation/CodingStyle":
Now, some people will claim that having 8-character indentations makes the code move too far to the right, and makes it hard to read on a 80-character terminal screen. The answer to that is that if you need more than 3 levels of indentation, you're screwed anyway, and should fix your program.
board/astro/mcf5373l/update.c line 568
Quoted 3 lines
board/astro/mcf5373l/update.c new file +3
-0+if (env_string !=NULL ) { + i = (int )simple_strtol (env_string,NULL ,10 ); + Karteninformation.Hardwareversion =dez2hex (i);
Why are you doing this? Why not simply
Karteninformation.Hardwareversion = simple_strtol(env_string, NULL, 16);
?
Also mind that the CodingStyle does not allow for spaces between function name and '('. Please fix globally.
...
board/astro/mcf5373l/update.c line 637
Quoted 3 lines
board/astro/mcf5373l/update.c new file +3
-0+/* set high baud rate */ +rs_serial_init (0 ,115200 ); +// Reset the Receive Byte Counter
No C++ comments, please.
board/astro/mcf5373l/update.c line 659
Quoted 4 lines
board/astro/mcf5373l/update.c new file +4
-0+if (select) { +/***************************************************************************/ +/** UART RX Routine **/ +/***************************************************************************/
Indentation wrong, incorrect multiline comment. Please fix globally.
...
board/astro/mcf5373l/update.c line 699
Quoted 4 lines
board/astro/mcf5373l/update.c new file +4
-0+U_BOOT_CMD (update,2 ,1 , do_update, +"update - update function information\n" , +"\n - print information for update\n" +"update N\n - print information for update # N\n" );
Check oif this help message really looks what you think it should look like. For example, the last '\n' is probably wrong.
Quoted 5 lines
include/configs/astro_mcf5373l.h new file +0
-0
...
include/configs/astro_mcf5373l.h line 185
Quoted 7 lines
include/configs/astro_mcf5373l.h new file +7
-0+/* --- +* Enable use of Ethernet +* --- +*/ + +/* ethernet could be useful for debugging */ +/* #define FEC_ENET */
Do not add dead code.
...
include/configs/astro_mcf5373l.h line 213
Quoted 12 lines
include/configs/astro_mcf5373l.h new file +12
-0+/* --- +* set "#if 0" to "#if 1" if (Hardware)-WATCHDOG should be enabled & change +* timeout acc. to your needs +* #define CONFIG_WATCHDOG_TIMEOUT x , x is timeout in milliseconds, e. g. 10000 +* for 10 sec +* --- +*/ + +#ifndef CONFIG_MONITOR_IS_IN_RAM +#define CONFIG_WATCHDOG +#define CONFIG_WATCHDOG_TIMEOUT 3355/* timeout in milliseconds */ +#endif
Which "#if 0" are you referring to in the comment?
include/configs/astro_mcf5373l.h line 270
Quoted 7 lines
include/configs/astro_mcf5373l.h new file +7
-0+#define CONFIG_EXTRA_ENV_SETTINGS \ + "loaderversion=11\0" \ + "card_id="QUOTEME(ASTRO_ID)"\0" \ + "alterafile=0\0" \ + "xilinxfile=0\0" \ + "xilinxload=imxtract 0x540000 $xilinxfile 0x41000000&&fpga load 0 0x41000000 $filesize\0" \ + "alteraload=imxtract 0x6c0000 $alterafile 0x41000000&&fpga load 1 0x41000000 $filesize\0" \
Lines too long, Please fix globally.
include/configs/astro_mcf5373l.h line 291
Quoted 3 lines
include/configs/astro_mcf5373l.h new file +3
-0+#define CONFIG_ETHADDR 00:00:00:00:00:09/* default ethernet MAC addr. */ +#define CONFIG_IPADDR 192.168.100.2/* default board IP address */ +#define CONFIG_SERVERIP 192.168.100.1/* default tftp server IP address */
NAK.
Remove these settings, and never ever use bogus or stolen MAC addresses.
Best regards,
Wolfgang Denk
Signature · 6 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 If it happens once, it's a bug. If it happens twice, it's a feature. If it happens more than twice, it's a design philosophy.
PATCH 1/1 add ASTRO MCF5373L board
Dear Wolfgang Denk,
thank you for all the comments and suggestions and sorry for that many reasons to complain!
I just would like to ask a few questions in-line.
Quoted 9 lines · Wolfgang Denk
Dear Wolfgang Wegner,
Quoted 6 lines · In message <[email protected]> you wrote:
Makefile +0
-0@@ -2263,6 +2263,18 @@ M5485HFE_config : unconfig TASREG_config : unconfig @$(MKCONFIG) $(@:_config=) m68k mcf52x2 tasreg esd
Quoted 14 lines
Makefile M5485HFE_config : unconfig · line 2276
Quoted 11 lines
Makefile +11
-0+astro_mcf5373l_config \ +astro_mcf5373l_ram_config : unconfig + @if [ "$@" = "astro_mcf5373l_ram_config" ] ; then \ + echo "#define CONFIG_MONITOR_IS_IN_RAM" >> $(obj)include/config.h ; \ + echo "TEXT_BASE = 0x40020000" > $(obj)board/astro/mcf5373l/config.tmp ; \ + $(XECHO) "... for RAM boot ..." ; \ + else \ + echo "TEXT_BASE = 0x00000000" > $(obj)board/astro/mcf5373l/config.tmp ; \ + $(XECHO) "... for FLASH boot ..." ; \ + fi + @$(MKCONFIG) -a astro_mcf5373l m68k mcf532x mcf5373l astroPlease keep lists sorted, and don't add such scripting to the
Makefile. It is not needed any more.
How can I avoid this scripting? I took the freescale EVM boards as a reference. Could you please point me to a better example on how to set these variables, especially TEXT_BASE, on a per-target basis?
Quoted 5 lines
Makefile M5485HFE_config : unconfig · line 2278
Quoted 2 lines
Makefile +2
-0+ /* PAR_T0IN -> GPIO */ + gpiop->par_timer &= 0xfc;Please use I/O accessors to access device registers. Please fix globally.
Sorry if this is a stupid question, but so this should read:
tmp_char = readb(&gpiop->par_timer);tmp_char &= 0xfc;writeb(tmp_char, &gpiop->par_timer);
And how about word and long-word registers? As far as I understand from asm-m68k/io.h, the I/O accessors do byte-swap, how does this make sense on a big-endian-only device?
Quoted 1 line
Do you really need a board specific linker script?
Probably not in this case, but unfortunately this is what all current Coldfire boards do, and I am not familiar enough with ld to overlook which consequences changing this might have.
(It may be trivial for MCF53xx, but for other devices like MCF5445x with the possibility for serial boot, there are big differences between the different linker files.)
Quoted 4 lines
Makefile M5485HFE_config : unconfig · line 2280
Quoted 2 lines
Makefile +2
-0+void do_crc (unsigned char data) +{Cool. Yet another CRC function :-(
I have no choice here. The CRC algorithm is dictated, so either I can use an already existing CRC function implementing exactly this scheme (sorry for not having searched for it yet), or I have to implement it here. :-(
Quoted 10 lines
Makefile M5485HFE_config : unconfig
Quoted 8 lines
Makefile +8
-0+ s = flash_full_status_check_nb (flash_info, fl_sector, + 0, "erase"); + if (s != ERR_BUSY) { + if (s == ERR_OK) { + flash_sect_count++; + flash_prog_stat = FL_STAT_IDLE; + } + elseAnd again. Please fix indentation globally.
Sorry to ask, but which part of indentation is wrong here? (Except the else/if you quoted in the other examples)
Regards,
Wolfgang
PATCH 1/1 add ASTRO MCF5373L board
Dear Wolfgang Wegner,
Quoted 7 lines · In message <[email protected]> you wrote:
Quoted 3 lines
Please keep lists sorted, and don't add such scripting to the
Makefile. It is not needed any more.How can I avoid this scripting? I took the freescale EVM boards as a reference. Could you please point me to a better example on how to set these variables, especially
TEXT_BASE, on a per-target basis?
The new "mkconfig" script allows you to generate CONFIG_MK_* variables from the make target names, which you then can use to adjust other settings.
Quoted 11 lines
Quoted 5 lines
Review
Quoted 2 lines
(quoted diff) +2
-0+ /* PAR_T0IN -> GPIO */ + gpiop->par_timer &= 0xfc;Please use I/O accessors to access device registers. Please fix globally.
Sorry if this is a stupid question, but so this should read:
tmp_char=readb(&gpiop->par_timer);tmp_char&=0xfc;writeb(tmp_char, &gpiop->par_timer);
Right.
Quoted 3 lines
And how about word and long-word registers? As far as I understand from
asm-m68k/io.h, the I/O accessors do byte-swap, how does this make sense on a big-endian-only device?
There should be non-swapping accessor functions as well.
Quoted 5 lines
Quoted 1 line
Do you really need a board specific linker script?
Probably not in this case, but unfortunately this is what all current Coldfire boards do, and I am not familiar enough with ld to overlook which consequences changing this might have.
Hm...
Tsi Chung Liew, are you planning for some cleanup to use a single common linker script for all boards without special requirements?
Quoted 3 lines
(It may be trivial for MCF53xx, but for other devices like MCF5445x with the possibility for serial boot, there are big differences between the different linker files.)
There are probably just a few major "types" ?
Quoted 11 lines
Quoted 10 lines
board/astro/mcf5373l/update.c line 199
Quoted 8 lines
board/astro/mcf5373l/update.c new file +8
-0+ s =flash_full_status_check_nb (flash_info, fl_sector, +0 ,"erase" ); +if (s !=ERR_BUSY ) { +if (s ==ERR_OK ) { + flash_sect_count++; + flash_prog_stat =FL_STAT_IDLE ; + } +else And again. Please fix indentation globally.
Quoted 2 lines
Sorry to ask, but which part of indentation is wrong here? (Except the else/if you quoted in the other examples)
the "else" must be on the same line as the "}".
Best regards,
Wolfgang Denk
Signature · 8 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
I see that Microsoft's campaign to destroy all knowledge of any
operating environment but its own environment-of-the-year has
succeeded in creating a generation of users who don't understand the
concept of a shell...
-- L. Peter Deutsch in <[email protected]>PATCH 1/1 add ASTRO MCF5373L board
In reply to Wolfgang DenkDear Wolfgang Denk,
Quoted 2 lines · Wolfgang Denk
Dear Wolfgang Wegner,
[...]
Quoted 8 lines
Quoted 8 lines
Makefile +0
-0@@ -2263,6 +2263,18 @@ M5485HFE_config : unconfig TASREG_config : unconfig @$(MKCONFIG) $(@:_config=) m68k mcf52x2 tasreg esd
Quoted 14 lines
Makefile M5485HFE_config : unconfig · line 2276
Quoted 11 lines
Makefile +11
-0+astro_mcf5373l_config \ +astro_mcf5373l_ram_config : unconfig + @if [ "$@" = "astro_mcf5373l_ram_config" ] ; then \ + echo "#define CONFIG_MONITOR_IS_IN_RAM" >> $(obj)include/config.h ; \ + echo "TEXT_BASE = 0x40020000" > $(obj)board/astro/mcf5373l/config.tmp ; \ + $(XECHO) "... for RAM boot ..." ; \ + else \ + echo "TEXT_BASE = 0x00000000" > $(obj)board/astro/mcf5373l/config.tmp ; \ + $(XECHO) "... for FLASH boot ..." ; \ + fi + @$(MKCONFIG) -a astro_mcf5373l m68k mcf532x mcf5373l astroPlease keep lists sorted, and don't add such scripting to the
Makefile. It is not needed any more.
Another question here:
which sorting scheme should I adhere to? With the exception of the tasreg board, all coldfire boards are sorted according to their processor number (this sorting is in turn alphabetical, not numerical, probably because it better represents the family affiliation), only the tasreg board is at the end of the list according to the alphabetical order of the board names...
Best regards,
Wolfgang
PATCH 1/1 add ASTRO MCF5373L board
Dear Wolfgang Wegner,
Quoted 19 lines · In message <[email protected]> you wrote:
Quoted 4 lines
Quoted 4 lines
TASREG_config: unconfig
@$(MKCONFIG) $(@:_config=) m68k mcf52x2 tasreg esdQuoted 14 lines
Makefile M5485HFE_config : unconfig · line 2276
Quoted 11 lines
Makefile +11
-0+astro_mcf5373l_config \ +astro_mcf5373l_ram_config : unconfig + @if [ "$@" = "astro_mcf5373l_ram_config" ] ; then \ + echo "#define CONFIG_MONITOR_IS_IN_RAM" >> $(obj)include/config.h ; \ + echo "TEXT_BASE = 0x40020000" > $(obj)board/astro/mcf5373l/config.tmp ; \ + $(XECHO) "... for RAM boot ..." ; \ + else \ + echo "TEXT_BASE = 0x00000000" > $(obj)board/astro/mcf5373l/config.tmp ; \ + $(XECHO) "... for FLASH boot ..." ; \ + fi + @$(MKCONFIG) -a astro_mcf5373l m68k mcf532x mcf5373l astroPlease keep lists sorted, and don't add such scripting to the
Makefile. It is not needed any more.
Quoted 7 lines
Another question here:
which sorting scheme should I adhere to? With the exception of the tasreg board, all coldfire boards are sorted according to their processor number (this sorting is in turn alphabetical, not numerical, probably because it better represents the family affiliation), only the tasreg board is at the end of the list according to the alphabetical order of the board names...
Please use the equivalent of "sort -f" on the make target names.
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 "Deliver yesterday, code today, think tomorrow."
PATCH v2 1/1 add ASTRO MCF5373L board
In reply to Wolfgang DenkThis patch adds support for ASTRO board(s) based on MCF5373L.
---
I hope to have addressed all the comments and errors that were present in the first submission; exceptions are the linker script because there was no feedback by Tsi Chung Liew on this issue and the crc routine because the update protocol is fixed and uses this (as far as I can see) non-standard CRC polynomial.
This patch (or the boot script/images) relies on the following previously sent patches:
add include/asm-m68k/unaligned.h
(Message-Id 1260376332-15835-1-git-send-email-w.wegner at astro-kom.de) non-blocking flash write/erase/status check functions (Message-Id 1260374411-11299-1-git-send-email-w.wegner at astro-kom.de) add ability to handle compressed images to imxtract (Message-Id 1260436281-31824-1-git-send-email-w.wegner at astro-kom.de) add block write function to spartan3 slave serial load (Message-Id 1256918102-3760-1-git-send-email-w.wegner at astro-kom.de) allow MCF532x to use CONFIG_MONITOR_IS_IN_RAM
(Message-Id 1256739061-13311-2-git-send-email-w.wegner at astro-kom.de)
MCF532x: make icache_enable use CONFIG_SYS_SDRAM_SIZE (Message-Id 1256739061-13311-1-git-send-email-w.wegner at astro-kom.de)
MAINTAINERS | 4 + MAKEALL | 1 + Makefile | 4 + board/astro/mcf5373l/Makefile | 44 +++ board/astro/mcf5373l/astro.h | 39 +++ board/astro/mcf5373l/config.mk | 27 ++ board/astro/mcf5373l/fpga.c | 431 ++++++++++++++++++++++++++ board/astro/mcf5373l/mcf5373l.c | 209 +++++++++++++ board/astro/mcf5373l/u-boot.lds | 142 +++++++++ board/astro/mcf5373l/update.c | 625 ++++++++++++++++++++++++++++++++++++++ include/configs/astro_mcf5373l.h | 427 ++++++++++++++++++++++++++ 11 files changed, 1953 insertions(+), 0 deletions(-) create mode 100644 board/astro/mcf5373l/Makefile create mode 100644 board/astro/mcf5373l/astro.h create mode 100644 board/astro/mcf5373l/config.mk create mode 100644 board/astro/mcf5373l/fpga.c create mode 100644 board/astro/mcf5373l/mcf5373l.c create mode 100644 board/astro/mcf5373l/u-boot.lds create mode 100644 board/astro/mcf5373l/update.c create mode 100644 include/configs/astro_mcf5373l.h
MAINTAINERS +4 -0
@@ -869,6 +869,10 @@ TsiChung Liew <[email protected]> M5475EVB mcf547x_8x M5485EVB mcf547x_8x +Wolfgang Wegner <[email protected]> + + astro_mcf5373l MCF5373L + ######################################################################### # AVR32 Systems: # # #
MAKEALL +1 -0
@@ -822,6 +822,7 @@ LIST_microblaze=" \ ######################################################################### LIST_coldfire=" \ + astro_mcf5373l \ cobra5272 \ EB+MCF-EV123 \ EB+MCF-EV123_internal \
Makefile +4 -0
@@ -2024,6 +2024,10 @@ ZPC1900_config: unconfig ## Coldfire ######################################################################### +astro_mcf5373l_config \ +astro_mcf5373l_RAM_config : unconfig + @$(MKCONFIG) -t $(@:_config=) astro_mcf5373l m68k mcf532x mcf5373l astro + M5208EVBE_config : unconfig @$(MKCONFIG) $(@:_config=) m68k mcf52x2 m5208evbe freescale
board/astro/mcf5373l/Makefile new file +44 -0
44 lines not on this page · raw message
board/astro/mcf5373l/astro.h new file +39 -0
@@ -0,0 +1,39 @@ +#ifndef __ASTRO_H__ +#define __ASTRO_H__ + +int rs_serial_init (int port,int baud); +void astro_put_char (char ch); +int astro_is_char (void ); +int astro_get_char (void ); + +/* data structures used for communication (update.c) */ +typedef struct card_id { +char card_type; +char hardware_version; +char software_version; +char software_subversion;/* " ","a".."z" */ +char fpga_version_altera; +char fpga_version_xilinx; +}card_id_t ; + +typedef struct { +unsigned char mode; +unsigned char deviation; +unsigned short freq; +} __attribute__ ((packed))output_params_t ; + +typedef struct { +unsigned short satfreq; +unsigned char satdatallg; +unsigned short symbolrate; +unsigned char viterbirate; +unsigned char symbolrate_l; +output_params_t output_params; +unsigned char reserve; +unsigned char card_error; +unsigned short dummy_ts_id; +unsigned char dummy_pat_ver; +unsigned char dummy_sdt_ver; +} __attribute__ ((packed))parameters_t ; + +#endif /* __ASTRO_H__ */
board/astro/mcf5373l/config.mk new file +27 -0
@@ -0,0 +1,27 @@ +# +# (C) Copyright 2000-2003 +# Wolfgang Denk, DENX Software Engineering, wd at denx.de. +# Coldfire contribution by Bernhard Kuhn <[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 +# + +TEXT_BASE = $(CONFIG_TEXT_BASE) + +PLATFORM_CPPFLAGS += -DTEXT_BASE=$(TEXT_BASE)
board/astro/mcf5373l/fpga.c new file +431 -0
431 lines not on this page · raw message
board/astro/mcf5373l/mcf5373l.c new file +209 -0
209 lines not on this page · raw message
board/astro/mcf5373l/u-boot.lds new file +142 -0
142 lines not on this page · raw message
board/astro/mcf5373l/update.c new file +625 -0
625 lines not on this page · raw message
include/configs/astro_mcf5373l.h new file +427 -0
427 lines not on this page · raw message
Signature · 1 line
1.5.6.5
PATCH v3 1/1 add ASTRO MCF5373L board
This patch adds support for ASTRO board(s) based on MCF5373L.
---v2->v3: fixed another load of coding style issues after finding out about checkpatch.pl...
I hope to have addressed all the comments and errors that were present in the first submission; exceptions are the linker script because there was no feedback by Tsi Chung Liew on this issue, the crc routine because the update protocol is fixed and uses this (as far as I can see) non-standard CRC polynomial, and a single 81 character line in the configuration file because I see no sensible way to break it. This patch (or the boot script/images) relies on the following previously sent patches:
add include/asm-m68k/unaligned.h
(Message-Id 1260376332-15835-1-git-send-email-w.wegner at astro-kom.de) non-blocking flash write/erase/status check functions (Message-Id 1260374411-11299-1-git-send-email-w.wegner at astro-kom.de) add ability to handle compressed images to imxtract (Message-Id 1260436281-31824-1-git-send-email-w.wegner at astro-kom.de) add block write function to spartan3 slave serial load (Message-Id 1256918102-3760-1-git-send-email-w.wegner at astro-kom.de) allow MCF532x to use CONFIG_MONITOR_IS_IN_RAM
(Message-Id 1256739061-13311-2-git-send-email-w.wegner at astro-kom.de)
MCF532x: make icache_enable use CONFIG_SYS_SDRAM_SIZE (Message-Id 1256739061-13311-1-git-send-email-w.wegner at astro-kom.de)
MAINTAINERS | 4 + MAKEALL | 1 + Makefile | 4 + board/astro/mcf5373l/Makefile | 44 +++ board/astro/mcf5373l/astro.h | 44 +++ board/astro/mcf5373l/config.mk | 27 ++ board/astro/mcf5373l/fpga.c | 431 ++++++++++++++++++++++++++ board/astro/mcf5373l/mcf5373l.c | 206 +++++++++++++ board/astro/mcf5373l/u-boot.lds | 142 +++++++++ board/astro/mcf5373l/update.c | 625 ++++++++++++++++++++++++++++++++++++++ include/configs/astro_mcf5373l.h | 427 ++++++++++++++++++++++++++ 11 files changed, 1955 insertions(+), 0 deletions(-) create mode 100644 board/astro/mcf5373l/Makefile create mode 100644 board/astro/mcf5373l/astro.h create mode 100644 board/astro/mcf5373l/config.mk create mode 100644 board/astro/mcf5373l/fpga.c create mode 100644 board/astro/mcf5373l/mcf5373l.c create mode 100644 board/astro/mcf5373l/u-boot.lds create mode 100644 board/astro/mcf5373l/update.c create mode 100644 include/configs/astro_mcf5373l.h
MAINTAINERS +4 -0
@@ -869,6 +869,10 @@ TsiChung Liew <[email protected]> M5475EVB mcf547x_8x M5485EVB mcf547x_8x +Wolfgang Wegner <[email protected]> + + astro_mcf5373l MCF5373L + ######################################################################### # AVR32 Systems: # # #
MAKEALL +1 -0
@@ -822,6 +822,7 @@ LIST_microblaze=" \ ######################################################################### LIST_coldfire=" \ + astro_mcf5373l \ cobra5272 \ EB+MCF-EV123 \ EB+MCF-EV123_internal \
Makefile +4 -0
@@ -2024,6 +2024,10 @@ ZPC1900_config: unconfig ## Coldfire ######################################################################### +astro_mcf5373l_config \ +astro_mcf5373l_RAM_config : unconfig + @$(MKCONFIG) -t $(@:_config=) astro_mcf5373l m68k mcf532x mcf5373l astro + M5208EVBE_config : unconfig @$(MKCONFIG) $(@:_config=) m68k mcf52x2 m5208evbe freescale
board/astro/mcf5373l/Makefile new file +44 -0
44 lines not on this page · raw message
board/astro/mcf5373l/astro.h new file +44 -0
44 lines not on this page · raw message
board/astro/mcf5373l/config.mk new file +27 -0
@@ -0,0 +1,27 @@ +# +# (C) Copyright 2000-2003 +# Wolfgang Denk, DENX Software Engineering, wd at denx.de. +# Coldfire contribution by Bernhard Kuhn <[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 +# + +TEXT_BASE = $(CONFIG_TEXT_BASE) + +PLATFORM_CPPFLAGS += -DTEXT_BASE=$(TEXT_BASE)
board/astro/mcf5373l/fpga.c new file +431 -0
431 lines not on this page · raw message
board/astro/mcf5373l/mcf5373l.c new file +206 -0
206 lines not on this page · raw message
board/astro/mcf5373l/u-boot.lds new file +142 -0
142 lines not on this page · raw message
board/astro/mcf5373l/update.c new file +625 -0
625 lines not on this page · raw message
include/configs/astro_mcf5373l.h new file +427 -0
427 lines not on this page · raw message
Signature · 1 line
1.5.6.5
PATCH v3 1/1 add ASTRO MCF5373L board
Dear Wolfgang Wegner,
Quoted 3 lines · In message <[email protected]> you wrote:
This patch adds support for ASTRO board(s) based on MCF5373L.
Signed-off-by Wolfgang Wegner <[email protected]>
...
board/astro/mcf5373l/mcf5373l.c line 56
Quoted 6 lines
board/astro/mcf5373l/mcf5373l.c new file +6
-0+/* GPIO configuration for bus should be set correctly from reset, +* so we do not care! First, set up address space: at this point, +* we should be running from internal SRAM; +* so use CONFIG_SYS_SDRAM_BASE as the base address for SDRAM, +* and do not care where it is +*/
Incorrect multiline comment style.
board/astro/mcf5373l/mcf5373l.c line 64
Quoted 4 lines
board/astro/mcf5373l/mcf5373l.c new file +4
-0+/* I am not sure from the data sheet, but it seems burst length +* has to be 8 for the 16 bit data bus we use; +* so these values are for BL = 8 +*/
This happens in a number or places, please fix globally.
Quoted 3 lines
+/*-----------------------------------------------------------------------
+ * UART update subcommand codes
+ */
These, too, please.
board/astro/mcf5373l/update.c line 543
Quoted 5 lines
board/astro/mcf5373l/update.c new file +5
-0+/***************************************** +** Flash program routine ** +** only called in flash mode ** +***************************************** +*/
And these as well.
include/configs/astro_mcf5373l.h line 295
Quoted 10 lines
include/configs/astro_mcf5373l.h new file +10
-0+/* +*----------------------------------------------------------------------------- +* End of user parameters to be customized +*----------------------------------------------------------------------------- +*/ + +/* --- +* Defines memory range for test +* --- +*/
...and these.
Amazing haw many different comment styles you are using in a single patch. Guess you can apply for a record ;-)
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 1000 pains = 1 Megahertz
PATCH v4 1/1 add ASTRO MCF5373L board
This patch adds support for ASTRO board(s) based on MCF5373L.
---v3->v4: fixed multi-line commentsv2->v3: fixed another load of coding style issues after finding out about checkpatch.pl...
I hope to have addressed all the comments and errors that were present in the first submission; exceptions are the linker script because there was no feedback by Tsi Chung Liew on this issue, the crc routine because the update protocol is fixed and uses this (as far as I can see) non-standard CRC polynomial, and a single 81 character line in the configuration file because I see no sensible way to break it. This patch (or the boot script/images) relies on the following previously sent patches:
add include/asm-m68k/unaligned.h
(Message-Id 1260376332-15835-1-git-send-email-w.wegner at astro-kom.de) non-blocking flash write/erase/status check functions (Message-Id 1260374411-11299-1-git-send-email-w.wegner at astro-kom.de) add ability to handle compressed images to imxtract (Message-Id 1260436281-31824-1-git-send-email-w.wegner at astro-kom.de) add block write function to spartan3 slave serial load (Message-Id 1256918102-3760-1-git-send-email-w.wegner at astro-kom.de) allow MCF532x to use CONFIG_MONITOR_IS_IN_RAM
(Message-Id 1256739061-13311-2-git-send-email-w.wegner at astro-kom.de)
MCF532x: make icache_enable use CONFIG_SYS_SDRAM_SIZE (Message-Id 1256739061-13311-1-git-send-email-w.wegner at astro-kom.de)
MAINTAINERS | 4 + MAKEALL | 1 + Makefile | 4 + board/astro/mcf5373l/Makefile | 44 +++ board/astro/mcf5373l/astro.h | 44 +++ board/astro/mcf5373l/config.mk | 27 ++ board/astro/mcf5373l/fpga.c | 425 ++++++++++++++++++++++++++ board/astro/mcf5373l/mcf5373l.c | 211 +++++++++++++ board/astro/mcf5373l/u-boot.lds | 142 +++++++++ board/astro/mcf5373l/update.c | 615 ++++++++++++++++++++++++++++++++++++++ include/configs/astro_mcf5373l.h | 384 ++++++++++++++++++++++++ 11 files changed, 1901 insertions(+), 0 deletions(-) create mode 100644 board/astro/mcf5373l/Makefile create mode 100644 board/astro/mcf5373l/astro.h create mode 100644 board/astro/mcf5373l/config.mk create mode 100644 board/astro/mcf5373l/fpga.c create mode 100644 board/astro/mcf5373l/mcf5373l.c create mode 100644 board/astro/mcf5373l/u-boot.lds create mode 100644 board/astro/mcf5373l/update.c create mode 100644 include/configs/astro_mcf5373l.h
MAINTAINERS +4 -0
@@ -869,6 +869,10 @@ TsiChung Liew <[email protected]> M5475EVB mcf547x_8x M5485EVB mcf547x_8x +Wolfgang Wegner <[email protected]> + + astro_mcf5373l MCF5373L + ######################################################################### # AVR32 Systems: # # #
MAKEALL +1 -0
@@ -822,6 +822,7 @@ LIST_microblaze=" \ ######################################################################### LIST_coldfire=" \ + astro_mcf5373l \ cobra5272 \ EB+MCF-EV123 \ EB+MCF-EV123_internal \
Makefile +4 -0
@@ -2024,6 +2024,10 @@ ZPC1900_config: unconfig ## Coldfire ######################################################################### +astro_mcf5373l_config \ +astro_mcf5373l_RAM_config : unconfig + @$(MKCONFIG) -t $(@:_config=) astro_mcf5373l m68k mcf532x mcf5373l astro + M5208EVBE_config : unconfig @$(MKCONFIG) $(@:_config=) m68k mcf52x2 m5208evbe freescale
board/astro/mcf5373l/Makefile new file +44 -0
44 lines not on this page · raw message
board/astro/mcf5373l/astro.h new file +44 -0
44 lines not on this page · raw message
board/astro/mcf5373l/config.mk new file +27 -0
@@ -0,0 +1,27 @@ +# +# (C) Copyright 2000-2003 +# Wolfgang Denk, DENX Software Engineering, wd at denx.de. +# Coldfire contribution by Bernhard Kuhn <[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 +# + +TEXT_BASE = $(CONFIG_TEXT_BASE) + +PLATFORM_CPPFLAGS += -DTEXT_BASE=$(TEXT_BASE)
board/astro/mcf5373l/fpga.c new file +425 -0
425 lines not on this page · raw message
board/astro/mcf5373l/mcf5373l.c new file +211 -0
211 lines not on this page · raw message
board/astro/mcf5373l/u-boot.lds new file +142 -0
142 lines not on this page · raw message
board/astro/mcf5373l/update.c new file +615 -0
615 lines not on this page · raw message
include/configs/astro_mcf5373l.h new file +384 -0
384 lines not on this page · raw message
Signature · 1 line
1.5.6.5
PATCH v5 1/1 add ASTRO MCF5373L board
This patch adds support for ASTRO board(s) based on MCF5373L.
---v4->v5: removed update.c and reference to non-blocking CFI to get at least the board includedv3->v4: fixed multi-line commentsv2->v3: fixed another load of coding style issues after finding out about checkpatch.pl...
I hope to have addressed all the comments and errors that were present in the first submission; exceptions are the linker script because there was no feedback by Tsi Chung Liew on this issue, the crc routine because the update protocol is fixed and uses this (as far as I can see) non-standard CRC polynomial, and a single 81 character line in the configuration file because I see no sensible way to break it. This patch (or the boot script/images) relies on the following previously sent patches:
add include/asm-m68k/unaligned.h
(Message-Id 1260376332-15835-1-git-send-email-w.wegner at astro-kom.de) add ability to handle compressed images to imxtract (Message-Id 1260436281-31824-1-git-send-email-w.wegner at astro-kom.de) add block write function to spartan3 slave serial load (Message-Id 1256918102-3760-1-git-send-email-w.wegner at astro-kom.de) allow MCF532x to use CONFIG_MONITOR_IS_IN_RAM
(Message-Id 1256739061-13311-2-git-send-email-w.wegner at astro-kom.de)
MCF532x: make icache_enable use CONFIG_SYS_SDRAM_SIZE (Message-Id 1256739061-13311-1-git-send-email-w.wegner at astro-kom.de)
MAINTAINERS | 4 + MAKEALL | 1 + Makefile | 4 + board/astro/mcf5373l/Makefile | 44 ++++ board/astro/mcf5373l/astro.h | 44 ++++ board/astro/mcf5373l/config.mk | 27 +++ board/astro/mcf5373l/fpga.c | 425 ++++++++++++++++++++++++++++++++++++++ board/astro/mcf5373l/mcf5373l.c | 211 +++++++++++++++++++ board/astro/mcf5373l/u-boot.lds | 142 +++++++++++++ include/configs/astro_mcf5373l.h | 389 ++++++++++++++++++++++++++++++++++ 10 files changed, 1291 insertions(+), 0 deletions(-) create mode 100644 board/astro/mcf5373l/Makefile create mode 100644 board/astro/mcf5373l/astro.h create mode 100644 board/astro/mcf5373l/config.mk create mode 100644 board/astro/mcf5373l/fpga.c create mode 100644 board/astro/mcf5373l/mcf5373l.c create mode 100644 board/astro/mcf5373l/u-boot.lds create mode 100644 include/configs/astro_mcf5373l.h
MAINTAINERS +4 -0
@@ -869,6 +869,10 @@ TsiChung Liew <[email protected]> M5475EVB mcf547x_8x M5485EVB mcf547x_8x +Wolfgang Wegner <[email protected]> + + astro_mcf5373l MCF5373L + ######################################################################### # AVR32 Systems: # # #
MAKEALL +1 -0
@@ -822,6 +822,7 @@ LIST_microblaze=" \ ######################################################################### LIST_coldfire=" \ + astro_mcf5373l \ cobra5272 \ EB+MCF-EV123 \ EB+MCF-EV123_internal \
Makefile +4 -0
@@ -2024,6 +2024,10 @@ ZPC1900_config: unconfig ## Coldfire ######################################################################### +astro_mcf5373l_config \ +astro_mcf5373l_RAM_config : unconfig + @$(MKCONFIG) -t $(@:_config=) astro_mcf5373l m68k mcf532x mcf5373l astro + M5208EVBE_config : unconfig @$(MKCONFIG) $(@:_config=) m68k mcf52x2 m5208evbe freescale
board/astro/mcf5373l/Makefile new file +44 -0
44 lines not on this page · raw message
board/astro/mcf5373l/astro.h new file +44 -0
44 lines not on this page · raw message
board/astro/mcf5373l/config.mk new file +27 -0
@@ -0,0 +1,27 @@ +# +# (C) Copyright 2000-2003 +# Wolfgang Denk, DENX Software Engineering, wd at denx.de. +# Coldfire contribution by Bernhard Kuhn <[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 +# + +TEXT_BASE = $(CONFIG_TEXT_BASE) + +PLATFORM_CPPFLAGS += -DTEXT_BASE=$(TEXT_BASE)
board/astro/mcf5373l/fpga.c new file +425 -0
425 lines not on this page · raw message
board/astro/mcf5373l/mcf5373l.c new file +211 -0
211 lines not on this page · raw message
board/astro/mcf5373l/u-boot.lds new file +142 -0
142 lines not on this page · raw message
include/configs/astro_mcf5373l.h new file +389 -0
389 lines not on this page · raw message
Signature · 1 line
1.5.6.5
PATCH 1/1 add update to ASTRO MCF5373L board
In reply to Wolfgang Wegner---
This patch adds the external "update" command to ASTRO MCF5373L boards. It needs this previous patch that is not included in mainline:
non-blocking flash write/erase/status check functions (Message-Id 1260374411-11299-1-git-send-email-w.wegner at astro-kom.de)
board/astro/mcf5373l/Makefile | 2 +- board/astro/mcf5373l/update.c | 615 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 616 insertions(+), 1 deletions(-) create mode 100644 board/astro/mcf5373l/update.c
board/astro/mcf5373l/Makefile +1 -1
@@ -25,7 +25,7 @@ include $(TOPDIR)/config.mk LIB = $(obj)lib$(BOARD).a -COBJS = $(BOARD).o fpga.o +COBJS = $(BOARD).o fpga.o update.o SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) OBJS := $(addprefix $(obj),$(COBJS))
board/astro/mcf5373l/update.c new file +615 -0
615 lines not on this page · raw message
Signature · 1 line
1.5.6.5
PATCH v3 1/1 add ASTRO MCF5373L board
In reply to Wolfgang DenkDear Wolfgang Denk,
Quoted 1 line · Wolfgang Denk
Dear Wolfgang Wegner,
[...]
Quoted 1 line
Incorrect multiline comment style.
fixed and re-submitted.
I guess the worst thing about all these is that all of these comment styles are already present in U-Boot, which is why I copy-and-pasted them in my files (except update.c, obviously). (So probably not even my record application would be successful. :-( )
Just out of curiosity (and maybe for future submissions): do you have a script or grep command to check for these incorrect multiline comments? I did not come up with a simple solution so double-checked it manually now before re-submitting, but would be more at ease to have a tool for checking.
Best regards,
Wolfgang