linux/drivers/i2c/busses/i2c-amd756.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
    Copyright (c) 1999-2002 Merlin Hughes <[email protected]>

    Shamelessly ripped from i2c-piix4.c:

    Copyright (c) 1998, 1999  Frodo Looijaard <[email protected]> and
    Philip Edelbrock <[email protected]>

*/

/*
    2002-04-08: Added nForce support. (Csaba Halasz)
    2002-10-03: Fixed nForce PnP I/O port. (Michael Steil)
    2002-12-28: Rewritten into something that resembles a Linux driver (hch)
    2003-11-29: Added back AMD8111 removed by the previous rewrite.
                (Philip Pokorny)
*/

/*
   Supports AMD756, AMD766, AMD768, AMD8111 and nVidia nForce
   Note: we assume there can only be one device, with one SMBus interface.
*/

#include <linux/module.h>
#include <linux/pci.h>
#include <linux/kernel.h>
#include <linux/delay.h>
#include <linux/stddef.h>
#include <linux/ioport.h>
#include <linux/i2c.h>
#include <linux/acpi.h>
#include <linux/io.h>

/* AMD756 SMBus address offsets */
#define SMB_ADDR_OFFSET
#define SMB_IOSIZE
#define SMB_GLOBAL_STATUS
#define SMB_GLOBAL_ENABLE
#define SMB_HOST_ADDRESS
#define SMB_HOST_DATA
#define SMB_HOST_COMMAND
#define SMB_HOST_BLOCK_DATA
#define SMB_HAS_DATA
#define SMB_HAS_DEVICE_ADDRESS
#define SMB_HAS_HOST_ADDRESS
#define SMB_SNOOP_ADDRESS

/* PCI Address Constants */

/* address of I/O space */
#define SMBBA
#define SMBBANFORCE

/* general configuration */
#define SMBGCFG

/* silicon revision code */
#define SMBREV

/* Other settings */
#define MAX_TIMEOUT

/* AMD756 constants */
#define AMD756_QUICK
#define AMD756_BYTE
#define AMD756_BYTE_DATA
#define AMD756_WORD_DATA
#define AMD756_PROCESS_CALL
#define AMD756_BLOCK_DATA

static struct pci_driver amd756_driver;
static unsigned short amd756_ioport;

/* 
  SMBUS event = I/O 28-29 bit 11
     see E0 for the status bits and enabled in E2
     
*/
#define GS_ABRT_STS
#define GS_COL_STS
#define GS_PRERR_STS
#define GS_HST_STS
#define GS_HCYC_STS
#define GS_TO_STS
#define GS_SMB_STS

#define GS_CLEAR_STS

#define GE_CYC_TYPE_MASK
#define GE_HOST_STC
#define GE_ABORT


static int amd756_transaction(struct i2c_adapter *adap)
{}

/* Return negative errno on error. */
static s32 amd756_access(struct i2c_adapter * adap, u16 addr,
		  unsigned short flags, char read_write,
		  u8 command, int size, union i2c_smbus_data * data)
{}

static u32 amd756_func(struct i2c_adapter *adapter)
{}

static const struct i2c_algorithm smbus_algorithm =;

struct i2c_adapter amd756_smbus =;

enum chiptype {};
static const char* chipname[] =;

static const struct pci_device_id amd756_ids[] =;

MODULE_DEVICE_TABLE (pci, amd756_ids);

static int amd756_probe(struct pci_dev *pdev, const struct pci_device_id *id)
{}

static void amd756_remove(struct pci_dev *dev)
{}

static struct pci_driver amd756_driver =;

module_pci_driver();

MODULE_AUTHOR();
MODULE_DESCRIPTION();
MODULE_LICENSE();

EXPORT_SYMBOL();