Timer

From OMAPpedia

Jump to: navigation, search

Welcome to the General Purpose Timers webpage.


Contents

[edit] Introduction

This webpage describes the GP Timers driver design, features, and details of development activities.


[edit] List of Features Supported

[edit] Design

[edit] Hardware Capabilities

Here are some of the key hardware capabilities of the GP Timer module.

[edit] Software Design

This driver is merely a small library providing some functions for the clients of GP timers to reserve and program the timers. The library does not provide high-level abstractions.

So, the clients have to manage all the low-level programming(through the functions provided)and interrupt handling themselves.

This keeps the driver simple and flexible considering that GP Timer is not used by many. Following section describes the API provided by this library:

[edit] APIs

[edit] Feature Status Summary

Here is the summary of completed, ongoing and planned features in the GP Timer driver.

GP Timer Driver

ID Title Target Week Upstream Status Link to Patches Priority Owner Dev Status Comments & Link to Details

[edit] Defect Status Summary

Here is the summary of completed, ongoing and planned defect fixes in the GP Timer driver.

GP Timer Driver

ID Title Target Week Upstream Status Link to Patches Features Impacted Priority Owner Dev Status Comments & Link to Details
Nothing to Report NA NA NA NA NA NA NA NA NA

[edit] FAQ

[edit] How do I use a GP timer to benchmark kernel functions?

1). Include dmtimer header in source file of functions you wish to benchmark:

   #include <mach/dmtimer.h>

2). Initialise a gptimer to run at SYS_CLK freq. For an OMAP3 device, the SYS_CLK frequency will be the frequency of the main external clock connected to the sys_xtalin pad on the device divided by 1 or 2 depending on the configuration of the bit field PRM_CLKSRC_CTRL.SYSCLKDIV. Hence, the SYS_CLK is board dependent.

   struct omap_dm_timer *gptimer;
   gptimer = omap_dm_timer_request();
   omap_dm_timer_set_source(gptimer, OMAP_TIMER_SRC_SYS_CLK);
   omap_dm_timer_set_load_start(gptimer, 0, 0);

3). Use the following function to read timer at desired intervals:

   u32 time_start, time_end;
   
   time_start = omap_dm_timer_read_counter(gptimer);
   
   // code to be benchmarked
   
   time_end = omap_dm_timer_read_counter(gptimer);
   
   printk(KERN_INFO "Total timer ticks = %d\n", (time_end-time_start));

[edit] Feature Status Details

[edit] Defect Status Details

None reported so far


[edit] Future Development Plan

None at present


[edit] Information on Testing Procedures

[edit] Submit Your Ideas Here

Please list them as separate subsections (use ==title==). Please include your name, email ID and date for easy processing.


[edit] Owner

Aneesh V <aneesh@ti.com>

[edit] Contributors

Juha Yrjola

Santosh Shilimkar <santosh.shilimkar@ti.com>

[edit] Patches Merged in kernel.org

TBD


[edit] Recent Submissions to Open Source

TBD

[edit] Current Status of Patches in Omapzoom Tree

None

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox