[U-Boot] [PATCH 5/6 v2] Enable bootstrap support for MIPS architecture.
Wolfgang Denk
wd at denx.de
Sat Dec 4 23:56:21 CET 2010
Dear Luigi 'Comio' Mantellini,
In message <1291469358-25023-6-git-send-email-luigi.mantellini at idf-hit.com> you wrote:
>
> Signed-off-by: Luigi 'Comio' Mantellini <luigi.mantellini at idf-hit.com>
> ---
> arch/mips/config.mk | 2 +-
> arch/mips/cpu/Makefile | 28 ++-
> arch/mips/cpu/cpu.c | 12 -
> arch/mips/cpu/reset.c | 39 ++++
> arch/mips/cpu/reset_bootstrap.c | 39 ++++
> arch/mips/cpu/start_bootstrap.S | 455 +++++++++++++++++++++++++++++++++++++++
> arch/mips/lib/Makefile | 15 ++-
> arch/mips/lib/board_bootstrap.c | 331 ++++++++++++++++++++++++++++
> 8 files changed, 903 insertions(+), 18 deletions(-)
> create mode 100644 arch/mips/cpu/reset.c
> create mode 100644 arch/mips/cpu/reset_bootstrap.c
> create mode 100644 arch/mips/cpu/start_bootstrap.S
> create mode 100644 arch/mips/lib/board_bootstrap.c
>
> diff --git a/arch/mips/config.mk b/arch/mips/config.mk
> index aa06761..4655169 100644
> --- a/arch/mips/config.mk
> +++ b/arch/mips/config.mk
> @@ -47,6 +47,6 @@ PLATFORM_CPPFLAGS += -DCONFIG_MIPS -D__MIPS__
> # On the other hand, we want PIC in the U-Boot code to relocate it from ROM
> # to RAM. $28 is always used as gp.
> #
> -PLATFORM_CPPFLAGS += -G 0 -mabicalls -fpic
> +PLATFORM_CPPFLAGS += -G 0 -mabicalls -fpic -g
> PLATFORM_CPPFLAGS += -msoft-float
> PLATFORM_LDFLAGS += -G 0 -static -n -nostdlib
Please don't enable globally!
> diff --git a/arch/mips/cpu/Makefile b/arch/mips/cpu/Makefile
> index 06df8d1..6a9a2af 100644
> --- a/arch/mips/cpu/Makefile
> +++ b/arch/mips/cpu/Makefile
> @@ -24,25 +24,45 @@
> include $(TOPDIR)/config.mk
>
> LIB = $(obj)lib$(CPU).o
> +BOOTSTRAP_LIB = $(obj)lib$(CPU)_bootstrap.o
> +
> +BOOTSTRAP_LIB-$(CONFIG_BOOTSTRAP) = $(BOOTSTRAP_LIB)
>
> START = start.o
> SOBJS-y = cache.o
> -COBJS-y = cpu.o interrupts.o
> +COBJS-y = cpu.o reset.o interrupts.o
>
> SOBJS-$(CONFIG_INCA_IP) += incaip_wdt.o
> COBJS-$(CONFIG_INCA_IP) += asc_serial.o incaip_clock.o
> +COBJS-$(CONFIG_IFX_ASC) += ifx_asc.o
> COBJS-$(CONFIG_PURPLE) += asc_serial.o
> COBJS-$(CONFIG_SOC_AU1X00) += au1x00_eth.o au1x00_serial.o au1x00_usb_ohci.o
Please keep vertical alignment.
> +SRCS := $(sort $(START:.o=.S) $(SOBJS-y:.o=.S) $(COBJS-y:.o=.c) $(BOOTSTRAP_START-y:.o=.S) $(BOOTSTRAP_SOBJS-y:.o=.S) $(BOOTSTRAP_COBJS-y:.o=.c))
Line too long. Please fix globally.
> --- a/arch/mips/cpu/cpu.c
> +++ b/arch/mips/cpu/cpu.c
> @@ -38,18 +38,6 @@
> : \
> : "i" (op), "R" (*(unsigned char *)(addr)))
>
> -void __attribute__((weak)) _machine_restart(void)
> -{
> -}
> -
> -int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
> -{
> - _machine_restart();
> -
> - fprintf(stderr, "*** reset failed ***\n");
> - return 0;
> -}
Why do you move this code?
> --- /dev/null
> +++ b/arch/mips/lib/board_bootstrap.c
...
This copies a lot of code from lib/board.c;
can we avoid this code duplication?
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
Some people march to the beat of a different drummer. And some people
tango!
More information about the U-Boot
mailing list