* [PATCH 2.6] i2c-nforce2.c add support for nForce3 Pro 150 MCP
[not found] ` <hKBrMfMm.1100605629.3776330.khali@gcu.info>
@ 2004-11-16 21:13 ` Thomas Leibold
2004-11-16 21:25 ` Jean Delvare
0 siblings, 1 reply; 4+ messages in thread
From: Thomas Leibold @ 2004-11-16 21:13 UTC (permalink / raw)
To: Greg KH; +Cc: sensors, Jean Delvare, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 895 bytes --]
Hi Greg,
This patch applies to linux 2.6.10-RC1. I tried to follow the procedures
in Documentation/SubmittingPatches and I hope I got everything right.
Signed-off-by: Thomas Leibold <thomas@plx.com>
Thanks
Thomas
>
> Hi Thomas,
>
>> This patch adds recognition of the PCI-Id for the nForce3 Pro 150 MCP
>> to the i2c-nforce2.c bus driver. I have tested this simple patch on
>> ASUS A7N8X-deluxe (nforce2, i386) and ASUS SK8N (nforce3, x86-64).
>>
>> On the ASUS SK8N the hardware monitoring is done with a IT8712F-A chip
>> on the ISA bus, so the only use for accessing the 2 SMBUS interfaces
>> in the nForce3 MCP is to read the SPD eeprom in the memory modules.
>>
>> I don't know if this works for other chips in the nForce3 family.
>
> Patch looks good and simple, I'll apply it this evening.
>
> Would you consider providing a similar patch to Greg for Linux 2.6?
>
> Thanks,
> Jean
>
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: nforce3_patch --]
[-- Type: text/x-diff; name="nforce3_patch", Size: 2877 bytes --]
diff -uprN linux-2.6.10-rc1/drivers/i2c/busses/i2c-nforce2.c patched/drivers/i2c/busses/i2c-nforce2.c
--- linux-2.6.10-rc1/drivers/i2c/busses/i2c-nforce2.c 2004-11-16 10:22:09.728664352 -0800
+++ patched/drivers/i2c/busses/i2c-nforce2.c 2004-11-16 11:31:01.957470088 -0800
@@ -1,6 +1,7 @@
/*
SMBus driver for nVidia nForce2 MCP
+ Added nForce3 Pro 150 Thomas Leibold <thomas@plx.com>,
Ported to 2.5 Patrick Dreker <patrick@dreker.de>,
Copyright (c) 2003 Hans-Frieder Vogt <hfvogt@arcor.de>,
Based on
@@ -25,6 +26,7 @@
/*
SUPPORTED DEVICES PCI ID
nForce2 MCP 0064
+ nForce3 Pro150 MCP 00D4
This driver supports the 2 SMBuses that are included in the MCP2 of the
nForce2 chipset.
@@ -53,6 +55,10 @@ MODULE_DESCRIPTION("nForce2 SMBus driver
#define PCI_DEVICE_ID_NVIDIA_NFORCE2_SMBUS 0x0064
#endif
+#ifndef PCI_DEVICE_ID_NVIDIA_NFORCE3_SMBUS
+#define PCI_DEVICE_ID_NVIDIA_NFORCE3_SMBUS 0x00D4
+#endif
+
struct nforce2_smbus {
struct pci_dev *dev;
@@ -294,6 +300,8 @@ static u32 nforce2_func(struct i2c_adapt
static struct pci_device_id nforce2_ids[] = {
{ PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE2_SMBUS,
PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
+ { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE3_SMBUS,
+ PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
{ 0 }
};
diff -uprN linux-2.6.10-rc1/drivers/i2c/busses/Kconfig patched/drivers/i2c/busses/Kconfig
--- linux-2.6.10-rc1/drivers/i2c/busses/Kconfig 2004-11-16 10:22:09.723665112 -0800
+++ patched/drivers/i2c/busses/Kconfig 2004-11-16 11:01:18.162648120 -0800
@@ -205,6 +205,7 @@ config I2C_NFORCE2
help
If you say yes to this option, support will be included for the Nvidia
Nforce2 family of mainboard I2C interfaces.
+ This driver also supports the nForce3 Pro 150 MCP.
This driver can also be built as a module. If so, the module
will be called i2c-nforce2.
diff -uprN linux-2.6.10-rc1/include/linux/pci_ids.h patched/include/linux/pci_ids.h
--- linux-2.6.10-rc1/include/linux/pci_ids.h 2004-11-16 10:22:15.000000000 -0800
+++ patched/include/linux/pci_ids.h 2004-11-16 11:21:28.223690880 -0800
@@ -1081,6 +1081,7 @@
#define PCI_DEVICE_ID_NVIDIA_NVENET_8 0x0056
#define PCI_DEVICE_ID_NVIDIA_NVENET_9 0x0057
#define PCI_DEVICE_ID_NVIDIA_CK804_AUDIO 0x0059
+#define PCI_DEVICE_ID_NVIDIA_NFORCE2_SMBUS 0x0064
#define PCI_DEVICE_ID_NVIDIA_NFORCE2_IDE 0x0065
#define PCI_DEVICE_ID_NVIDIA_NVENET_2 0x0066
#define PCI_DEVICE_ID_NVIDIA_MCP2_AUDIO 0x006a
@@ -1092,6 +1093,7 @@
#define PCI_DEVICE_ID_NVIDIA_NFORCE3 0x00d1
#define PCI_DEVICE_ID_NVIDIA_MCP3_AUDIO 0x00da
#define PCI_DEVICE_ID_NVIDIA_NFORCE3S 0x00e1
+#define PCI_DEVICE_ID_NVIDIA_NFORCE3_SMBUS 0x00d4
#define PCI_DEVICE_ID_NVIDIA_NFORCE3_IDE 0x00d5
#define PCI_DEVICE_ID_NVIDIA_NVENET_3 0x00d6
#define PCI_DEVICE_ID_NVIDIA_MCP3_AUDIO 0x00da
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 2.6] i2c-nforce2.c add support for nForce3 Pro 150 MCP
2004-11-16 21:13 ` [PATCH 2.6] i2c-nforce2.c add support for nForce3 Pro 150 MCP Thomas Leibold
@ 2004-11-16 21:25 ` Jean Delvare
2004-11-18 10:23 ` Thomas Leibold
0 siblings, 1 reply; 4+ messages in thread
From: Jean Delvare @ 2004-11-16 21:25 UTC (permalink / raw)
To: Thomas Leibold; +Cc: greg, sensors, linux-kernel
(As a side note I applied your 2.4 patch to lm_sensors CVS.)
> This patch applies to linux 2.6.10-RC1. I tried to follow the
> procedures in Documentation/SubmittingPatches and I hope I got
> everything right.
Looks good to me except:
> @@ -53,6 +55,10 @@ MODULE_DESCRIPTION("nForce2 SMBus driver
> #define PCI_DEVICE_ID_NVIDIA_NFORCE2_SMBUS 0x0064
> #endif
>
> +#ifndef PCI_DEVICE_ID_NVIDIA_NFORCE3_SMBUS
> +#define PCI_DEVICE_ID_NVIDIA_NFORCE3_SMBUS 0x00D4
> +#endif
> +
> (...)
> --- linux-2.6.10-rc1/include/linux/pci_ids.h 2004-11-16 10:22:15.000000000 -0800
> +++ patched/include/linux/pci_ids.h 2004-11-16 11:21:28.223690880 -0800
> @@ -1081,6 +1081,7 @@
> #define PCI_DEVICE_ID_NVIDIA_NVENET_8 0x0056
> #define PCI_DEVICE_ID_NVIDIA_NVENET_9 0x0057
> #define PCI_DEVICE_ID_NVIDIA_CK804_AUDIO 0x0059
> +#define PCI_DEVICE_ID_NVIDIA_NFORCE2_SMBUS 0x0064
> #define PCI_DEVICE_ID_NVIDIA_NFORCE2_IDE 0x0065
> #define PCI_DEVICE_ID_NVIDIA_NVENET_2 0x0066
> #define PCI_DEVICE_ID_NVIDIA_MCP2_AUDIO 0x006a
> @@ -1092,6 +1093,7 @@
> #define PCI_DEVICE_ID_NVIDIA_NFORCE3 0x00d1
> #define PCI_DEVICE_ID_NVIDIA_MCP3_AUDIO 0x00da
> #define PCI_DEVICE_ID_NVIDIA_NFORCE3S 0x00e1
> +#define PCI_DEVICE_ID_NVIDIA_NFORCE3_SMBUS 0x00d4
> #define PCI_DEVICE_ID_NVIDIA_NFORCE3_IDE 0x00d5
> #define PCI_DEVICE_ID_NVIDIA_NVENET_3 0x00d6
> #define PCI_DEVICE_ID_NVIDIA_MCP3_AUDIO 0x00da
You're correct that the IDs are better added to pci_ids.h, but then the
ifndef blocks in the driver become useless and can be discarded.
Thanks.
--
Jean Delvare
http://khali.linux-fr.org/
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 2.6] i2c-nforce2.c add support for nForce3 Pro 150 MCP
2004-11-16 21:25 ` Jean Delvare
@ 2004-11-18 10:23 ` Thomas Leibold
2004-11-19 17:12 ` Greg KH
0 siblings, 1 reply; 4+ messages in thread
From: Thomas Leibold @ 2004-11-18 10:23 UTC (permalink / raw)
To: greg; +Cc: sensors, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 1967 bytes --]
Hi Greg,
This is the all new and improved version of the patch:
- following the advise from Jean Delvare I removed the redundant definition
of the PCI IDs from the driver and just add them to the pci_ids.h file.
- the patch is now created against linux 2.6.10-RC2.
Signed-off-by: Thomas Leibold <thomas@plx.com>
> (As a side note I applied your 2.4 patch to lm_sensors CVS.)
>
>> This patch applies to linux 2.6.10-RC1. I tried to follow the
>> procedures in Documentation/SubmittingPatches and I hope I got
>> everything right.
>
> Looks good to me except:
>
>> @@ -53,6 +55,10 @@ MODULE_DESCRIPTION("nForce2 SMBus driver
>> #define PCI_DEVICE_ID_NVIDIA_NFORCE2_SMBUS 0x0064
>> #endif
>>
>> +#ifndef PCI_DEVICE_ID_NVIDIA_NFORCE3_SMBUS
>> +#define PCI_DEVICE_ID_NVIDIA_NFORCE3_SMBUS 0x00D4
>> +#endif
>> +
>> (...)
>> --- linux-2.6.10-rc1/include/linux/pci_ids.h 2004-11-16
>> 10:22:15.000000000 -0800
>> +++ patched/include/linux/pci_ids.h 2004-11-16 11:21:28.223690880 -0800
>> @@ -1081,6 +1081,7 @@
>> #define PCI_DEVICE_ID_NVIDIA_NVENET_8 0x0056
>> #define PCI_DEVICE_ID_NVIDIA_NVENET_9 0x0057
>> #define PCI_DEVICE_ID_NVIDIA_CK804_AUDIO 0x0059
>> +#define PCI_DEVICE_ID_NVIDIA_NFORCE2_SMBUS 0x0064
>> #define PCI_DEVICE_ID_NVIDIA_NFORCE2_IDE 0x0065
>> #define PCI_DEVICE_ID_NVIDIA_NVENET_2 0x0066
>> #define PCI_DEVICE_ID_NVIDIA_MCP2_AUDIO 0x006a
>> @@ -1092,6 +1093,7 @@
>> #define PCI_DEVICE_ID_NVIDIA_NFORCE3 0x00d1
>> #define PCI_DEVICE_ID_NVIDIA_MCP3_AUDIO 0x00da
>> #define PCI_DEVICE_ID_NVIDIA_NFORCE3S 0x00e1
>> +#define PCI_DEVICE_ID_NVIDIA_NFORCE3_SMBUS 0x00d4
>> #define PCI_DEVICE_ID_NVIDIA_NFORCE3_IDE 0x00d5
>> #define PCI_DEVICE_ID_NVIDIA_NVENET_3 0x00d6
>> #define PCI_DEVICE_ID_NVIDIA_MCP3_AUDIO 0x00da
>
>
> You're correct that the IDs are better added to pci_ids.h, but then the
> ifndef blocks in the driver become useless and can be discarded.
>
> Thanks.
>
> --
> Jean Delvare
> http://khali.linux-fr.org/
>
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: nforce3_patch --]
[-- Type: text/x-diff; name="nforce3_patch", Size: 2893 bytes --]
diff -urpN linux-2.6.10-rc2/drivers/i2c/busses/i2c-nforce2.c patched/drivers/i2c/busses/i2c-nforce2.c
--- linux-2.6.10-rc2/drivers/i2c/busses/i2c-nforce2.c 2004-11-18 01:13:39.447996576 -0800
+++ patched/drivers/i2c/busses/i2c-nforce2.c 2004-11-18 01:23:36.653207584 -0800
@@ -1,6 +1,7 @@
/*
SMBus driver for nVidia nForce2 MCP
+ Added nForce3 Pro 150 Thomas Leibold <thomas@plx.com>,
Ported to 2.5 Patrick Dreker <patrick@dreker.de>,
Copyright (c) 2003 Hans-Frieder Vogt <hfvogt@arcor.de>,
Based on
@@ -25,6 +26,7 @@
/*
SUPPORTED DEVICES PCI ID
nForce2 MCP 0064
+ nForce3 Pro150 MCP 00D4
This driver supports the 2 SMBuses that are included in the MCP2 of the
nForce2 chipset.
@@ -49,11 +51,6 @@ MODULE_AUTHOR ("Hans-Frieder Vogt <hfvog
MODULE_DESCRIPTION("nForce2 SMBus driver");
-#ifndef PCI_DEVICE_ID_NVIDIA_NFORCE2_SMBUS
-#define PCI_DEVICE_ID_NVIDIA_NFORCE2_SMBUS 0x0064
-#endif
-
-
struct nforce2_smbus {
struct pci_dev *dev;
struct i2c_adapter adapter;
@@ -294,6 +291,8 @@ static u32 nforce2_func(struct i2c_adapt
static struct pci_device_id nforce2_ids[] = {
{ PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE2_SMBUS,
PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
+ { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE3_SMBUS,
+ PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
{ 0 }
};
diff -urpN linux-2.6.10-rc2/drivers/i2c/busses/Kconfig patched/drivers/i2c/busses/Kconfig
--- linux-2.6.10-rc2/drivers/i2c/busses/Kconfig 2004-11-18 01:13:39.441997488 -0800
+++ patched/drivers/i2c/busses/Kconfig 2004-11-18 01:22:05.742028184 -0800
@@ -218,6 +218,7 @@ config I2C_NFORCE2
help
If you say yes to this option, support will be included for the Nvidia
Nforce2 family of mainboard I2C interfaces.
+ This driver also supports the nForce3 Pro 150 MCP.
This driver can also be built as a module. If so, the module
will be called i2c-nforce2.
diff -urpN linux-2.6.10-rc2/include/linux/pci_ids.h patched/include/linux/pci_ids.h
--- linux-2.6.10-rc2/include/linux/pci_ids.h 2004-11-18 01:13:40.940769640 -0800
+++ patched/include/linux/pci_ids.h 2004-11-18 01:22:05.743028032 -0800
@@ -1082,6 +1082,7 @@
#define PCI_DEVICE_ID_NVIDIA_NVENET_8 0x0056
#define PCI_DEVICE_ID_NVIDIA_NVENET_9 0x0057
#define PCI_DEVICE_ID_NVIDIA_CK804_AUDIO 0x0059
+#define PCI_DEVICE_ID_NVIDIA_NFORCE2_SMBUS 0x0064
#define PCI_DEVICE_ID_NVIDIA_NFORCE2_IDE 0x0065
#define PCI_DEVICE_ID_NVIDIA_NVENET_2 0x0066
#define PCI_DEVICE_ID_NVIDIA_MCP2_AUDIO 0x006a
@@ -1093,6 +1094,7 @@
#define PCI_DEVICE_ID_NVIDIA_NFORCE3 0x00d1
#define PCI_DEVICE_ID_NVIDIA_MCP3_AUDIO 0x00da
#define PCI_DEVICE_ID_NVIDIA_NFORCE3S 0x00e1
+#define PCI_DEVICE_ID_NVIDIA_NFORCE3_SMBUS 0x00d4
#define PCI_DEVICE_ID_NVIDIA_NFORCE3_IDE 0x00d5
#define PCI_DEVICE_ID_NVIDIA_NVENET_3 0x00d6
#define PCI_DEVICE_ID_NVIDIA_MCP3_AUDIO 0x00da
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 2.6] i2c-nforce2.c add support for nForce3 Pro 150 MCP
2004-11-18 10:23 ` Thomas Leibold
@ 2004-11-19 17:12 ` Greg KH
0 siblings, 0 replies; 4+ messages in thread
From: Greg KH @ 2004-11-19 17:12 UTC (permalink / raw)
To: Thomas Leibold; +Cc: sensors, linux-kernel
On Thu, Nov 18, 2004 at 02:23:43AM -0800, Thomas Leibold wrote:
> Hi Greg,
>
> This is the all new and improved version of the patch:
> - following the advise from Jean Delvare I removed the redundant definition
> of the PCI IDs from the driver and just add them to the pci_ids.h file.
> - the patch is now created against linux 2.6.10-RC2.
>
> Signed-off-by: Thomas Leibold <thomas@plx.com>
Applied, thanks.
greg k-h
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2004-11-19 17:21 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <36129.192.168.0.19.1100598647.squirrel@192.168.0.12>
[not found] ` <hKBrMfMm.1100605629.3776330.khali@gcu.info>
2004-11-16 21:13 ` [PATCH 2.6] i2c-nforce2.c add support for nForce3 Pro 150 MCP Thomas Leibold
2004-11-16 21:25 ` Jean Delvare
2004-11-18 10:23 ` Thomas Leibold
2004-11-19 17:12 ` Greg KH
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox