Commit 9763f891 authored by alex@thinkpad's avatar alex@thinkpad
Browse files

QEMU: cleaned up serial flash handling on models that don't use one

previously, they were called on unrelated SIO/SDIO channels, with little or no side effects,
other than breaking a few function call trace tests

--HG--
branch : qemu
parent 5137e76c4d82
...@@ -3455,7 +3455,7 @@ static unsigned int eos_handle_rtc ( unsigned int parm, EOSState *s, unsigned in ...@@ -3455,7 +3455,7 @@ static unsigned int eos_handle_rtc ( unsigned int parm, EOSState *s, unsigned in
unsigned int eos_handle_sio ( unsigned int parm, EOSState *s, unsigned int address, unsigned char type, unsigned int value ) unsigned int eos_handle_sio ( unsigned int parm, EOSState *s, unsigned int address, unsigned char type, unsigned int value )
{ {
if (parm == s->model->serial_flash_sio_ch) if (s->sf && parm == s->model->serial_flash_sio_ch)
{ {
/* serial flash (SFIO) */ /* serial flash (SFIO) */
return eos_handle_sio_serialflash(parm, s, address, type, value); return eos_handle_sio_serialflash(parm, s, address, type, value);
...@@ -3728,7 +3728,7 @@ static void sdio_trigger_interrupt(EOSState *s) ...@@ -3728,7 +3728,7 @@ static void sdio_trigger_interrupt(EOSState *s)
unsigned int eos_handle_sdio ( unsigned int parm, EOSState *s, unsigned int address, unsigned char type, unsigned int value ) unsigned int eos_handle_sdio ( unsigned int parm, EOSState *s, unsigned int address, unsigned char type, unsigned int value )
{ {
if (parm == s->model->serial_flash_sfio_ch) if (s->sf && parm == s->model->serial_flash_sfio_ch)
{ {
/* serial flash DMA */ /* serial flash DMA */
return eos_handle_sfio(parm, s, address, type, value); return eos_handle_sfio(parm, s, address, type, value);
......
...@@ -30,8 +30,6 @@ struct eos_model_desc eos_model_list[] = { ...@@ -30,8 +30,6 @@ struct eos_model_desc eos_model_list[] = {
.uart_rx_interrupt = 0x2E, .uart_rx_interrupt = 0x2E,
.uart_tx_interrupt = 0x3A, .uart_tx_interrupt = 0x3A,
.rtc_cs_register = 0xC022005C, .rtc_cs_register = 0xC022005C,
.serial_flash_sio_ch = 4, /* fixme */
.serial_flash_sfio_ch = 4,
}, },
{ {
/* defaults for DIGIC 4 cameras */ /* defaults for DIGIC 4 cameras */
...@@ -305,8 +303,6 @@ struct eos_model_desc eos_model_list[] = { ...@@ -305,8 +303,6 @@ struct eos_model_desc eos_model_list[] = {
.sd_dma_interrupt = 0x32, .sd_dma_interrupt = 0x32,
.uart_rx_interrupt = 0x38, .uart_rx_interrupt = 0x38,
.rtc_time_correct = 0xFD, .rtc_time_correct = 0xFD,
.serial_flash_sio_ch = 4, /* fixme */
.serial_flash_sfio_ch = 4,
}, },
{ {
.name = "EOSM", .name = "EOSM",
......
2c0d5644f9060d53c64b4c44a51e5728 calls-main.log 4d038e391d1e475dd911b2773eef750e calls-main.log
5c2122c76128857f29b2bbcfc030f53b calls-main.idc 5c2122c76128857f29b2bbcfc030f53b calls-main.idc
e9b69f1cd8ef78c36b0261daac13afea calls-main-basic.log e9b69f1cd8ef78c36b0261daac13afea calls-main-basic.log
8a6da5f2e8e1e573fcaa8a74426c85d4 calls-main-basic.idc 8a6da5f2e8e1e573fcaa8a74426c85d4 calls-main-basic.idc
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment