From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tom Rini Date: Tue, 3 Jan 2012 07:24:36 -0700 Subject: [U-Boot] [PATCH v3 3/3] ARM:AM33XX: Add SPL support for AM335X EVM In-Reply-To: <1FEB0F76D6F5E244AC1DAE6C32484BBD034428@DBDE01.ent.ti.com> References: <1325572976-25795-1-git-send-email-chandan.nath@ti.com> <1325572976-25795-4-git-send-email-chandan.nath@ti.com> <4F02B8DD.50209@compulab.co.il> <1FEB0F76D6F5E244AC1DAE6C32484BBD034428@DBDE01.ent.ti.com> Message-ID: <4F030FA4.2090604@ti.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 01/03/2012 01:18 AM, Kumar Nath, Chandan wrote: > >> -----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 >>> Signed-off-by: Tom Rini >>> --- >>> 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 >>> #include >>> #include >>> +#include >>> #include >>> #include >>> +#include >>> +#include >>> #include >>> +#include >>> >>> 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. This probably just means there's further common code that am33xx needs to be moved over to use from the omap4/5 family. For example, the emif code. -- Tom