public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Wolfgang Denk <wd@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] Update s3c24x0 timer implementation
Date: Sun, 23 Oct 2011 19:22:48 +0200	[thread overview]
Message-ID: <20111023172248.4AB611408771@gemini.denx.de> (raw)
In-Reply-To: <CAJtrzLOvjswmuww+xNLXxeSH4QxOBZww3JrZGKCgLq5w6B=y3w@mail.gmail.com>

Dear Mark Norman,

In message <CAJtrzLOvjswmuww+xNLXxeSH4QxOBZww3JrZGKCgLq5w6B=y3w@mail.gmail.com> you wrote:
>
>  Since the .rel.text section is required by the relocation code, I
> assume that .bss global variables cannot be used until after
> relocation?

Why do you have to make such assumptions?  That's documented
behaviour.  Didn't you RTFM?

> After studying several other timer.c files I developed the following
> patch which uses the global data struct to store the global variables.
>  I also restructured some of the code based on structure of the other
> timer.c files.  I have confirmed it works correctly on the SBC I have.

Then please submit a proper patch - these introductury comments don;lt
belong intot he commit message and shouldbemoved into the comment
section (below the "---" line).


...
> +	/* Use PWM Timer 4 because it has no output.
> +	 * Prescaler is hard fixed at 250, divider at 2.
> +	 * This generates a Timer clock frequency of 100kHz (@PCLK=50MHz) and
> +	 * therefore 10us timer ticks.
> +	 */

Incorrect multiline comment format; please fix globally.

> +	/* Prescaler for Timer 4 is 250 */
> +	const ulong prescaler = 250;
> +	writel((prescaler-1) << 8, &timers->tcfg0);

Please move declarations up.  Don't split declarations by comment
lines.  Add a blank line between declarations and code.

...
> --- a/arch/arm/include/asm/global_data.h
> +++ b/arch/arm/include/asm/global_data.h
> @@ -38,9 +38,6 @@ typedef	struct	global_data {
>  	unsigned long	flags;
>  	unsigned long	baudrate;
>  	unsigned long	have_console;	/* serial_init() was called */
> -#ifdef CONFIG_PRE_CONSOLE_BUFFER
> -	unsigned long	precon_buf_idx;	/* Pre-Console buffer index */
> -#endif

Make sure not to add such unrelated, incorrect changes!

> -#if defined(CONFIG_POST) || defined(CONFIG_LOGBUFFER)
> -	unsigned long	post_log_word; /* Record POST activities */
> -	unsigned long	post_log_res; /* success of POST test */
> -	unsigned long	post_init_f_time; /* When post_init_f started */
> -#endif

Ditto.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
I think there's a world market for about five computers.
         -- attr. Thomas J. Watson (Chairman of the Board, IBM), 1943

  reply	other threads:[~2011-10-23 17:22 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-23 11:52 [U-Boot] [PATCH] Update s3c24x0 timer implementation Mark Norman
2011-10-23 17:22 ` Wolfgang Denk [this message]
2011-10-24 11:27   ` Mark Norman
2011-10-24 13:58     ` Marek Vasut
2011-10-31 11:27       ` Mark Norman
2011-10-24 19:34     ` Wolfgang Denk
  -- strict thread matches above, loose matches on Subject: below --
2011-10-31 10:58 Mark Norman

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=20111023172248.4AB611408771@gemini.denx.de \
    --to=wd@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox