@@ -70,6 +70,7 @@ enum clock_event_nofitiers {
* @features: features
* @retries: number of forced programming retries
* @set_mode: set mode function
+ * @update_freq: function called to update timer clock frequency
* @broadcast: function to broadcast events
* @min_delta_ticks: minimum delta value in ticks stored for reconfiguration
* @max_delta_ticks: maximum delta value in ticks stored for reconfiguration
@@ -97,6 +98,8 @@ struct clock_event_device {
void (*broadcast)(const struct cpumask *mask);
void (*set_mode)(enum clock_event_mode mode,
struct clock_event_device *);
+ void (*update_freq)(enum clock_event_mode mode,
+ struct clock_event_device *);
unsigned long min_delta_ticks;
unsigned long max_delta_ticks;
@@ -346,13 +346,17 @@ void clockevents_config_and_register(struct clock_event_device *dev,
* @dev: device to modify
* @freq: new device frequency
*
- * Reconfigure and reprogram a clock event device in oneshot
- * mode. Must be called on the cpu for which the device delivers per
+ * Reconfigure and reprogram a clock event device.
+ * Must be called on the cpu for which the device delivers per
* cpu timer events with interrupts disabled! Returns 0 on success,
* -ETIME when the event is in the past.
*/
int clockevents_update_freq(struct clock_event_device *dev, u32 freq)
{
+ /* Call down to the driver to reconfigure for new frequency */
+ if (dev->update_freq)
+ dev->update_freq(dev->mode, dev);
+
clockevents_config(dev, freq);
if (dev->mode != CLOCK_EVT_MODE_ONESHOT)