From mboxrd@z Thu Jan 1 00:00:00 1970 From: J. William Campbell Date: Mon, 23 May 2011 11:27:17 -0700 Subject: [U-Boot] [RFC] Review of U-Boot timer API In-Reply-To: <20110523131959.9256D1499BF6@gemini.denx.de> References: <4DD7B245.5000008@gmail.com> <4DD8908E.7040501@emk-elektronik.de> <4DD8ABD3.2070506@gmail.com> <4DD8B993.3010704@comcast.net> <4DD8C639.30200@emk-elektronik.de> <4DD9A6F7.1040509@comcast.net> <4DD9B608.7080307@comcast.net> <20110523120912.493E01499BF6@gemini.denx.de> <4DDA5334.4060308@gmail.com> <20110523131959.9256D1499BF6@gemini.denx.de> Message-ID: <4DDAA705.1040702@comcast.net> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 5/23/2011 6:19 AM, Wolfgang Denk wrote: > Dear Graeme Russ, > This is what PPC is doing. And I understand that Reinhard did the same > in software for AT91. Hi All, My apologies for being a little (perhaps more than a little) dense. As they say, "after further review", I think the key aspect of the PPC timer system is that it uses the decrementer register to generate an interrupt at a 1 KHz rate. What I have been attempting here is to produce a timer system that does not use interrupts at all. This is a fundamental design question. Naturally, systems that can generate an interrupt at a 1 KHz rate (or at any (reasonable) higher rate for that matter) using the decrementer register can produce a 1 ms resolution software counter that updates "by magic". If my understanding of this PPC code is incorrect, somebody please stop me before I make a further fool of myself! Is it then a design requirement that the timer system use interrupts? Is that what is meant by using the PPC system as a model? If so, is it possible/reasonable on all the u-boots that are out there to generate and process timer interrupts at some (hopefully but not necessarily) programmable rate? Best Regards, Bill Campbell > Best regards, > > Wolfgang Denk >