Lines Matching +full:gen0 +full:- +full:assert
4 * SPDX-License-Identifier: Apache-2.0
39 /* Generate PWM mode, count-down, auto-reload */
51 const struct xlnx_axi_timer_config *config = dev->config; in xlnx_axi_timer_read32()
53 return sys_read32(config->base + offset); in xlnx_axi_timer_read32()
60 const struct xlnx_axi_timer_config *config = dev->config; in xlnx_axi_timer_write32()
62 sys_write32(value, config->base + offset); in xlnx_axi_timer_write32()
69 const struct xlnx_axi_timer_config *config = dev->config; in xlnx_axi_timer_set_cycles()
76 return -ENOTSUP; in xlnx_axi_timer_set_cycles()
102 return -ENOTSUP; in xlnx_axi_timer_set_cycles()
106 tlr0 = period_cycles - 2; in xlnx_axi_timer_set_cycles()
108 if (tlr0 > config->cycles_max) { in xlnx_axi_timer_set_cycles()
110 config->cycles_max); in xlnx_axi_timer_set_cycles()
111 return -ENOTSUP; in xlnx_axi_timer_set_cycles()
116 * Since this is a single-channel PWM controller (with in xlnx_axi_timer_set_cycles()
122 if ((period_cycles - pulse_cycles) < 2) { in xlnx_axi_timer_set_cycles()
124 return -ENOTSUP; in xlnx_axi_timer_set_cycles()
128 tlr1 = period_cycles - pulse_cycles - 2; in xlnx_axi_timer_set_cycles()
132 return -ENOTSUP; in xlnx_axi_timer_set_cycles()
136 tlr1 = pulse_cycles - 2; in xlnx_axi_timer_set_cycles()
166 const struct xlnx_axi_timer_config *config = dev->config; in xlnx_axi_timer_get_cycles_per_sec()
170 *cycles = config->freq; in xlnx_axi_timer_get_cycles_per_sec()
185 "xlnx,gen0-assert must be 1 for pwm"); \
187 "xlnx,gen1-assert must be 1 for pwm"); \
189 "xlnx,one-timer-only must be 0 for pwm"); \
195 GENMASK(DT_INST_PROP(n, xlnx_count_width) - 1, 0), \