lkml.org 
[lkml]   [2014]   [Sep]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 2/5] Clocksource: Flextimer: Use internal clocksource read API.
    On Tue, 26 Aug 2014, Xiubo Li wrote:

    > Since the Flextimer device will be implemented in BE mode on
    > LS1 SoC, and in LE mode on Vybrid, LS2 SoCs, so here we need
    > the endianness judgment before doing the mmio.

    Brilliant. So for every clocksource read you take a conditional.

    > @@ -238,7 +243,7 @@ static int __init ftm_clocksource_init(unsigned long freq)
    > sched_clock_register(ftm_read_sched_clock, 16, freq / (1 << priv->ps));
    > err = clocksource_mmio_init(priv->clksrc_base + FTM_CNT, "fsl-ftm",
    > freq / (1 << priv->ps), 300, 16,
    > - clocksource_mmio_readl_up);
    > + ftm_clocksource_read_up);

    What's wrong with having endianess aware clocksource_mmio functions
    and make the decision at init time?

    Thanks

    tglx


    \
     
     \ /
      Last update: 2014-09-03 13:21    [W:2.681 / U:0.188 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site