Lines Matching +full:ixp4xx +full:- +full:timer

1 // SPDX-License-Identifier: GPL-2.0-or-later
18 #include <linux/soc/ixp4xx/cpu.h>
46 lo = __raw_readl(&regs->systime_lo); in ixp_systime_read()
47 hi = __raw_readl(&regs->systime_hi); in ixp_systime_read()
64 __raw_writel(lo, &regs->systime_lo); in ixp_systime_write()
65 __raw_writel(hi, &regs->systime_hi); in ixp_systime_write()
75 struct ixp46x_ts_regs *regs = ixp_clock->regs; in isr()
79 val = __raw_readl(&regs->event); in isr()
83 if (ixp_clock->exts0_enabled) { in isr()
84 hi = __raw_readl(&regs->asms_hi); in isr()
85 lo = __raw_readl(&regs->asms_lo); in isr()
91 ptp_clock_event(ixp_clock->ptp_clock, &event); in isr()
97 if (ixp_clock->exts1_enabled) { in isr()
98 hi = __raw_readl(&regs->amms_hi); in isr()
99 lo = __raw_readl(&regs->amms_lo); in isr()
105 ptp_clock_event(ixp_clock->ptp_clock, &event); in isr()
113 __raw_writel(ack, &regs->event); in isr()
127 struct ixp46x_ts_regs *regs = ixp_clock->regs; in ptp_ixp_adjfine()
131 __raw_writel(addend, &regs->addend); in ptp_ixp_adjfine()
141 struct ixp46x_ts_regs *regs = ixp_clock->regs; in ptp_ixp_adjtime()
159 struct ixp46x_ts_regs *regs = ixp_clock->regs; in ptp_ixp_gettime()
177 struct ixp46x_ts_regs *regs = ixp_clock->regs; in ptp_ixp_settime()
195 switch (rq->type) { in ptp_ixp_enable()
197 switch (rq->extts.index) { in ptp_ixp_enable()
199 ixp_clock->exts0_enabled = on ? 1 : 0; in ptp_ixp_enable()
202 ixp_clock->exts1_enabled = on ? 1 : 0; in ptp_ixp_enable()
205 return -EINVAL; in ptp_ixp_enable()
212 return -EOPNOTSUPP; in ptp_ixp_enable()
217 .name = "IXP46X timer",
239 return -EPROBE_DEFER; in ixp46x_ptp_find()
256 struct device *dev = &pdev->dev; in ptp_ixp_probe()
264 return -ENXIO; in ptp_ixp_probe()
280 __raw_writel(DEFAULT_ADDEND, &ixp_clock.regs->addend); in ptp_ixp_probe()
281 __raw_writel(1, &ixp_clock.regs->trgt_lo); in ptp_ixp_probe()
282 __raw_writel(0, &ixp_clock.regs->trgt_hi); in ptp_ixp_probe()
283 __raw_writel(TTIPEND, &ixp_clock.regs->event); in ptp_ixp_probe()
304 .compatible = "intel,ixp46x-ptp-timer",
311 .name = "ptp-ixp46x",
320 MODULE_DESCRIPTION("PTP clock using the IXP46X timer");