[...]
> > +static void ftm_set_mode(enum clock_event_mode mode,
> > +                           struct clock_event_device *evt)
> > +{
> > +   switch (mode) {
> > +   case CLOCK_EVT_MODE_PERIODIC:
> > +           ftm_set_next_event(peroidic_cyc, evt);
> > +           break;
> > +   default:
> > +           break;
> 
> Remove this break;
> 

I'll revise this.


> > +   }
> > +}


[...]
> > +static void __init ftm_timer_init(struct device_node *np)
> > +{
> > +   struct clk *ftm_clk;
> > +   void __iomem *timer_base;
> > +   unsigned long freq;
> > +   int irq;
> > +
> > +   timer_base = of_iomap(np, 0);
> > +   BUG_ON(!timer_base);
> > +
> > +   clksrc_base = timer_base + FTM_OFFSET(1);
> > +   clkevt_base = timer_base + FTM_OFFSET(0);
> > +
> > +   irq = irq_of_parse_and_map(np, 0);
> > +   BUG_ON(irq <= 0);
> > +
> > +   ftm_clk = of_clk_get_by_name(np, "ftm0_counter_en");
> > +   BUG_ON(IS_ERR(ftm_clk));
> > +   BUG_ON(clk_prepare_enable(ftm_clk));
> > +
> > +   ftm_clk = of_clk_get_by_name(np, "ftm1_counter_en");
> > +   BUG_ON(IS_ERR(ftm_clk));
> > +   BUG_ON(clk_prepare_enable(ftm_clk));
> > +
> > +   ftm_clk = of_clk_get_by_name(np, "ftm0");
> > +   BUG_ON(IS_ERR(ftm_clk));
> > +   BUG_ON(clk_prepare_enable(ftm_clk));
> > +
> > +   ftm_clk = of_clk_get_by_name(np, "ftm1");
> 
> Why dts is not have ftm1 node?
> 

Because the 'ftm0: ftm@40038000' node is used to ftm0
and ftm1 device nodes at the same time.

May using 'ftm: ftm@40038000' will be much better ?

Thanks,

BRs
Xiubo



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to