Lines Matching +full:de +full:- +full:assert +full:- +full:time
1 /* SPDX-License-Identifier: Apache-2.0 */
23 /* Device run time data */
57 struct dw_wdt_dev_data *const dev_data = dev->data; in dw_wdt_setup()
68 dw_wdt_response_mode_set((uint32_t)reg_base, !!dev_data->callback); in dw_wdt_setup()
71 return dw_wdt_configure((uint32_t)reg_base, dev_data->config); in dw_wdt_setup()
76 __maybe_unused const struct dw_wdt_dev_cfg *const dev_config = dev->config;
77 struct dw_wdt_dev_data *const dev_data = dev->data;
82 return -ENODATA;
86 if (config->callback && !dev_config->irq_config) {
88 if (config->callback) {
91 return -ENOTSUP;
94 if (config->flags) {
99 dev_data->callback = config->callback;
102 return dw_wdt_calc_period((uint32_t)reg_base, dev_data->clk_freq, config,
103 &dev_data->config);
112 return -EINVAL;
122 int ret = -ENOTSUP;
128 const struct dw_wdt_dev_cfg *const dev_config = dev->config;
131 * Assert and de-assert reset only if the reset prop is defined in the device
134 if (dev_config->reset_spec.dev != NULL) {
135 if (!device_is_ready(dev_config->reset_spec.dev)) {
137 return -ENODEV;
140 /* Assert and de-assert reset watchdog */
141 ret = reset_line_toggle(dev_config->reset_spec.dev, dev_config->reset_spec.id);
161 const struct dw_wdt_dev_cfg *const dev_config = dev->config;
175 struct dw_wdt_dev_data *const dev_data = dev->data;
177 if (!device_is_ready(dev_config->clk_dev)) {
179 return -ENODEV;
182 ret = clock_control_get_rate(dev_config->clk_dev, dev_config->clkid,
183 &dev_data->clk_freq);
189 ret = dw_wdt_probe((uint32_t)reg_base, dev_config->reset_pulse_length);
195 if (dev_config->irq_config) {
196 dev_config->irq_config();
215 struct dw_wdt_dev_data *const dev_data = dev->data;
221 * Clearing interrupt here will not assert system reset, so interrupt
224 if (dev_data->callback) {
225 dev_data->callback(dev, 0);
258 .reset_pulse_length = ilog2(DT_INST_PROP_OR(inst, reset_pulse_length, 2)) - 1, \