From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rob Herring Date: Mon, 09 Sep 2013 09:52:35 -0500 Subject: [U-Boot] [PATCH 0/9] Consolidate ARM timer code In-Reply-To: <20130909055300.721C33804B0@gemini.denx.de> References: <1378671174-18535-1-git-send-email-robherring2@gmail.com> <20130909055300.721C33804B0@gemini.denx.de> Message-ID: <522DE0B3.20201@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 09/09/2013 12:53 AM, Wolfgang Denk wrote: > Dear Rob Herring, > > In message <1378671174-18535-1-git-send-email-robherring2@gmail.com> you wrote: >> From: Rob Herring >> >> Much of the ARM timer code is re-implemented for each platform yet it >> is all pretty much the same code. >> >> This series introduces a common implementation of timer functions and >> simplifies the platform code down to 2 or 3 config defines. It is >> intended for platforms with 32-bit freerunning timers. I've converted >> a couple of platforms as an example, but there are many more still that >> can be converted. This probably could be extended to work with 16-bit >> timers as well. >> >> I've compiled all ARM boards, but only tested on highbank. > > Why do we need any ARM specific code at all? What's the difference > between an ARM and - say - a PowerPC system in this respect, and why > do we need different code for both? > > If we consolidate code, it should always be done in a cross-platform > way, unless platform specifc code really cannot be avoided (which I > fail to see yet here). I agree, but it appeared that at least some PPC platforms implement timers differently using a timer interrupt. I haven't really looked at other architectures. At least moving the code to a common spot is trivial. Aside from the location, do you have any comments on the implementation? Rob