From a7bda63022068e69d6837698a94678c49cdf8fa9 Mon Sep 17 00:00:00 2001 From: OBattler Date: Fri, 9 Jul 2021 04:35:48 +0200 Subject: [PATCH] An unused smbus_piix4.h just to make merges easier. --- src/include/86box/smbus_piix4.h | 50 +++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 src/include/86box/smbus_piix4.h diff --git a/src/include/86box/smbus_piix4.h b/src/include/86box/smbus_piix4.h new file mode 100644 index 000000000..3173ead4e --- /dev/null +++ b/src/include/86box/smbus_piix4.h @@ -0,0 +1,50 @@ +/* + * 86Box A hypervisor and IBM PC system emulator that specializes in + * running old operating systems and software designed for IBM + * PC systems and compatibles from 1981 through fairly recent + * system designs based on the PCI bus. + * + * This file is part of the 86Box distribution. + * + * Definitions for the generic PIIX4-compatible SMBus host controller. + * + * + * + * Authors: RichardG, + * + * Copyright 2020 RichardG. + */ +#ifndef EMU_SMBUS_PIIX4_H +# define EMU_SMBUS_PIIX4_H + + +#define SMBUS_PIIX4_BLOCK_DATA_SIZE 32 +#define SMBUS_PIIX4_BLOCK_DATA_MASK (SMBUS_PIIX4_BLOCK_DATA_SIZE - 1) + + +enum { + SMBUS_PIIX4 = 0, + SMBUS_VIA +}; + +typedef struct { + uint32_t local; + uint16_t io_base; + uint8_t stat, next_stat, ctl, cmd, addr, + data0, data1, + index, data[SMBUS_PIIX4_BLOCK_DATA_SIZE]; + pc_timer_t response_timer; + void *i2c; +} smbus_piix4_t; + + +extern void smbus_piix4_remap(smbus_piix4_t *dev, uint16_t new_io_base, uint8_t enable); + + +#ifdef EMU_DEVICE_H +extern const device_t piix4_smbus_device; +extern const device_t via_smbus_device; +#endif + + +#endif /*EMU_SMBUS_PIIX4_H*/