RE: patch: add omap730 / omap850 rtc support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> -----Original Message-----
> From: Christopher Friedt [mailto:chrisfriedt@xxxxxxxxx] 
> Sent: Wednesday, October 14, 2009 6:58 PM
> To: G, Manjunath Kondaiah
> Cc: linux-omap@xxxxxxxxxxxxxxx
> Subject: Re: patch: add omap730 / omap850 rtc support
> 
> On Wed, Oct 14, 2009 at 11:52 AM, G, Manjunath Kondaiah 
> <manjugk@xxxxxx> wrote:
> > You can acheive the same using only enum with following:
> >
> > #define OMAP_RTC_REGISTER_SIZE (cpu_is_omap7xx()?1:4)
> > #define rtc_read(reg)
> >        omap_readb(OMAP_RTC_BASE + (reg * OMAP_RTC_REGISTER_SIZE))
> 
> That was my first instinct too, but then I thought that one of the
> register offsets wasn't related by a factor of 4 (when I made the
> patch originally it was ~ 2am and I was very tired), which convinced
> me to do a quick & easy static array implementation.
> 
> Thanks for your suggestion.

You can add reserve register offsets into enum array to fix the issue 
of register offsets not in sequence like:
enum omap_rtc_regs {
	SECONDS_REG = 0,
	MINUTES_REG,
	HOURS_REG,
	DAYS_REG,
	MONTHS_REG,
	YEARS_REG,
	WEEKS_REG,
	RESV_REG_1,
	ALARM_SECONDS_REG,
	ALARM_MINUTES_REG,
	ALARM_HOURS_REG,
	ALARM_DAYS_REG,
	ALARM_MONTHS_REG,
	ALARM_YEARS_REG,
	RESV_REG_2,
	RESV_REG_3,
	CTRL_REG,
	STATUS_REG,
	INTERRUPTS_REG,
	COMP_LSB_REG,
	COMP_MSB_REG,
};

> 
> Regarding the 50 -> 35 change, I think it's clearly safe to do. I have
> no objections.
> 
> C
>
 
Ok. Change the value to 35.

-Manjunath

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux