All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marek Vasut <marex@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCHv1] ARM: Add Altera SOCFPGA Cyclone5
Date: Thu, 30 Aug 2012 20:02:30 +0200	[thread overview]
Message-ID: <201208302002.30626.marex@denx.de> (raw)
In-Reply-To: <20120830165951.GC5980@elf.ucw.cz>

Dear Pavel Machek,

> Hi!
> 
> > > I took oportunity to cleanup whitespace in
> > > arch/arm/cpu/armv7/omap-common/u-boot-spl.lds. Perhaps someone can
> > > merge that...
> > 
> > Argh ... what about using git send-email for the patch submission please?
> 
> I'm not supposed to submit patches here, these are just requests for
> review ;-).
> 
> > NOTE: I really have a great deal of respect for Pavel, so i do have
> > trouble stepping on him properly during the patch review ;-)
> 
> ;-).
> 
> > > +	ldr	r0, =CONFIG_SYS_INIT_RAM_ADDR
> > > +	ldr	r1, =CONFIG_SYS_INIT_RAM_SIZE
> > > +	add	r0, r0, r1
> > 
> > Won't the preprocessor compute (CONFIG_SYS_INIT_RAM_ADDR +
> > CONFIG_SYS_INIT_RAM_SIZE) for you? Then you'd only have to do one LDR and
> > no ADD instruction, saving two ticks of CPU :-)
> :
> :-). And opportunity for me to try my luck at arm assembly. Does this
> 
> look correct?
> 
>         ldr     r0, =(CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_RAM_SIZE)
>         ldr     r1, =IRQ_STACK_START_IN
>         str     r0, [r1]
> 
>         bx      lr

Yes

> > > +static const struct socfpga_reset_manager *reset_manager_base =
> > > +		(void *)SOCFPGA_RSTMGR_ADDRESS;
> > > +
> > > +/*
> > > + * Write the reset manager register to cause reset
> > > + */
> > 
> > You might want to add __attribute__((noreturn)) to this function :-)
> 
> Hmm... I guess that should go to the central header file? No need to
> sprinkle it all through the C files. (Done).
> 
> > > +	writel(TIMER_LOAD_VAL, &timer_base->load_val);
> > > +	writel(TIMER_LOAD_VAL, &timer_base->curr_val);
> > > +	writel((readl((&timer_base->ctrl)) | 0x3),
> > 
> > I think you should stick to programming in C here, not ((((LISP)))), so
> > try cutting down on the ((braces)) :-)
> 
> Some braces have been harmed by creation of this patch.

At least one more pair must be killed on the above statement :)

> > btw. what's this 0x3 magic constant ?
> 
> Dinh has to help here :-(.

Also, use setbits_le32() there instead anyway.

> > > +static inline void delay(unsigned long loops)
> > > +{
> > > +	__asm__ volatile ("1:\n"
> > > +		"subs %0, %1, #1\n"
> > > +		"bne 1b" : "=r" (loops) : "0" (loops));
> > > +}
> > 
> > Am I flat blind or is this not used here?
> 
> Killed, thanks. Lets see what the compiler thinks.
> 
> 									Pavel

Best regards,
Marek Vasut

  reply	other threads:[~2012-08-30 18:02 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
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 [this message]
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=201208302002.30626.marex@denx.de \
    --to=marex@denx.de \
    --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.