[U-Boot] [PATCH] arm: pxa: Add support for ICP DAS LP-8x4x

Tom Rini trini at ti.com
Thu Mar 28 20:43:02 CET 2013


On Mon, Feb 18, 2013 at 09:30:38PM +0400, Sergey Yanovich wrote:

> LP-8x4x is a programmable automation controller by ICP DAS. It is
> shipped with outdated U-Boot v1.3.0
> 
> This patch adds enough supports to boot the board:
>  - 128M of 128M SDRAM
>  - 32M of 48M NOR Flash memory
>  - 1 of 4 Serial console (PXA FFUART)
>  - 1 of 2 Ethernet controller (DM9000)
> 
> Signed-off-by: Sergey Yanovich <ynvich at gmail.com>

Some general comments follow:

> ---
>  arch/arm/include/asm/mach-types.h |   13 ++

Don't modify this file, instead add the MACH_TYPE define to the config
file and set CONFIG_MACH_TYPE if needed really.

> +int dram_init(void)
> +{
> +	pxa2xx_dram_init();
> +	gd->ram_size = PHYS_SDRAM_1_SIZE;

Use get_ram_size(...) here please.

> +#ifdef	CONFIG_CMD_USB

Spaces not tab.  And this is probably indicitive of other style
problems, please run the patch over ./tools/checkpatch.pl before
re-posting.

> +/*
> + * High Level Board Configuration Options
> + */
> +#define	CONFIG_CPU_PXA27X		1	/* Marvell PXA270 CPU */
> +#define	CONFIG_MACH_LP8X4X		1	/* ICP DAS LP-8x4x */
> +#define	CONFIG_SYS_TEXT_BASE		0x00000000

In addition to tabs vs spaces, please just use '#define CONFIG_FOO' when
you don't need to know what the value is, just set/unset.

> +
> +/*
> + * Environment settings
> + */
> +#define	CONFIG_ENV_OVERWRITE
> +#define CONFIG_SYS_CONSOLE_IS_IN_ENV
> +#define CONFIG_EXTRA_ENV_SETTINGS	\
> +	"ethaddr=00:c0:26:28:96:30\0" \

No hardcoding ethaddr.

> +	"ipaddr=192.168.0.10\0" \
> +	"netmask=255.255.255.0\0" \
> +	"serverip=192.168.0.1\0" \

Also, don't do this please.

> +	"stdin=serial\0" \
> +	"stdout=serial\0" \
> +	"stderr=serial\0"

And these shouldn't be needed.

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20130328/82f52bcc/attachment.pgp>


More information about the U-Boot mailing list