mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-10 11:04:58 -06:00
fw_cfg: move boards to fw_cfg_init_io() / fw_cfg_init_mem()
This allows us to drop the fw_cfg_init() shim and to enforce the possible mappings at compile time. Signed-off-by: Laszlo Ersek <lersek@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Message-id: 1419250305-31062-3-git-send-email-pbonzini@redhat.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
parent
5712db6ae5
commit
66708822cd
7 changed files with 6 additions and 22 deletions
|
@ -632,20 +632,6 @@ FWCfgState *fw_cfg_init_mem(hwaddr ctl_addr, hwaddr data_addr)
|
|||
}
|
||||
|
||||
|
||||
FWCfgState *fw_cfg_init(uint32_t ctl_port, uint32_t data_port,
|
||||
hwaddr crl_addr, hwaddr data_addr)
|
||||
{
|
||||
if (ctl_port + 1 == data_port && crl_addr == 0 && data_addr == 0) {
|
||||
return fw_cfg_init_io(ctl_port);
|
||||
}
|
||||
if (ctl_port == 0 && data_port == 0 && crl_addr != 0 && data_addr != 0) {
|
||||
return fw_cfg_init_mem(crl_addr, data_addr);
|
||||
}
|
||||
assert(false);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
FWCfgState *fw_cfg_find(void)
|
||||
{
|
||||
return FW_CFG(object_resolve_path(FW_CFG_PATH, NULL));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue