Removing kernel 2.0 and 2.1 compatibility pass 2

Eliminated compat.h


git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@705 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
Frodo Looijaard committed 2000-01-24 20:07:29 +00:00
1 parent 9480bb5988
commit 888d32f50b
28 files changed
+187 -250

No files matched your search

+8 -17
View File
@@ -70,7 +70,6 @@
#include <linux/ioport.h>
#include <linux/i2c.h>
#include "version.h"
#include "compat.h"
#include <linux/init.h>
@@ -215,18 +214,15 @@ int ali15x3_setup(void)
if the lock bits are 1, but in fact the address registers
are zero unless you clear the lock bits.
*/
pci_read_config_byte_united(ALI15X3_dev, ALI15X3_bus ,ALI15X3_devfn,
SMBATPC, &temp);
pci_read_config_byte(ALI15X3_dev, SMBATPC, &temp);
if(temp & ALI15X3_LOCK)
{
temp &= ~ALI15X3_LOCK;
pci_write_config_byte_united(ALI15X3_dev, ALI15X3_bus ,ALI15X3_devfn,
SMBATPC, temp);
pci_write_config_byte(ALI15X3_dev, SMBATPC, temp);
}
/* Determine the address of the SMBus area */
pci_read_config_word_united(ALI15X3_dev, ALI15X3_bus ,ALI15X3_devfn,
SMBBA,&ali15x3_smba);
pci_read_config_word(ALI15X3_dev, SMBBA,&ali15x3_smba);
ali15x3_smba &= (0xffff & ~ (ALI15X3_SMB_IOSIZE - 1));
if(ali15x3_smba == 0) {
printk("i2c-ali15x3.o: ALI15X3_smb region uninitialized - upgrade BIOS?\n");
@@ -245,8 +241,7 @@ int ali15x3_setup(void)
goto END;
/* check if whole device is enabled */
pci_read_config_byte_united(ALI15X3_dev, ALI15X3_bus ,ALI15X3_devfn,
SMBCOM, &temp);
pci_read_config_byte(ALI15X3_dev, SMBCOM, &temp);
if ((temp & 1) == 0) {
printk("SMBUS: Error: SMB device not enabled - upgrade BIOS?\n");
error_return=-ENODEV;
@@ -254,8 +249,7 @@ int ali15x3_setup(void)
}
/* Is SMB Host controller enabled? */
pci_read_config_byte_united(ALI15X3_dev, ALI15X3_bus, ALI15X3_devfn,
SMBHSTCFG, &temp);
pci_read_config_byte(ALI15X3_dev, SMBHSTCFG, &temp);
#ifdef FORCE_ALI15X3_ENABLE
/* This should never need to be done.
NOTE: This assumes I/O space and other allocations WERE
@@ -263,8 +257,7 @@ int ali15x3_setup(void)
things after enabling this. :') Check for Bios updates before
resorting to this. */
if ((temp & 1) == 0) {
pci_write_config_byte_united(ALI15X3_dev, ALI15X3_bus, ALI15X3_devfn,
SMBHSTCFG, temp | 1);
pci_write_config_byte(ALI15X3_dev, SMBHSTCFG, temp | 1);
printk("i2c-ali15x3.o: WARNING: ALI15X3 SMBus interface has been FORCEFULLY "
"ENABLED!!\n");
}
@@ -277,8 +270,7 @@ int ali15x3_setup(void)
#endif /* FORCE_ALI15X3_ENABLE */
/* set SMB clock to 74KHz as recommended in data sheet */
pci_write_config_byte_united(ALI15X3_dev, ALI15X3_bus ,ALI15X3_devfn,
SMBCLK, 0x20);
pci_write_config_byte(ALI15X3_dev, SMBCLK, 0x20);
/* Everything is happy, let's grab the memory and set things up. */
request_region(ali15x3_smba, ALI15X3_SMB_IOSIZE, "ali15x3-smb");
@@ -291,8 +283,7 @@ int ali15x3_setup(void)
if ((....... & 0x0F) == 1)
printk("i2c-ali15x3.o: ALI15X3 using Interrupt 9 for SMBus.\n");
*/
pci_read_config_byte_united(ALI15X3_dev, ALI15X3_bus, ALI15X3_devfn, SMBREV,
&temp);
pci_read_config_byte(ALI15X3_dev, SMBREV, &temp);
printk("i2c-ali15x3.o: SMBREV = 0x%X\n",temp);
printk("i2c-ali15x3.o: ALI15X3_smba = 0x%X\n",ali15x3_smba);
#endif /* DEBUG */
+3 -7
View File
@@ -36,7 +36,6 @@
#include <linux/ioport.h>
#include <linux/i2c.h>
#include "version.h"
#include "compat.h"
#include <linux/init.h>
@@ -160,8 +159,7 @@ int amd756_setup(void)
/* Determine the address of the SMBus areas */
/* Technically it is a dword but... */
pci_read_config_word_united(AMD756_dev, AMD756_bus, AMD756_devfn,
SMBBA, &amd756_smba);
pci_read_config_word(AMD756_dev, SMBBA, &amd756_smba);
amd756_smba &= 0xfff0;
if (check_region(amd756_smba, 8)) {
@@ -170,8 +168,7 @@ int amd756_setup(void)
goto END;
}
pci_read_config_byte_united(AMD756_dev, AMD756_bus, AMD756_devfn,
SMBGCFG, &temp);
pci_read_config_byte(AMD756_dev, SMBGCFG, &temp);
if ((temp & 128) == 0) {
printk("SMBUS: Error: Host SMBus controller I/O not enabled!\n");
@@ -193,8 +190,7 @@ int amd756_setup(void)
"of date)!\n");
*/
pci_read_config_byte_united(AMD756_dev, AMD756_bus, AMD756_devfn, SMBREV,
&temp);
pci_read_config_byte(AMD756_dev, SMBREV, &temp);
printk("i2c-amd756.o: SMBREV = 0x%X\n",temp);
printk("i2c-amd756.o: AMD756_smba = 0x%X\n",amd756_smba);
#endif /* DEBUG */
-1
View File
@@ -34,7 +34,6 @@
#include <linux/i2c.h>
#include <linux/i2c-algo-bit.h>
#include "compat.h"
#include <linux/init.h>
+15 -15
View File
@@ -35,9 +35,16 @@
#include <linux/stddef.h>
#include <linux/sched.h>
#include <linux/ioport.h>
#include <linux/init.h>
#include <linux/i2c.h>
#include "version.h"
#include "compat.h"
#ifndef PCI_DEVICE_ID_INTEL_82801AA_3
#define PCI_DEVICE_ID_INTEL_82801AA_3 0x2413
#endif
#ifndef PCI_DEVICE_ID_INTEL_82801AB_3
#define PCI_DEVICE_ID_INTEL_82801AB_3 0x2423
#endif
/* I801 SMBus address offsets */
#define SMBHSTSTS (0 + i801_smba)
@@ -168,8 +175,7 @@ int i801_setup(void)
i801_smba = force_addr & 0xfff0;
force = 0;
} else {
pci_read_config_word_united(I801_dev, I801_bus ,I801_devfn,
SMBBA,&i801_smba);
pci_read_config_word(I801_dev, SMBBA,&i801_smba);
i801_smba &= 0xfff0;
}
@@ -179,17 +185,13 @@ int i801_setup(void)
goto END;
}
pci_read_config_byte_united(I801_dev, I801_bus, I801_devfn,
SMBHSTCFG, &temp);
pci_read_config_byte(I801_dev, SMBHSTCFG, &temp);
/* If force_addr is set, we program the new address here. Just to make
sure, we disable the I801 first. */
if (force_addr) {
pci_write_config_byte_united(I801_dev, I801_bus, I801_devfn,
SMBHSTCFG, temp & 0xfe);
pci_write_config_word_united(I801_dev, I801_bus ,I801_devfn,
SMBBA,i801_smba);
pci_write_config_byte_united(I801_dev, I801_bus, I801_devfn,
SMBHSTCFG, temp | 0x01);
pci_write_config_byte(I801_dev, SMBHSTCFG, temp & 0xfe);
pci_write_config_word(I801_dev, SMBBA,i801_smba);
pci_write_config_byte(I801_dev, SMBHSTCFG, temp | 0x01);
printk("i2c-i801.o: WARNING: I801 SMBus interface set to new "
"address %04x!\n",i801_smba);
} else if ((temp & 1) == 0) {
@@ -200,8 +202,7 @@ int i801_setup(void)
done by the Bios! Don't complain if your hardware does weird
things after enabling this. :') Check for Bios updates before
resorting to this. */
pci_write_config_byte_united(I801_dev, I801_bus, I801_devfn,
SMBHSTCFG, temp | 1);
pci_write_config_byte(I801_dev, SMBHSTCFG, temp | 1);
printk("i2c-i801.o: WARNING: I801 SMBus interface has been FORCEFULLY "
"ENABLED!\n");
} else {
@@ -222,8 +223,7 @@ int i801_setup(void)
else
printk("i2c-i801.o: I801 using PCI Interrupt for SMBus.\n");
pci_read_config_byte_united(I801_dev, I801_bus, I801_devfn, SMBREV,
&temp);
pci_read_config_byte(I801_dev, SMBREV, &temp);
printk("i2c-i801.o: SMBREV = 0x%X\n",temp);
printk("i2c-i801.o: I801_smba = 0x%X\n",i801_smba);
#endif /* DEBUG */
-1
View File
@@ -30,7 +30,6 @@
#include <linux/i2c.h>
#include "compat.h"
#include <linux/init.h>
+7 -15
View File
@@ -31,7 +31,6 @@
#include <linux/ioport.h>
#include <linux/i2c.h>
#include "version.h"
#include "compat.h"
#include <linux/init.h>
@@ -168,8 +167,7 @@ int piix4_setup(void)
force = 0;
} else {
pci_read_config_word_united(PIIX4_dev, PIIX4_bus ,PIIX4_devfn,
SMBBA,&piix4_smba);
pci_read_config_word(PIIX4_dev, SMBBA,&piix4_smba);
piix4_smba &= 0xfff0;
}
@@ -179,17 +177,13 @@ int piix4_setup(void)
goto END;
}
pci_read_config_byte_united(PIIX4_dev, PIIX4_bus, PIIX4_devfn,
SMBHSTCFG, &temp);
pci_read_config_byte(PIIX4_dev, SMBHSTCFG, &temp);
/* If force_addr is set, we program the new address here. Just to make
sure, we disable the PIIX4 first. */
if (force_addr) {
pci_write_config_byte_united(PIIX4_dev, PIIX4_bus, PIIX4_devfn,
SMBHSTCFG, temp & 0xfe);
pci_write_config_word_united(PIIX4_dev, PIIX4_bus ,PIIX4_devfn,
SMBBA,piix4_smba);
pci_write_config_byte_united(PIIX4_dev, PIIX4_bus, PIIX4_devfn,
SMBHSTCFG, temp | 0x01);
pci_write_config_byte(PIIX4_dev, SMBHSTCFG, temp & 0xfe);
pci_write_config_word(PIIX4_dev, SMBBA,piix4_smba);
pci_write_config_byte(PIIX4_dev, SMBHSTCFG, temp | 0x01);
printk("i2c-piix4.o: WARNING: PIIX4 SMBus interface set to new "
"address %04x!\n",piix4_smba);
} else if ((temp & 1) == 0) {
@@ -200,8 +194,7 @@ int piix4_setup(void)
done by the Bios! Don't complain if your hardware does weird
things after enabling this. :') Check for Bios updates before
resorting to this. */
pci_write_config_byte_united(PIIX4_dev, PIIX4_bus, PIIX4_devfn,
SMBHSTCFG, temp | 1);
pci_write_config_byte(PIIX4_dev, SMBHSTCFG, temp | 1);
printk("i2c-piix4.o: WARNING: PIIX4 SMBus interface has been FORCEFULLY "
"ENABLED!\n");
} else {
@@ -223,8 +216,7 @@ int piix4_setup(void)
printk("i2c-piix4.o: PIIX4: Illegal Interrupt configuration (or code out "
"of date)!\n");
pci_read_config_byte_united(PIIX4_dev, PIIX4_bus, PIIX4_devfn, SMBREV,
&temp);
pci_read_config_byte(PIIX4_dev, SMBREV, &temp);
printk("i2c-piix4.o: SMBREV = 0x%X\n",temp);
printk("i2c-piix4.o: PIIX4_smba = 0x%X\n",piix4_smba);
#endif /* DEBUG */
+1 -3
View File
@@ -36,7 +36,6 @@
#include <linux/ioport.h>
#include <linux/i2c.h>
#include "version.h"
#include "compat.h"
#include <linux/init.h>
@@ -160,8 +159,7 @@ int sis5595_setup(void)
}
/* Determine the address of the SMBus areas */
pci_read_config_word_united(SIS5595_dev, SIS5595_bus ,SIS5595_devfn,
ACPI_BASE,&sis5595_base);
pci_read_config_word(SIS5595_dev, ACPI_BASE,&sis5595_base);
#ifdef DEBUG
printk("ACPI Base address: %04x\n",sis5595_base);
#endif
-1
View File
@@ -31,7 +31,6 @@
#include <linux/i2c.h>
#include <linux/i2c-algo-bit.h>
#include "compat.h"
#include <linux/init.h>
+8 -17
View File
@@ -31,7 +31,6 @@
#include <linux/ioport.h>
#include <linux/i2c.h>
#include "version.h"
#include "compat.h"
#include <linux/init.h>
@@ -180,12 +179,10 @@ int vt596_setup(void)
}
/* Determine the configuration space registers for the SMBus areas */
if ((! pci_read_config_word_united(VT596_dev, VT596_bus ,VT596_devfn,
SMBBA1, &vt596_smba)) && (vt596_smba & 0x1)) {
if ((! pci_read_config_word(VT596_dev, SMBBA1, &vt596_smba)) && (vt596_smba & 0x1)) {
smb_cf_base = SMBBA1;
smb_cf_hstcfg = 0xD2;
} else if ((! pci_read_config_word_united(VT596_dev, VT596_bus ,VT596_devfn,
SMBBA2, &vt596_smba)) && (vt596_smba & 0x1)) {
} else if ((! pci_read_config_word(VT596_dev, SMBBA2, &vt596_smba)) && (vt596_smba & 0x1)) {
smb_cf_base = SMBBA2;
smb_cf_hstcfg = 0x84;
} else {
@@ -208,17 +205,13 @@ int vt596_setup(void)
goto END;
}
pci_read_config_byte_united(VT596_dev, VT596_bus, VT596_devfn,
SMBHSTCFG, &temp);
pci_read_config_byte(VT596_dev, SMBHSTCFG, &temp);
/* If force_addr is set, we program the new address here. Just to make
sure, we disable the VT596 first. */
if (force_addr) {
pci_write_config_byte_united(VT596_dev, VT596_bus, VT596_devfn,
SMBHSTCFG, temp & 0xfe);
pci_write_config_word_united(VT596_dev, VT596_bus ,VT596_devfn,
SMBBA,vt596_smba);
pci_write_config_byte_united(VT596_dev, VT596_bus, VT596_devfn,
SMBHSTCFG, temp | 0x01);
pci_write_config_byte(VT596_dev, SMBHSTCFG, temp & 0xfe);
pci_write_config_word(VT596_dev, SMBBA,vt596_smba);
pci_write_config_byte(VT596_dev, SMBHSTCFG, temp | 0x01);
printk("i2c-viapro.o: WARNING: VT596 SMBus interface set to new "
"address %04x!\n",vt596_smba);
} else if ((temp & 1) == 0) {
@@ -227,8 +220,7 @@ int vt596_setup(void)
done by the Bios! Don't complain if your hardware does weird
things after enabling this. :') Check for Bios updates before
resorting to this. */
pci_write_config_byte_united(VT596_dev, VT596_bus, VT596_devfn,
SMBHSTCFG, temp | 1);
pci_write_config_byte(VT596_dev, SMBHSTCFG, temp | 1);
printk("i2c-viapro.o: WARNING: SMBus interface has been FORCEFULLY "
"ENABLED!\n");
} else {
@@ -250,8 +242,7 @@ int vt596_setup(void)
printk("i2c-viapro.o: Illegal Interrupt configuration (or code out "
"of date)!\n");
pci_read_config_byte_united(VT596_dev, VT596_bus, VT596_devfn, SMBREV,
&temp);
pci_read_config_byte(VT596_dev, SMBREV, &temp);
printk("i2c-viapro.o: SMBREV = 0x%X\n",temp);
printk("i2c-viapro.o: VT596_smba = 0x%X\n",vt596_smba);
#endif /* DEBUG */
-1
View File
@@ -40,7 +40,6 @@
#include <linux/delay.h>
#include <linux/i2c.h>
#include "version.h"
#include "compat.h"
#include <linux/init.h>