* [patch 1/1] i2c: add support for new AMD SMBus devices
@ 2009-08-06 23:02 akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b
[not found] ` <200908062302.n76N21kf031351-AB4EexQrvXRQetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org>
0 siblings, 1 reply; 2+ messages in thread
From: akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b @ 2009-08-06 23:02 UTC (permalink / raw)
To: khali-PUYAD+kWke1g9hUCZPvPmw
Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA,
akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b, crane.cai-5C7GfCeVMHo
From: Crane Cai <crane.cai-5C7GfCeVMHo@public.gmane.org>
Use driver to detect SMBus devices with Vendor ID AMD and class code is
SMBus.
Signed-off-by: Crane Cai <crane.cai-5C7GfCeVMHo@public.gmane.org>
Signed-off-by: Andrew Morton <akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>
---
drivers/i2c/busses/i2c-piix4.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff -puN drivers/i2c/busses/i2c-piix4.c~i2c-add-support-for-new-amd-smbus-devices drivers/i2c/busses/i2c-piix4.c
--- a/drivers/i2c/busses/i2c-piix4.c~i2c-add-support-for-new-amd-smbus-devices
+++ a/drivers/i2c/busses/i2c-piix4.c
@@ -479,6 +479,10 @@ static struct pci_device_id piix4_ids[]
{ PCI_DEVICE(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_IXP300_SMBUS) },
{ PCI_DEVICE(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_IXP400_SMBUS) },
{ PCI_DEVICE(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_SBX00_SMBUS) },
+ /* AMD Generic, PCI class code and Vendor ID for SMBus */
+ { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_ANY_ID),
+ .class = PCI_CLASS_SERIAL_SMBUS << 8,
+ .class_mask = 0xffffff },
{ PCI_DEVICE(PCI_VENDOR_ID_SERVERWORKS,
PCI_DEVICE_ID_SERVERWORKS_OSB4) },
{ PCI_DEVICE(PCI_VENDOR_ID_SERVERWORKS,
@@ -499,9 +503,10 @@ static int __devinit piix4_probe(struct
{
int retval;
- if ((dev->vendor == PCI_VENDOR_ID_ATI) &&
+ if (((dev->vendor == PCI_VENDOR_ID_ATI) &&
(dev->device == PCI_DEVICE_ID_ATI_SBX00_SMBUS) &&
- (dev->revision >= 0x40))
+ (dev->revision >= 0x40)) ||
+ dev->vendor == PCI_VENDOR_ID_AMD)
/* base address location etc changed in SB800 */
retval = piix4_setup_sb800(dev, id);
else
_
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [patch 1/1] i2c: add support for new AMD SMBus devices
[not found] ` <200908062302.n76N21kf031351-AB4EexQrvXRQetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org>
@ 2009-09-09 7:46 ` Jean Delvare
0 siblings, 0 replies; 2+ messages in thread
From: Jean Delvare @ 2009-09-09 7:46 UTC (permalink / raw)
To: akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b
Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA, crane.cai-5C7GfCeVMHo
On Thu, 06 Aug 2009 16:02:00 -0700, akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org wrote:
> From: Crane Cai <crane.cai-5C7GfCeVMHo@public.gmane.org>
>
> Use driver to detect SMBus devices with Vendor ID AMD and class code is
> SMBus.
>
> Signed-off-by: Crane Cai <crane.cai-5C7GfCeVMHo@public.gmane.org>
> Signed-off-by: Andrew Morton <akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>
> ---
>
> drivers/i2c/busses/i2c-piix4.c | 9 +++++++--
> 1 file changed, 7 insertions(+), 2 deletions(-)
>
> diff -puN drivers/i2c/busses/i2c-piix4.c~i2c-add-support-for-new-amd-smbus-devices drivers/i2c/busses/i2c-piix4.c
> --- a/drivers/i2c/busses/i2c-piix4.c~i2c-add-support-for-new-amd-smbus-devices
> +++ a/drivers/i2c/busses/i2c-piix4.c
> @@ -479,6 +479,10 @@ static struct pci_device_id piix4_ids[]
> { PCI_DEVICE(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_IXP300_SMBUS) },
> { PCI_DEVICE(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_IXP400_SMBUS) },
> { PCI_DEVICE(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_SBX00_SMBUS) },
> + /* AMD Generic, PCI class code and Vendor ID for SMBus */
> + { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_ANY_ID),
> + .class = PCI_CLASS_SERIAL_SMBUS << 8,
> + .class_mask = 0xffffff },
> { PCI_DEVICE(PCI_VENDOR_ID_SERVERWORKS,
> PCI_DEVICE_ID_SERVERWORKS_OSB4) },
> { PCI_DEVICE(PCI_VENDOR_ID_SERVERWORKS,
> @@ -499,9 +503,10 @@ static int __devinit piix4_probe(struct
> {
> int retval;
>
> - if ((dev->vendor == PCI_VENDOR_ID_ATI) &&
> + if (((dev->vendor == PCI_VENDOR_ID_ATI) &&
> (dev->device == PCI_DEVICE_ID_ATI_SBX00_SMBUS) &&
> - (dev->revision >= 0x40))
> + (dev->revision >= 0x40)) ||
> + dev->vendor == PCI_VENDOR_ID_AMD)
> /* base address location etc changed in SB800 */
> retval = piix4_setup_sb800(dev, id);
> else
Nack:
http://marc.info/?l=linux-i2c&m=124947951705788&w=2
--
Jean Delvare
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-09-09 7:46 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-06 23:02 [patch 1/1] i2c: add support for new AMD SMBus devices akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b
[not found] ` <200908062302.n76N21kf031351-AB4EexQrvXRQetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org>
2009-09-09 7:46 ` Jean Delvare
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).