mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43:54 -06:00
acpi: split out piix4 smbus routines from acpi.c into pm_smbus.c
Split out piix4 smbus routines from acpi.c into pm_smbus.c and use it. The split out smbus emulation will be used later. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Acked-by: Gerd Hoffmann <kraxel@redhat.com> Cc: Aurelien Jarno <aurelien@aurel32.net> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
This commit is contained in:
parent
dc6839100e
commit
fc0bdd995c
4 changed files with 209 additions and 156 deletions
21
hw/pm_smbus.h
Normal file
21
hw/pm_smbus.h
Normal file
|
@ -0,0 +1,21 @@
|
|||
#ifndef PM_SMBUS_H
|
||||
#define PM_SMBUS_H
|
||||
|
||||
typedef struct PMSMBus {
|
||||
i2c_bus *smbus;
|
||||
|
||||
uint8_t smb_stat;
|
||||
uint8_t smb_ctl;
|
||||
uint8_t smb_cmd;
|
||||
uint8_t smb_addr;
|
||||
uint8_t smb_data0;
|
||||
uint8_t smb_data1;
|
||||
uint8_t smb_data[32];
|
||||
uint8_t smb_index;
|
||||
} PMSMBus;
|
||||
|
||||
void pm_smbus_init(DeviceState *parent, PMSMBus *smb);
|
||||
void smb_ioport_writeb(void *opaque, uint32_t addr, uint32_t val);
|
||||
uint32_t smb_ioport_readb(void *opaque, uint32_t addr);
|
||||
|
||||
#endif /* !PM_SMBUS_H */
|
Loading…
Add table
Add a link
Reference in a new issue