[U-Boot] [PATCH v3 2/4] c6x: Add support c674x CPUs

Mike Frysinger
2012-07-19T03:59:28Z

On Monday 25 June 2012 14:02:39 Dmitry Bondar wrote:
> --- /dev/null
> +++ b/arch/c6x/cpu/c674x/cache.c
>
> +void flush_cache(unsigned long addr, unsigned long len)
> +{
> +}
> +
> +void flush_dcache_range(unsigned long start, unsigned long stop)
> +{
> +}
> +
> +void invalidate_dcache_range(unsigned long start, unsigned long stop)
> +{
> +}

you /really/ should implement these. i can't see how this would be that hard.

> --- /dev/null
> +++ b/arch/c6x/cpu/c674x/config.mk
>
> +PLATFORM_RELFLAGS += -fno-common -ffixed-B31

this belongs in arch/c6x/config.mk, not this file

> +PLATFORM_CPPFLAGS += -march=c674x -msdata=none -mno-dsbt
> -DCONFIG_TMS320C64XPLUS

most likely the msdata/dsbt settings also belong in arch/c6x/config.mk, not
here

> +PLATFORM_RELFLAGS +=$(call cc-option,-mshort-load-bytes,$(call
> cc-option,-malignment-traps,))

and these too belong in arch/c6x/config.mk

also, it should be:
PLATFORM_ALIGN_FLAGS := $(...)
PLATFORM_RELFLAGS += $(PLATFORM_ALIGN_FLAGS)

> --- /dev/null
> +++ b/arch/c6x/cpu/c674x/start.S
>
> + .global _start
> +_start:
> + ;; Jump to u-boot
> + MVKL .S2 CONFIG_SYS_INIT_SP_ADDR,B15
> + MVKH .S2 CONFIG_SYS_INIT_SP_ADDR,B15
> + MVKL .S1 board_init_f,A0
> + MVKH .S1 board_init_f,A0
> + B .S2X A0
> + MVKL .S2 L1,B3
> + MVKH .S2 L1,B3
> + NOP 3
> +L1: B .S2 B3
> + NOP 5

i know nothing about C6X, but i suspect this is not specific to the c674x cpu,
and should probably be in a common arch/c6x/cpu/start.S location

> --- /dev/null
> +++ b/arch/c6x/cpu/u-boot.lds
>
> +/*OUTPUT_FORMAT("elf32-littlec6x", "elf32-littlec6x", "elf32-littlec6x")*/
> +/*OUTPUT_ARCH(c6x)*/

delete dead code

> +ENTRY(_start)
> +SECTIONS
> +{
> + . = ALIGN(4);
> + .text :
> + {
> + CPUDIR/start.o (.text)

CPUDIR can't be right. did you compile this ?

this file in general looks generic and should probably live at
arch/c6x/cpu/init.lds.S instead
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20120718/4fa11b49/attachment.pgp>