mirror of
https://github.com/qemu/qemu.git
synced 2024-11-25 11:53:39 +08:00
fc0bdd995c
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>
22 lines
482 B
C
22 lines
482 B
C
#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 */
|