summaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-omap/include/plat/dmtimer.h
diff options
context:
space:
mode:
authorJon Hunter <jon-hunter@ti.com>2012-06-05 12:34:51 -0500
committerTony Lindgren <tony@atomide.com>2012-06-14 02:39:06 -0700
commitb7b4ff764f7bf903e47eebdab661b1c38e791c6d (patch)
tree1f56e292fa0b1a4069ce4a359dac905169257412 /arch/arm/plat-omap/include/plat/dmtimer.h
parent26fe4e454bfee3248bc7f7bab38b4888db33528e (diff)
downloadtalos-op-linux-b7b4ff764f7bf903e47eebdab661b1c38e791c6d.tar.gz
talos-op-linux-b7b4ff764f7bf903e47eebdab661b1c38e791c6d.zip
ARM: OMAP2+: Add dmtimer platform function to reserve systimers
During early boot, one or two dmtimers are reserved by the kernel as system timers (for clocksource and clockevents). These timers are marked as reserved and the dmtimer driver is notified which timers have been reserved via the platform data information. For OMAP2+ devices the timers reserved may vary depending on device and compile flags. Therefore, it is not easy to assume which timers we be reserved for the system timers. In order to migrate the dmtimer driver to support device-tree we need a way to pass the timers reserved for system timers to the dmtimer driver. Using the platform data structure will not work in the same way as it is currently used because the platform data structure will be stored statically in the dmtimer itself and the platform data will be selected via the device-tree match device function (of_match_device). There are a couple ways to workaround this. One option is to store the system timers reserved for the kernel in the device-tree and query them on boot. The downside of this approach is that it adds some delay to parse the DT blob to search for the system timers. Secondly, for OMAP3 devices we have a dependency on compile time flags and the device-tree would not be aware of that kernel compile flags and so we would need to address that. The second option is to add a function to the dmtimer code to reserved the system timers during boot and so the dmtimer knows exactly which timers are being used for system timers. This also allows us to remove the "reserved" member from the timer platform data. This seemed like the simpler approach and so was implemented here. Signed-off-by: Jon Hunter <jon-hunter@ti.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/plat-omap/include/plat/dmtimer.h')
-rw-r--r--arch/arm/plat-omap/include/plat/dmtimer.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/arch/arm/plat-omap/include/plat/dmtimer.h b/arch/arm/plat-omap/include/plat/dmtimer.h
index 5fdfaa481259..1e5ce5d56240 100644
--- a/arch/arm/plat-omap/include/plat/dmtimer.h
+++ b/arch/arm/plat-omap/include/plat/dmtimer.h
@@ -98,13 +98,12 @@ struct dmtimer_platform_data {
int (*set_timer_src)(struct platform_device *pdev, int source);
int timer_ip_version;
u32 needs_manual_reset:1;
- bool reserved;
-
bool loses_context;
int (*get_context_loss_count)(struct device *dev);
};
+int omap_dm_timer_reserve_systimer(int id);
struct omap_dm_timer *omap_dm_timer_request(void);
struct omap_dm_timer *omap_dm_timer_request_specific(int timer_id);
int omap_dm_timer_free(struct omap_dm_timer *timer);
OpenPOWER on IntegriCloud