All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tom Rini <trini@ti.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCHv1] ARM: Add Altera SOCFPGA Cyclone5
Date: Mon, 27 Aug 2012 08:57:33 -0700	[thread overview]
Message-ID: <503B98ED.3090407@ti.com> (raw)
In-Reply-To: <20120825120537.GA29569@elf.ucw.cz>

On 08/25/2012 05:05 AM, Pavel Machek wrote:
> Hi!
> 
>> [snip]
>>>> It's the omap-common/spl.c code with the bits for IH_OS_LINUX taken out
>>>> :)  Can you please re-do your series on top of the SPL series I just
>>>> posted that provides a common SPL framework?  Thanks!
>>>
>>> I'll take a look. OTOH, ammount of code duplication here is quite low,
>>> and redoing it on top of SPL series will mean delaying merge, right?
>>
>> My hope is that since I got the SPL patches posted in time we can get
>> them in for v2012.10 so no, this will only help your chances :)
> 
> Ok, this is promissed patch for comments. socfpga spl.c now got
> reasonably smaller. It is on top of 

Looks good overall.  I don't see asm/arch/spl.h but that's where you
could put the extern for __stack_start and then define CONFIG_SPL_STACK
to &__stack_start.

> http://github.com/trini/u-boot WIP/spl-improvements
> 
> Now... can I leave spl_ram_load_image() where it is? Probably add some
> #ifdef?

Yeah, I think that's OK to start with, we can move things more later if
needed.

> 
> Dinh, does this look acceptable to you? Could we switch to absolute
> addresses for stack/heap in the SPL?
[snip]
> +/*
> + * Console Initialization
> + */
> +static void spl_console_init(void)
> +{
> +	gd->flags |= GD_FLG_RELOC;
> +	gd->baudrate = CONFIG_BAUDRATE;
> +
> +	/* serial communications setup */
> +	serial_init();
> +	gd->have_console = 1;
> +}

Looks like preloader_console_init :)

> +
> +u32 spl_boot_device(void)
> +{
> +	return BOOT_DEVICE_RAM;
> +}
> +
> +/*
> + * Board initialization after bss clearance
> + */
> +void spl_board_init(void)
> +{
> +	/* init timer for enabling delay function */
> +	timer_init();
> +
> +	/* de-assert reset for peripherals and bridges based on handoff */
> +	reset_deassert_peripherals_handoff();
> +
> +	/* enable console uart printing */
> +	spl_console_init();
> +
> +	/* setup MALLOC after clocks going faster */
> +	mem_malloc_init((ulong) &__malloc_start,
> +			(&__malloc_end - &__malloc_start));

Shouldn't need this, should already be called before you get to
spl_board_init.

[snip]
> diff --git a/arch/arm/cpu/armv7/socfpga/u-boot-spl.lds b/arch/arm/cpu/armv7/socfpga/u-boot-spl.lds

You should setup MEMORY declarations like the other u-boot-spl linker
scripts do so we get build-time confirmation that we haven't exceeded
our size limitations.

> +	. = . + 4;
> +	. = ALIGN(8);
> +	__malloc_start = .;
> +	. = . + CONFIG_SPL_MALLOC_SIZE;
> +	__malloc_end = .;
> +
> +	. = . + 4;
> +	. = . + CONFIG_SPL_STACK_SIZE;
> +	. = ALIGN(8);
> +	__stack_start = .;

Do you really need to do . = . + 4 and then align statements?

[snip]
> diff --git a/spl/Makefile b/spl/Makefile
> index f96c08e4..d757448 100644
> --- a/spl/Makefile
> +++ b/spl/Makefile
> @@ -58,6 +58,7 @@ LIBS-$(CONFIG_SPL_NAND_SUPPORT) += drivers/mtd/nand/libnand.o
>  LIBS-$(CONFIG_SPL_ONENAND_SUPPORT) += drivers/mtd/onenand/libonenand.o
>  LIBS-$(CONFIG_SPL_DMA_SUPPORT) += drivers/dma/libdma.o
>  LIBS-$(CONFIG_SPL_POST_MEM_SUPPORT) += post/drivers/memory.o
> +LIBS-$(CONFIG_SPL_LIBGENERIC_SUPPORT) += lib/libgeneric.o
>  
>  ifneq ($(CONFIG_AM33XX)$(CONFIG_OMAP34XX)$(CONFIG_OMAP44XX)$(CONFIG_OMAP54XX),)
>  LIBS-y += $(CPUDIR)/omap-common/libomap-common.o
> 

Er?  There's already a line for lib/libgeneric.o

> 

  reply	other threads:[~2012-08-27 15:57 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-16 22:45 [U-Boot] [PATCHv1] ARM: Add Altera SOCFPGA Cyclone5 dinguyen at altera.com
2012-08-22 22:10 ` Pavel Machek
2012-08-22 22:26 ` Marek Vasut
2012-08-23  1:13   ` Tom Rini
2012-08-23 10:43     ` Pavel Machek
2012-08-23 11:18       ` Stefan Roese
2012-08-29 12:30         ` Pavel Machek
2012-08-29 12:32           ` Stefan Roese
2012-08-24 19:18       ` Tom Rini
2012-08-25  9:03         ` Pavel Machek
2012-08-25 10:42         ` Pavel Machek
2012-08-25 11:56         ` Pavel Machek
2012-08-27 15:43           ` Tom Rini
2012-08-29 12:07             ` Pavel Machek
2012-08-25 12:05         ` Pavel Machek
2012-08-27 15:57           ` Tom Rini [this message]
2012-08-29 12:27             ` Pavel Machek
2012-08-29 13:41             ` Pavel Machek
2012-08-29 18:26               ` Tom Rini
2012-08-29 23:21                 ` Pavel Machek
2012-08-30  0:00                   ` Tom Rini
2012-08-30 17:18                     ` Pavel Machek
2012-08-30 17:34                       ` Tom Rini
2012-08-30 17:46                         ` Tom Rini
2012-08-30 18:05                         ` Pavel Machek
2012-08-30 18:30                           ` Tom Rini
2012-08-30 20:42                             ` Pavel Machek
2012-08-30 22:25                               ` Tom Rini
2012-08-31 21:26                                 ` Dinh Nguyen
2012-08-31 21:37                                   ` Tom Rini
2012-08-31  7:02                               ` Stefan Roese
2012-08-29 23:34                 ` Pavel Machek
2012-08-29 23:56                   ` Marek Vasut
2012-08-30 16:59                     ` Pavel Machek
2012-08-30 18:02                       ` Marek Vasut
2012-08-30 18:12                         ` Pavel Machek
2012-08-30 18:16                           ` Marek Vasut
2012-09-03  2:59                       ` Chin Liang See
2012-08-30  0:03                   ` Tom Rini
2012-08-30 17:20                     ` Pavel Machek
2012-08-23 10:56     ` Pavel Machek
2012-08-23 10:50   ` Pavel Machek
2012-08-24 22:59     ` 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=503B98ED.3090407@ti.com \
    --to=trini@ti.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.