[U-Boot] [PATCH v3 4/4] c6x: Add support c6745-som board

Tom Rini
2012-06-25T22:42:40Z

On Mon, Jun 25, 2012 at 10:02:41PM +0400, Dmitry Bondar wrote:

> Add support board c6745-som (http://inmys.ru/?_=/products/som_c6745) with C6745 cpu.
>
> Signed-off-by: Dmitry Bondar <bond@inmys.ru>
> Cc: Tom Rini <trini@ti.com>
[snip]
> diff --git a/MAINTAINERS b/MAINTAINERS
> index e55893b..710f3df 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -62,6 +62,9 @@ Jerry Van Baren <gerald.vanbaren@smiths-aerospace.com>
>
> sacsng MPC8260
>
> +Dmitry Bondar <bond@inmys.ru>
> + c6745-som c674x
> +
> Oliver Brown <obrown@adventnetworks.com>
>
> gw8260 MPC8260

Note that the file is sorted by architecture, so you get to add in a new
C6000 section.

> diff --git a/board/inmys/c6745-som/Makefile b/board/inmys/c6745-som/Makefile
> new file mode 100644
> index 0000000..9a91ed2
> --- /dev/null
> +++ b/board/inmys/c6745-som/Makefile
> @@ -0,0 +1,27 @@
> +# (C) Copyright 2012 Dmitry Bondar <bond@inmys.ru>
> +#
> +# This file is released under the terms of GPL v2 and any later version.
> +# See the file COPYING in the root directory of the source tree for details.
> +
> +include $(TOPDIR)/config.mk
> +
> +LIB = $(obj)lib$(BOARD).o
> +
> +COBJS-$(CONFIG_MACH_INMYS_C6745_SOM) += c6745-som.o
> +
> +COBJS := $(COBJS-y)

We should only be here on this board, yes? So just:
COBJS-y<tab>:= c6745-som.o

> +SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
> +OBJS := $(addprefix $(obj),$(COBJS))
> +SOBJS := $(addprefix $(obj),$(SOBJS))

This seems a little complicated, and should just be:
COBJS<tab>:= $(sort $(COBJS-y))
SRCS<tab>:= $(COBJS:.o=.c)
OBJS<tab>:= $(addprefix $(obj),$(COBJS))

[snip]
> + * Parts are shamelessly stolen from various TI sources, original copyright
> + * follows:
> + * -----------------------------------------------------------------
> + *
> + * Copyright (C) 2004 Texas Instruments.
> + *
> + * ----------------------------------------------------------------------------

Please drop both of the extra-long '-..-' lines.

> +#if 1
> + /* configure pinmux settings */
> + if (davinci_configure_pin_mux_items(pinmuxes, ARRAY_SIZE(pinmuxes)))
> + return 1;
> +#endif

I'm fond of '#if 1' when debugging code myself but please remove when
posting, thanks!

[snip]
> +++ b/include/configs/c6745-som-inmys.h
> @@ -0,0 +1,294 @@
> +#ifndef __CONFIG_H
> +#define __CONFIG_H
> +
> +/* Based on da830evm.h
> +*/
> +#define TMPVAL 0

Unused.

> +#if 0
> +#define CONFIG_USE_SPIFLASH
> +#endif

Please just add a comment saying SPI flash support is still missing
instead of this

> +#define CONFIG_C6X /* */

Just '#define CONFIG_C6X'.

[snip]
> +#define CONFIG_SYS_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200 }

There's a default now, don't need this line.

> +#if 1

See above :) (And there's a few of these).

> +#define CONFIG_SYS_PROMPT_HUSH_PS2 "> "

Also not needed now.

--
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/20120625/3cbb00cc/attachment.pgp>