Files
cubelinux-kernel/drivers/i2c/busses/i2c-piix4.h
T
Greg Kroah-Hartman 598cf27219 Linux 6.19.3
Link: https://lore.kernel.org/r/20260217200002.683975158@linuxfoundation.org
Tested-by: Florian Fainelli <florian.fainelli@broadcom.com>
Tested-by: Takeshi Ogasawara <takeshi.ogasawara@futuring-girl.com>
Tested-by: Peter Schneider <pschneider1968@googlemail.com>
Tested-by: Jon Hunter <jonathanh@nvidia.com>
Tested-by: Salvatore Bonaccorso <carnil@debian.org>
Tested-by: Brett A C Sheffield <bacs@librecast.net>
Tested-by: Mark Brown <broonie@kernel.org>
Tested-by: Luna Jernberg <droidbittin@gmail.com>
Tested-by: Ronald Warsow <rwarsow@gmx.de>
Tested-by: Justin M. Forbes <jforbes@fedoraproject.org>
Tested-by: Ron Economos <re@w6rz.net>
Tested-by: Miguel Ojeda <ojeda@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-02-19 16:33:27 +01:00

45 lines
1.3 KiB
C

/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
* PIIX4/SB800 SMBus Interfaces
*
* Copyright (c) 2024, Advanced Micro Devices, Inc.
* All Rights Reserved.
*
* Authors: Shyam Sundar S K <Shyam-sundar.S-k@amd.com>
* Sanket Goswami <Sanket.Goswami@amd.com>
*/
#ifndef I2C_PIIX4_H
#define I2C_PIIX4_H
#include <linux/types.h>
/* PIIX4 SMBus address offsets */
#define SMBHSTSTS (0x00 + piix4_smba)
#define SMBHSLVSTS (0x01 + piix4_smba)
#define SMBHSTCNT (0x02 + piix4_smba)
#define SMBHSTCMD (0x03 + piix4_smba)
#define SMBHSTADD (0x04 + piix4_smba)
#define SMBHSTDAT0 (0x05 + piix4_smba)
#define SMBHSTDAT1 (0x06 + piix4_smba)
#define SMBBLKDAT (0x07 + piix4_smba)
#define SMBSLVCNT (0x08 + piix4_smba)
#define SMBSHDWCMD (0x09 + piix4_smba)
#define SMBSLVEVT (0x0A + piix4_smba)
#define SMBSLVDAT (0x0C + piix4_smba)
/* PIIX4 constants */
#define PIIX4_BLOCK_DATA 0x14
struct sb800_mmio_cfg {
void __iomem *addr;
bool use_mmio;
};
int piix4_sb800_port_sel(u8 port, struct sb800_mmio_cfg *mmio_cfg);
int piix4_transaction(struct i2c_adapter *piix4_adapter, unsigned short piix4_smba);
int piix4_sb800_region_request(struct device *dev, struct sb800_mmio_cfg *mmio_cfg);
void piix4_sb800_region_release(struct device *dev, struct sb800_mmio_cfg *mmio_cfg);
#endif /* I2C_PIIX4_H */