All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jason <twuug@lakedaemon.net>
To: u-boot@lists.denx.de
Subject: [U-Boot] RFC [PATCH 1/5] drivers/rtc: add Marvell Integrated RTC.
Date: Wed, 27 Jul 2011 21:22:05 -0400	[thread overview]
Message-ID: <20110728012205.GG11758@titan.lakedaemon.net> (raw)
In-Reply-To: <F766E4F80769BD478052FB6533FA745D19FB113151@SC-VEXCH4.marvell.com>

On Wed, Jul 27, 2011 at 11:12:35AM -0700, Prafulla Wadaskar wrote:
> 
> 
> > -----Original Message-----
> > From: Jason Cooper [mailto:u-boot at lakedaemon.net]
> > Sent: Wednesday, July 27, 2011 2:49 AM
> > To: clint at debian.org; wd at denx.de; Prafulla Wadaskar
> > Cc: u-boot at lists.denx.de; Prabhanjan Sarnaik; Ashish Karkare; Siddarth
> > Gore; bdale at gag.com; Jason Cooper
> > Subject: RFC [PATCH 1/5] drivers/rtc: add Marvell Integrated RTC.
> > 
> > 
> > Signed-off-by: Jason Cooper <u-boot@lakedaemon.net>
> > ---
> >  drivers/rtc/Makefile      |    1 +
> >  drivers/rtc/mvinteg_rtc.c |  151
> 
> Filename mvrtc.c sounds more relevent

Will do.

... 
> > +#define INTERNAL_REG_BASE_ADDR 0xf1000000
> 
> This must go in kirkood.h

Thanks.  That didn't feel right to me, but I didn't know the proper
place to put it.

...
> > +
> > +/* register operations macros */
> > +#define MV_REG_READ(offset) \
> > +	le32_to_cpu( \
> > +	*(volatile unsigned int *)(INTERNAL_REG_BASE_ADDR + offset))
> > +
> > +#define MV_REG_WRITE(offset, data) \
> > +	do { \
> > +		*(volatile unsigned int *)(INTERNAL_REG_BASE_ADDR + offset) = \
> > +		cpu_to_le32(data); \
> > +	} while (0);
> > +
> > +/* RTC registers */
> > +#define MVINTEG_RTCTIME_REG 0x10300
> > +#define MVINTEG_RTCDATE_REG 0x10304
> 
> NAK, please use c-strut for register definations

So then, in kirkwood.h:

#define KW_RTC_BASE (KW_REGISTER(0x10300))

and then use accordingly:

struct mvrtc_registers {
	u32 time;
	u32 date;
};

struct mvrtc_registers *mvrtc_regs = (struct mvrtc_registers *)KW_RTC_BASE;

Right?  I'm basing this on kirkwood/timer.c

...
> Regards..
> Prafulla . .

As always, thanks for the review and comments.

thx,

Jason.

  reply	other threads:[~2011-07-28  1:22 UTC|newest]

Thread overview: 60+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-13 15:54 [U-Boot] [PATCH 0/1 v4] RFC: Dreamplug support u-boot at lakedaemon.net
2011-06-13 15:54 ` [U-Boot] [PATCH 1/1 v4] RFC: dreamplug: Initial support u-boot at lakedaemon.net
2011-06-13 15:59   ` Prafulla Wadaskar
2011-06-13 16:07     ` Jason
2011-06-13 16:46       ` Wolfgang Denk
2011-06-13 16:51         ` Jason
2011-07-21 19:36           ` Clint Adams
2011-07-21 20:26             ` Jason
2011-07-21 20:56               ` Clint Adams
2011-07-21 21:17                 ` Jason
2011-07-26 21:19   ` [U-Boot] RFC [PATCH 0/5 v5] add dreamplug support Jason Cooper
2011-09-11 22:10     ` [U-Boot] [PATCH v6] dreamplug: initial board support u-boot at lakedaemon.net
2011-09-12  7:37       ` Igor Grinberg
2011-09-12 11:36         ` Jason
2011-09-12 11:45       ` [U-Boot] [PATCH v7] " Jason Cooper
2011-09-13  7:32         ` Igor Grinberg
2011-09-13 13:53           ` Jason
2011-09-13 11:56         ` Prafulla Wadaskar
2011-09-13 13:00           ` Wolfgang Denk
2011-09-13 14:17             ` Jason
2011-09-14  6:39               ` Prafulla Wadaskar
2011-09-18 17:58                 ` Albert ARIBAUD
2011-09-18 18:27                   ` Albert ARIBAUD
2011-09-18 18:39                   ` Jason
2011-09-18 20:28                     ` Wolfgang Denk
2011-09-18 20:58                       ` Jason
2011-09-18 19:06         ` [U-Boot] [PATCH v8] " Jason Cooper
2011-10-03  4:37           ` Prafulla Wadaskar
2011-07-26 21:19   ` [U-Boot] RFC [PATCH 1/5] drivers/rtc: add Marvell Integrated RTC Jason Cooper
2011-07-27 18:12     ` Prafulla Wadaskar
2011-07-28  1:22       ` Jason [this message]
2011-07-28 19:09         ` Prafulla Wadaskar
2011-07-26 21:19   ` [U-Boot] RFC [PATCH 2/5] arm/kirkwood: print speeds with cpu info Jason Cooper
2011-07-27 18:21     ` Prafulla Wadaskar
2011-07-28  1:31       ` Jason
2011-07-28 19:14         ` Prafulla Wadaskar
2011-10-06 18:13     ` Wolfgang Denk
2011-10-07 12:37       ` Jason
2011-07-26 21:19   ` [U-Boot] RFC [PATCH 3/5] usb: Some EHCI chipsets are slow to respond Jason Cooper
2011-07-27 18:23     ` Prafulla Wadaskar
2011-07-28  1:37       ` Jason
2011-07-28 19:16         ` Prafulla Wadaskar
2011-07-29 14:31           ` Jason
2011-07-26 21:19   ` [U-Boot] RFC [PATCH 4/5 v5] dreamplug: initial board support Jason Cooper
2011-07-27 18:38     ` Prafulla Wadaskar
2011-07-28  2:02       ` Jason
2011-07-28 19:37         ` Prafulla Wadaskar
2011-07-29 15:18           ` Jason
2011-07-29 18:57             ` Prafulla Wadaskar
2011-07-29 19:43               ` Jason
2011-10-06 18:15     ` Wolfgang Denk
2011-10-07 12:40       ` Jason
2011-07-26 21:19   ` [U-Boot] RFC [PATCH 5/5 v5] dreamplug: use MACH_TYPE_DREAMPLUG Jason Cooper
2011-07-27 18:40     ` Prafulla Wadaskar
2011-07-28  2:08       ` Jason
2011-07-28  7:25         ` Bdale Garbee
2011-07-28 12:43           ` Jason
2011-07-28 13:44             ` Bdale Garbee
2011-07-28 19:39         ` Prafulla Wadaskar
2011-07-29 15:25           ` Jason

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=20110728012205.GG11758@titan.lakedaemon.net \
    --to=twuug@lakedaemon.net \
    --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.