diff options
author | Marc Zyngier <maz@kernel.org> | 2023-10-03 12:30:40 +0100 |
---|---|---|
committer | Marc Zyngier <maz@kernel.org> | 2023-10-03 12:30:40 +0100 |
commit | d4eeae1834a30db232cb536548ac430f44c7a0a2 (patch) | |
tree | 8bdf5920a39d7e93a67b0e380b5db5cc37c2397b | |
parent | 50603c0153e3d0a1c775030145e824fcad20ca29 (diff) | |
download | cs-sw-d4eeae1834a30db232cb536548ac430f44c7a0a2.tar.gz |
Move UART IRQ enable after USB init
We enable the UART interrupt super early, way before we can actually
handle anything. That's no good.
Move the enablement after the FUSB init, unless we deal with an
serial upstream.
Signed-off-by: Marc Zyngier <maz@kernel.org>
-rw-r--r-- | start.c | 3 | ||||
-rw-r--r-- | vdmtool.c | 2 |
2 files changed, 4 insertions, 1 deletions
@@ -206,7 +206,6 @@ static void init_system(const struct hw_context *hw) uart_set_hw_flow(hw->uart, false, false); uart_set_fifo_enabled(hw->uart, true); irq_set_exclusive_handler(hw->uart_irq, hw->uart_handler); - irq_set_enabled(hw->uart_irq, true); uart_set_irq_enables(hw->uart, true, false); /* Interrupt when the RX FIFO is 3/4 full */ @@ -357,7 +356,9 @@ void set_upstream_ops(bool serial) { if (serial) { upstream_ops = &serial1_upstream_ops; + irq_set_enabled(hw1.uart_irq, true); } else { + irq_set_enabled(hw1.uart_irq, false); upstream_ops = &usb_upstream_ops; } @@ -708,6 +708,8 @@ void m1_pd_bmc_fusb_setup(unsigned int port, evt_disconnect(cxt); debug_poke(cxt); + + irq_set_enabled(hw->uart_irq, true); } static bool m1_pd_bmc_run_one(struct vdm_context *cxt) |