[U-Boot-Users] [PATCH] (Resubmit) ADD ARM AMBA PL031 RTC Support

Wolfgang Denk wd at denx.de
Tue Jul 29 22:54:50 CEST 2008


In message <18583543.post at talk.nabble.com> you wrote:
> 
> Now i have generated the patch using below command. Update me if this is not
> correct
> $ git format-patch  -p -o ../  -C -M -N --summary --stat=80 --no-color
> --signoff   master workingbranch

Please move such comments *below* the '---' line. Anything ABOVE '---'
will become the commit message that goes into the repository, only
stuff below the '---' gets ignores as comment.

> - Add ARM AMBA PL031 RTC Support 
> - Call rtc_init function to start pl031 rtc if enabled from versatile.c 
> - Define rtc base address and date command support in versatile.h 
> - Coding Style Changes/Updates
> 
> Signed-off-by: Gururaja Hebbar <gururajakr at sanyo.co.in>
> ---
>  drivers/rtc/Makefile    |    1 +
>  drivers/rtc/rtc_pl031.c |  123 +++++++++++++++++++++++++++++++++++++++++++++++
>  board/versatile/versatile.c |    9 +++++++++
>  include/configs/versatile.h |    7 +++++++

So this is actually not a single patch, but TWO:

- the first one adds support for the  PL031 RTC (files
  drivers/rtc/Makefile and drivers/rtc/rtc_pl031.c)
- the second one uses it for the "versatile" board (files
  board/versatile/versatile.c and include/configs/versatile.h).

So please split your patch and submit as two separate patches.


...
> diff --git a/board/versatile/versatile.c b/board/versatile/versatile.c
> index 9d1a25e..5bf7e85 100644
> --- a/board/versatile/versatile.c
> +++ b/board/versatile/versatile.c
...
> +#if defined(CONFIG_RTC_PL031) && defined(CONFIG_CMD_DATE)
> +extern int rtc_init(void);
> +#endif
> +
>  #if defined(CONFIG_SHOW_BOOT_PROGRESS)
>  void show_boot_progress(int progress)
>  {
> @@ -84,6 +88,11 @@ int board_init (void)
>  
>  	flash__init ();
>  	ether__init ();
> +
> +#if defined(CONFIG_RTC_PL031) && defined(CONFIG_CMD_DATE)
> +	rtc_init();
> +#endif

Why do we need the #ifdef's here? It seems this is a board specific
configuration anyway, i. e. we don't expect for example other RTC
chips to be used on this board, or do we?


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
1 1 was a race-horse, 2 2 was 1 2. When 1 1 1 1 race, 2 2 1 1 2.




More information about the U-Boot mailing list