From: Igor Grinberg <grinberg@compulab.co.il>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v3 3/3] ARM:AM33XX: Add SPL support for AM335X EVM
Date: Tue, 03 Jan 2012 10:34:23 +0200 [thread overview]
Message-ID: <4F02BD8F.8080701@compulab.co.il> (raw)
In-Reply-To: <1FEB0F76D6F5E244AC1DAE6C32484BBD034428@DBDE01.ent.ti.com>
Hi Chandan,
On 01/03/12 10:18, Kumar Nath, Chandan wrote:
>
>> 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.
[...]
>>> 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.
At least two ways, I can think of:
The less pretty, is introduce ifdefs in that file.
Another and IMO better option is split the file into
common and "less" common content and then reuse the right one.
With the later, you prevent the needless ifdeffery, but need to
be careful not to break any existing platforms.
--
Regards,
Igor.
next prev parent reply other threads:[~2012-01-03 8:34 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-03 6:42 [U-Boot] [PATCH v3 0/3] Added SPL support Chandan Nath
2012-01-03 6:42 ` [U-Boot] [PATCH v3 1/3] ARM:AM33XX: Fix ddr and timer register offset Chandan Nath
2012-01-03 6:42 ` [U-Boot] [PATCH v3 2/3] ARM:AM33XX: Add mmc/sd support Chandan Nath
2012-01-03 8:00 ` Igor Grinberg
2012-01-03 14:21 ` Tom Rini
2012-01-03 14:50 ` Igor Grinberg
2012-01-03 15:01 ` Tom Rini
2012-01-03 6:42 ` [U-Boot] [PATCH v3 3/3] ARM:AM33XX: Add SPL support for AM335X EVM Chandan Nath
2012-01-03 8:14 ` Igor Grinberg
2012-01-03 8:18 ` Kumar
2012-01-03 8:34 ` Igor Grinberg [this message]
2012-01-03 9:03 ` Wolfgang Denk
2012-01-03 14:24 ` Tom Rini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4F02BD8F.8080701@compulab.co.il \
--to=grinberg@compulab.co.il \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox