Repository navigation
[ot] hw/opentitan: rstmgr: defer reset bus and align combo timing #342
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: ot-10.2.0-dev
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -388,6 +388,7 @@ static void ot_sysrst_ctrl_check_events(OtSysrstCtrlState *s) | |
| } else if (prev_trig && !curr_trig) { | ||
| if (out_ctl & R_COM_OUT_CTL_0_RST_REQ_MASK) { | ||
| timer_del(s->combo_rst_timer); | ||
| ibex_irq_set(&s->rst_req, 0); | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In |
||
| } | ||
| if (out_ctl & | ||
| (R_COM_OUT_CTL_0_EC_RST_MASK | R_COM_OUT_CTL_0_RST_REQ_MASK)) { | ||
|
|
@@ -414,8 +415,8 @@ static void ot_sysrst_ctrl_check_events(OtSysrstCtrlState *s) | |
|
|
||
| if (trigger_rst) { | ||
| timer_mod_ns(s->combo_rst_timer, | ||
| qemu_clock_get_ns(QEMU_CLOCK_REALTIME) + | ||
| (rst_det_cyc > 0u ? 3000000LL : 0LL)); | ||
| qemu_clock_get_ns(OT_VIRTUAL_CLOCK) + | ||
| (int64_t)(rst_det_cyc + 1u) * 5000LL); | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nit: |
||
| } | ||
|
|
||
| ot_sysrst_ctrl_update_outputs(s); | ||
|
|
@@ -437,11 +438,6 @@ static void ot_sysrst_ctrl_input_change(void *opaque, int irq, int level) | |
| } | ||
| s->poll_count = 0; | ||
|
|
||
| if (timer_pending(s->combo_rst_timer)) { | ||
| timer_mod_ns(s->combo_rst_timer, | ||
| qemu_clock_get_ns(QEMU_CLOCK_REALTIME) + 3000000LL); | ||
| } | ||
|
|
||
| /* | ||
| * Per sysrst_ctrl_comboact.sv: ec_rst_l_i High -> Low transition | ||
| * (ec_rst_l_det_pulse) asserts ec_rst_l_q = 0 and stretches it for | ||
|
|
@@ -689,8 +685,8 @@ static void ot_sysrst_ctrl_init(Object *obj) | |
| s->ec_rst_l_hw = true; | ||
| s->ec_rst_timer = | ||
| timer_new_ns(QEMU_CLOCK_REALTIME, &ot_sysrst_ctrl_ec_rst_timer_cb, s); | ||
| s->combo_rst_timer = timer_new_ns(QEMU_CLOCK_REALTIME, | ||
| &ot_sysrst_ctrl_combo_rst_timer_cb, s); | ||
| s->combo_rst_timer = | ||
| timer_new_ns(OT_VIRTUAL_CLOCK, &ot_sysrst_ctrl_combo_rst_timer_cb, s); | ||
| s->ulp_timer = | ||
| timer_new_ns(OT_VIRTUAL_CLOCK, &ot_sysrst_ctrl_ulp_timer_cb, s); | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: probably you can move this function down so we don't define the dummy ot_rstmgr_reset_bus