lkml.org 
[lkml]   [2014]   [Apr]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [RFC][PATCH 3/3] clocksource: Add Freescale FlexTimer Module (FTM) timer support
Date
[...]
> > +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





\
 
 \ /
  Last update: 2014-04-16 06:01    [W:0.126 / U:3.940 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site