@@ -1029,11 +1029,13 @@ static bool ot_spi_device_is_hw_read_command(const OtSPIDeviceState *s)
1029
1029
}
1030
1030
}
1031
1031
1032
- static void ot_spi_device_release_cs (OtSPIDeviceState * s )
1032
+ static void ot_spi_device_release (OtSPIDeviceState * s )
1033
1033
{
1034
1034
SpiDeviceFlash * f = & s -> flash ;
1035
1035
SpiDeviceBus * bus = & s -> bus ;
1036
1036
1037
+ trace_ot_spi_device_release ();
1038
+
1037
1039
BUS_CHANGE_STATE (bus , IDLE );
1038
1040
bus -> byte_count = 0 ;
1039
1041
@@ -2469,7 +2471,7 @@ static void ot_spi_device_chr_receive(void *opaque, const uint8_t *buf,
2469
2471
2470
2472
if (!bus -> byte_count ) {
2471
2473
if (bus -> release ) {
2472
- ot_spi_device_release_cs (s );
2474
+ ot_spi_device_release (s );
2473
2475
} else {
2474
2476
BUS_CHANGE_STATE (bus , IDLE );
2475
2477
}
@@ -2489,11 +2491,11 @@ static void ot_spi_device_chr_event_hander(void *opaque, QEMUChrEvent event)
2489
2491
return ;
2490
2492
}
2491
2493
2492
- ot_spi_device_release_cs (s );
2494
+ ot_spi_device_release (s );
2493
2495
}
2494
2496
2495
2497
if (event == CHR_EVENT_CLOSED ) {
2496
- ot_spi_device_release_cs (s );
2498
+ ot_spi_device_release (s );
2497
2499
}
2498
2500
}
2499
2501
@@ -2527,7 +2529,7 @@ static int ot_spi_device_chr_be_change(void *opaque)
2527
2529
2528
2530
fifo8_reset (& bus -> chr_fifo );
2529
2531
2530
- ot_spi_device_release_cs (s );
2532
+ ot_spi_device_release (s );
2531
2533
2532
2534
if (s -> watch_tag > 0 ) {
2533
2535
g_source_remove (s -> watch_tag );
@@ -2588,7 +2590,7 @@ static void ot_spi_device_reset(DeviceState *dev)
2588
2590
fifo8_reset (& f -> cmd_fifo );
2589
2591
ot_fifo32_reset (& f -> address_fifo );
2590
2592
2591
- ot_spi_device_release_cs (s );
2593
+ ot_spi_device_release (s );
2592
2594
f -> watermark = false;
2593
2595
f -> new_cmd = false;
2594
2596
s -> spi_regs [R_CONTROL ] = 0x80000010u ;
0 commit comments