Lines Matching +full:cs +full:- +full:number
1 // SPDX-License-Identifier: GPL-2.0-only
22 return (u64)readl_relaxed(to_mmio_clksrc(c)->reg); in clocksource_mmio_readl_up()
27 return ~(u64)readl_relaxed(to_mmio_clksrc(c)->reg) & c->mask; in clocksource_mmio_readl_down()
32 return (u64)readw_relaxed(to_mmio_clksrc(c)->reg); in clocksource_mmio_readw_up()
37 return ~(u64)readw_relaxed(to_mmio_clksrc(c)->reg) & c->mask; in clocksource_mmio_readw_down()
41 * clocksource_mmio_init - Initialize a simple mmio based clocksource
46 * @bits: Number of valid bits
53 struct clocksource_mmio *cs; in clocksource_mmio_init() local
56 return -EINVAL; in clocksource_mmio_init()
58 cs = kzalloc(sizeof(struct clocksource_mmio), GFP_KERNEL); in clocksource_mmio_init()
59 if (!cs) in clocksource_mmio_init()
60 return -ENOMEM; in clocksource_mmio_init()
62 cs->reg = base; in clocksource_mmio_init()
63 cs->clksrc.name = name; in clocksource_mmio_init()
64 cs->clksrc.rating = rating; in clocksource_mmio_init()
65 cs->clksrc.read = read; in clocksource_mmio_init()
66 cs->clksrc.mask = CLOCKSOURCE_MASK(bits); in clocksource_mmio_init()
67 cs->clksrc.flags = CLOCK_SOURCE_IS_CONTINUOUS; in clocksource_mmio_init()
69 return clocksource_register_hz(&cs->clksrc, hz); in clocksource_mmio_init()