/* Setup the local clock events for a CPU.  */
void __cpuinit twd_timer_setup(struct clock_event_device *clk)
/* Setup the local clock events for a CPU.  */
void __cpuinit twd_timer_setup(struct clock_event_device *clk)
{
	unsigned long flags;
	twd_calibrate_rate();
	clk->name = "local_timer";
	clk->features = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT;
	clk->rating = 350;
	clk->set_mode = twd_set_mode;
	clk->set_next_event = twd_set_next_event;
	clk->shift = 20;
	clk->mult = div_sc(twd_timer_rate, NSEC_PER_SEC, clk->shift);
	clk->max_delta_ns = clockevent_delta2ns(0xffffffff, clk);
	clk->min_delta_ns = clockevent_delta2ns(0xf, clk);
	local_irq_save(flags);
	irq_to_desc(clk->irq)->status |= IRQ_NOPROBE;
	get_irq_chip(clk->irq)->unmask(clk->irq);
	local_irq_restore(flags);
	clockevents_register_device(clk);
}