hw/ide: Rename ide_exec_cmd() -> ide_bus_exec_cmd()
ide_exec_cmd() operates on a IDEBus; rename it as ide_bus_exec_cmd() to emphasize its first argument is a IDEBus. Mechanical change using: $ sed -i -e 's/ide_exec_cmd/ide_bus_exec_cmd/g' \ $(git grep -wl ide_exec_cmd) Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-Id: <20230215112712.23110-14-philmd@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
parent
e29b124610
commit
783f447441
@ -1269,7 +1269,7 @@ static void handle_reg_h2d_fis(AHCIState *s, int port,
|
|||||||
cmd->status = 0;
|
cmd->status = 0;
|
||||||
|
|
||||||
/* We're ready to process the command in FIS byte 2. */
|
/* We're ready to process the command in FIS byte 2. */
|
||||||
ide_exec_cmd(&s->dev[port].port, cmd_fis[2]);
|
ide_bus_exec_cmd(&s->dev[port].port, cmd_fis[2]);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int handle_cmd(AHCIState *s, int port, uint8_t slot)
|
static int handle_cmd(AHCIState *s, int port, uint8_t slot)
|
||||||
|
@ -1327,7 +1327,7 @@ void ide_ioport_write(void *opaque, uint32_t addr, uint32_t val)
|
|||||||
case ATA_IOPORT_WR_COMMAND:
|
case ATA_IOPORT_WR_COMMAND:
|
||||||
ide_clear_hob(bus);
|
ide_clear_hob(bus);
|
||||||
qemu_irq_lower(bus->irq);
|
qemu_irq_lower(bus->irq);
|
||||||
ide_exec_cmd(bus, val);
|
ide_bus_exec_cmd(bus, val);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2123,13 +2123,13 @@ static bool ide_cmd_permitted(IDEState *s, uint32_t cmd)
|
|||||||
&& (ide_cmd_table[cmd].flags & (1u << s->drive_kind));
|
&& (ide_cmd_table[cmd].flags & (1u << s->drive_kind));
|
||||||
}
|
}
|
||||||
|
|
||||||
void ide_exec_cmd(IDEBus *bus, uint32_t val)
|
void ide_bus_exec_cmd(IDEBus *bus, uint32_t val)
|
||||||
{
|
{
|
||||||
IDEState *s;
|
IDEState *s;
|
||||||
bool complete;
|
bool complete;
|
||||||
|
|
||||||
s = idebus_active_if(bus);
|
s = idebus_active_if(bus);
|
||||||
trace_ide_exec_cmd(bus, s, val);
|
trace_ide_bus_exec_cmd(bus, s, val);
|
||||||
|
|
||||||
/* ignore commands to non existent slave */
|
/* ignore commands to non existent slave */
|
||||||
if (s != bus->ifs && !s->blk) {
|
if (s != bus->ifs && !s->blk) {
|
||||||
|
@ -12,7 +12,7 @@ ide_data_writew(uint32_t addr, uint32_t val, void *bus, void *s)
|
|||||||
ide_data_readl(uint32_t addr, uint32_t val, void *bus, void *s) "IDE PIO rd @ 0x%"PRIx32" (Data: Long); val 0x%08"PRIx32"; bus %p; IDEState %p"
|
ide_data_readl(uint32_t addr, uint32_t val, void *bus, void *s) "IDE PIO rd @ 0x%"PRIx32" (Data: Long); val 0x%08"PRIx32"; bus %p; IDEState %p"
|
||||||
ide_data_writel(uint32_t addr, uint32_t val, void *bus, void *s) "IDE PIO wr @ 0x%"PRIx32" (Data: Long); val 0x%08"PRIx32"; bus %p; IDEState %p"
|
ide_data_writel(uint32_t addr, uint32_t val, void *bus, void *s) "IDE PIO wr @ 0x%"PRIx32" (Data: Long); val 0x%08"PRIx32"; bus %p; IDEState %p"
|
||||||
# misc
|
# misc
|
||||||
ide_exec_cmd(void *bus, void *state, uint32_t cmd) "IDE exec cmd: bus %p; state %p; cmd 0x%02x"
|
ide_bus_exec_cmd(void *bus, void *state, uint32_t cmd) "IDE exec cmd: bus %p; state %p; cmd 0x%02x"
|
||||||
ide_cancel_dma_sync_buffered(void *fn, void *req) "invoking cb %p of buffered request %p with -ECANCELED"
|
ide_cancel_dma_sync_buffered(void *fn, void *req) "invoking cb %p of buffered request %p with -ECANCELED"
|
||||||
ide_cancel_dma_sync_remaining(void) "draining all remaining requests"
|
ide_cancel_dma_sync_remaining(void) "draining all remaining requests"
|
||||||
ide_sector_read(int64_t sector_num, int nsectors) "sector=%"PRId64" nsectors=%d"
|
ide_sector_read(int64_t sector_num, int nsectors) "sector=%"PRId64" nsectors=%d"
|
||||||
|
@ -622,7 +622,7 @@ int ide_init_ioport(IDEBus *bus, ISADevice *isa, int iobase, int iobase2);
|
|||||||
void ide_bus_set_irq(IDEBus *bus);
|
void ide_bus_set_irq(IDEBus *bus);
|
||||||
void ide_bus_register_restart_cb(IDEBus *bus);
|
void ide_bus_register_restart_cb(IDEBus *bus);
|
||||||
|
|
||||||
void ide_exec_cmd(IDEBus *bus, uint32_t val);
|
void ide_bus_exec_cmd(IDEBus *bus, uint32_t val);
|
||||||
|
|
||||||
void ide_transfer_start(IDEState *s, uint8_t *buf, int size,
|
void ide_transfer_start(IDEState *s, uint8_t *buf, int size,
|
||||||
EndTransferFunc *end_transfer_func);
|
EndTransferFunc *end_transfer_func);
|
||||||
|
Loading…
Reference in New Issue
Block a user