[U-Boot] [PATCH v2] Add initial support for Matrix Vision mvSMR board based on MPC5200B.

Wolfgang Denk wd at denx.de
Tue Mar 30 23:45:38 CEST 2010


Dear Andre Schwarz,

In message <1269547381-16390-1-git-send-email-andre.schwarz at matrix-vision.de> you wrote:
> Add initial support for Matrix Vision mvSMR board based on MPC5200B.
> 
> Signed-off-by: Andre Schwarz <andre.schwarz at matrix-vision.de>
...
> diff --git a/board/matrix_vision/mvsmr/autoscript b/board/matrix_vision/mvsmr/autoscript
> new file mode 100644
> index 0000000..abc082b
> --- /dev/null
> +++ b/board/matrix_vision/mvsmr/autoscript

The "autoscr" command has long been deprecated, so it makes little
sense to call a file "autoscript".

> +setenv boot24 bootm \${kernel_boot} \${mv_initrd_addr_ram}
> +setenv ramkernel setenv kernel_boot \${loadaddr}
> +setenv flashkernel setenv kernel_boot \${mv_kernel_addr}
> +setenv cpird cp \${mv_initrd_addr} \${mv_initrd_addr_ram} \${mv_initrd_length}

You could write this like this:

setenv cpird 'cp ${mv_initrd_addr} ${mv_initrd_addr_ram} ${mv_initrd_length}'

which looks much cleaner to me.


> +int mvsmr_get_mac(void)
> +{
...
> +	i2c_read(0x50, 0, 1, (unsigned char *)data, 6);
> +
> +	sprintf(mac, "%02x:%02x:%02x:%02x:%02x:%02x",
> +		data[0], data[1], data[2], data[3], data[4], data[5]);
> +	setenv("ethaddr", mac);

Please use eth_setenv_enetaddr() instead.


> +/*
> + * Supported commands
> + */
> +#include <config_cmd_default.h>
> +
> +#define CONFIG_CMD_CACHE
> +#define CONFIG_CMD_NET
> +#define CONFIG_CMD_MII
> +#define CONFIG_CMD_PING
> +#define CONFIG_CMD_DHCP
> +#define CONFIG_CMD_SDRAM
> +#define CONFIG_CMD_PCI
> +#define CONFIG_CMD_FPGA
> +#define CONFIG_CMD_I2C

You might want to keep the list sorted.

> +#undef CONFIG_WATCHDOG

Don't undefine what is not defined anyway.


Best regards,

Wolfgang Denk

-- 
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
There's no sense in being precise  when  you  don't  even  know  what
you're talking about.                             -- John von Neumann


More information about the U-Boot mailing list