[U-Boot] [PATCH v3 3/3] ARM:AM33XX: Add SPL support for AM335X EVM

Kumar
2012-01-03T08:18:23Z

> -----Original Message-----
> From: Igor Grinberg [mailto:grinberg at compulab.co.il]
> Sent: Tuesday, January 03, 2012 1:44 PM
> To: Kumar Nath, Chandan
> Cc: u-boot at lists.denx.de; Rini, Tom
> Subject: Re: [U-Boot] [PATCH v3 3/3] ARM:AM33XX: Add SPL support for
> AM335X EVM
>
> On 01/03/12 08:42, Chandan Nath wrote:
> > This patch is added to support SPL feature on AM335X
> > platform. In this patch, MMC1 is configured as boot
> > device for SPL and support for other devices will be
> > added in the next patch series.
> >
> > Signed-off-by: Chandan Nath <chandan.nath@ti.com>
> > Signed-off-by: Tom Rini <trini@ti.com>
> > ---
> > Changes since v2:
> > - Added missing omap.h file
> >
> > Changes since v1:
> > - Rebased to master branch
> > - Replaced am33xx lowleve_init.S with omap-common lowlevel_init.S
> > in order to use common code for omap_bootmode.
> >
> > arch/arm/cpu/armv7/am33xx/Makefile | 2 -
> > arch/arm/cpu/armv7/am33xx/board.c | 65
> +++++++++++++++++++++--
> > arch/arm/cpu/armv7/am33xx/config.mk | 18 ++++++
> > arch/arm/cpu/armv7/am33xx/emif4.c | 2 +-
> > arch/arm/cpu/armv7/am33xx/lowlevel_init.S | 72 ---------------
> ----------
> > arch/arm/cpu/armv7/omap-common/Makefile | 3 +
> > arch/arm/include/asm/arch-am33xx/common_def.h | 22 ++++++++
> > arch/arm/include/asm/arch-am33xx/omap.h | 59
> ++++++++++++++++++++
> > arch/arm/include/asm/arch-am33xx/sys_proto.h | 1 +
> > arch/arm/include/asm/omap_common.h | 5 ++
> > board/ti/am335x/common_def.h | 24 --------
> > board/ti/am335x/evm.c | 2 +-
> > board/ti/am335x/mux.c | 2 +-
> > include/configs/am335x_evm.h | 39 ++++++++++++-
> > spl/Makefile | 13 ++---
> > 15 files changed, 214 insertions(+), 115 deletions(-)
> > create mode 100644 arch/arm/cpu/armv7/am33xx/config.mk
> > delete mode 100644 arch/arm/cpu/armv7/am33xx/lowlevel_init.S
> > create mode 100644 arch/arm/include/asm/arch-am33xx/common_def.h
> > create mode 100644 arch/arm/include/asm/arch-am33xx/omap.h
> > delete mode 100644 board/ti/am335x/common_def.h
> >
> > diff --git a/arch/arm/cpu/armv7/am33xx/Makefile
> b/arch/arm/cpu/armv7/am33xx/Makefile
> > index 6beafbb..7768912 100644
> > --- a/arch/arm/cpu/armv7/am33xx/Makefile
> > +++ b/arch/arm/cpu/armv7/am33xx/Makefile
> > @@ -16,8 +16,6 @@ include $(TOPDIR)/config.mk
> >
> > LIB = $(obj)lib$(SOC).o
> >
> > -SOBJS := lowlevel_init.o
> > -
> > COBJS += clock.o
> > COBJS += sys_info.o
> > COBJS += ddr.o
> > diff --git a/arch/arm/cpu/armv7/am33xx/board.c
> b/arch/arm/cpu/armv7/am33xx/board.c
> > index 312643c..2a45933 100644
> > --- a/arch/arm/cpu/armv7/am33xx/board.c
> > +++ b/arch/arm/cpu/armv7/am33xx/board.c
> > @@ -19,19 +19,45 @@
> > #include <common.h>
> > #include <asm/arch/cpu.h>
> > #include <asm/arch/hardware.h>
> > +#include <asm/arch/omap.h>
> > #include <asm/arch/ddr_defs.h>
> > #include <asm/arch/clock.h>
> > +#include <asm/arch/mmc_host_def.h>
> > +#include <asm/arch/common_def.h>
> > #include <asm/io.h>
> > +#include <asm/omap_common.h>
> >
> > DECLARE_GLOBAL_DATA_PTR;
> >
> > struct wd_timer *wdtimer = (struct wd_timer *)WDT_BASE;
> > struct gptimer *timer_base = (struct gptimer *)CONFIG_SYS_TIMERBASE;
> > +struct uart_sys *uart_base = (struct uart_sys *)DEFAULT_UART_BASE;
> > +
> > +struct omap_boot_parameters boot_params __attribute__
> ((section(".data")));
> > +
> > +#ifdef CONFIG_SPL_BUILD
> > +u32 omap_bootmode = MMCSD_MODE_FAT;
> > +
> > +u32 omap_boot_device(void)
> > +{
> > + return (u32) (boot_params.omap_bootdevice);
> > +}
> > +
> > +u32 omap_boot_mode(void)
> > +{
> > + return omap_bootmode;
> > +}
> > +
>
> can't arch/arm/cpu/armv7/omap-common/hwinit-common.c be used for this?

I tried using hwinit-common.c file, but there are some other functions defined
which are not required. Could you tell me if there is any method to use only
Above functions from hwinit-common.c file.

>
> [...]
>
>
> --
> Regards,
> Igor.