Skip to contentSkip to conversation

pci_ids: Add AMD KERNCZ device ID support

PATCH Applied Wan ZongShun 5 participants 9 messages Jun 11, 2015 – Jun 15, 2015

Subsystems (5)
lore
Share & tools
lore
#1 lore raw

PATCH v2 2/3 i2c-piix4: Use Macro for AMD CZ SMBus device ID

In reply to Wan ZongShun

Change AMD CZ SMBUS device ID from 0x790b to
use Macro definition

---
 drivers/i2c/busses/i2c-piix4.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/i2c/busses/i2c-piix4.c +2 -2
index 67cbec6..630bce6 100644
@@ -245,7 +245,7 @@ static int piix4_setup_sb800(struct pci_dev *PIIX4_dev,
 	     PIIX4_dev->device == PCI_DEVICE_ID_AMD_HUDSON2_SMBUS &&
 	     PIIX4_dev->revision >= 0x41) ||
 	    (PIIX4_dev->vendor == PCI_VENDOR_ID_AMD &&
-	     PIIX4_dev->device == 0x790b &&
+	     PIIX4_dev->device == PCI_DEVICE_ID_AMD_KERNCZ_SMBUS &&
 	     PIIX4_dev->revision >= 0x49))
 		smb_en = 0x00;
 	else
@@ -545,7 +545,7 @@ static const struct pci_device_id piix4_ids[] = {
 	{ PCI_DEVICE(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_IXP400_SMBUS) },
 	{ PCI_DEVICE(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_SBX00_SMBUS) },
 	{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_HUDSON2_SMBUS) },
-	{ PCI_DEVICE(PCI_VENDOR_ID_AMD, 0x790b) },
+	{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_KERNCZ_SMBUS) },
 	{ PCI_DEVICE(PCI_VENDOR_ID_SERVERWORKS,
 		     PCI_DEVICE_ID_SERVERWORKS_OSB4) },
 	{ PCI_DEVICE(PCI_VENDOR_ID_SERVERWORKS,
Signature · 1 line
1.9.1
#0 lore raw

PATCH v2 1/3 pci_ids: Add AMD KERNCZ device ID support

The KERNCZ is new AMD SB/FCH generation name, like HUDSON2. We will adopt 0x790b as device ID since from this gereration.

---
 include/linux/pci_ids.h | 1 +
 1 file changed, 1 insertion(+)
include/linux/pci_ids.h +1 -0
index 2f7b9a4..cb63a7b 100644
@@ -579,6 +579,7 @@
 #define PCI_DEVICE_ID_AMD_HUDSON2_SATA_IDE	0x7800
 #define PCI_DEVICE_ID_AMD_HUDSON2_SMBUS		0x780b
 #define PCI_DEVICE_ID_AMD_HUDSON2_IDE		0x780c
+#define PCI_DEVICE_ID_AMD_KERNCZ_SMBUS  0x790b
 
 #define PCI_VENDOR_ID_TRIDENT		0x1023
 #define PCI_DEVICE_ID_TRIDENT_4DWAVE_DX	0x2000
Signature · 1 line
1.9.1
#5 lore raw

PATCH v2 3/3 SDHCI: Change AMD SDHCI quirk application scope

Change this quirk to apply to AMD Carrizo platform.

---
 drivers/mmc/host/sdhci-pci.c | 25 ++++++++++++++++++++++++-
 1 file changed, 24 insertions(+), 1 deletion(-)
drivers/mmc/host/sdhci-pci.c +24 -1
index f208f20..94f54d2 100644
@@ -724,14 +724,37 @@ static const struct sdhci_pci_fixes sdhci_rtsx = {
 	.probe_slot	= rtsx_probe_slot,
 };
 
+/*AMD chipset generation*/
+enum amd_chipset_gen {
+	AMD_CHIPSET_BEFORE_ML,
+	AMD_CHIPSET_CZ,
+	AMD_CHIPSET_NL,
+	AMD_CHIPSET_UNKNOWN,
+};
+
 static int amd_probe(struct sdhci_pci_chip *chip)
 {
 	struct pci_dev	*smbus_dev;
+	enum amd_chipset_gen gen;
 
 	smbus_dev = pci_get_device(PCI_VENDOR_ID_AMD,
 			PCI_DEVICE_ID_AMD_HUDSON2_SMBUS, NULL);
+	if (smbus_dev) {
+		gen = AMD_CHIPSET_BEFORE_ML;
+	} else {
+		smbus_dev = pci_get_device(PCI_VENDOR_ID_AMD,
+				PCI_DEVICE_ID_AMD_KERNCZ_SMBUS, NULL);
+		if (smbus_dev) {
+			if (smbus_dev->revision < 0x51)
+				gen = AMD_CHIPSET_CZ;
+			else
+				gen = AMD_CHIPSET_NL;
+		} else {
+			gen = AMD_CHIPSET_UNKNOWN;
+		}
+	}
 
-	if (smbus_dev && (smbus_dev->revision < 0x51)) {
+	if ((gen == AMD_CHIPSET_BEFORE_ML) || (gen == AMD_CHIPSET_CZ)) {
 		chip->quirks2 |= SDHCI_QUIRK2_CLEAR_TRANSFERMODE_REG_BEFORE_CMD;
 		chip->quirks2 |= SDHCI_QUIRK2_BROKEN_HS200;
 	}
Signature · 1 line
1.9.1
Acked-by on v2 2/3
#2 lore raw

Re: [PATCH V2 2/3] i2c-piix4: Use Macro for AMD CZ SMBus device ID

In reply to Wan ZongShun
Quoted 4 lines · Wan ZongShun

Change AMD CZ SMBUS device ID from 0x790b to
use Macro definition

I think it makes sense that this patch goes in via MMC. This I2C change is trivial, but for MMC there is more to handle. I don't expect conflicts. So:

Quoted 33 lines
---
 drivers/i2c/busses/i2c-piix4.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/i2c/busses/i2c-piix4.c +2 -2
index 67cbec6..630bce6 100644
@@ -245,7 +245,7 @@ static int piix4_setup_sb800(struct pci_dev *PIIX4_dev,
 	     PIIX4_dev->device == PCI_DEVICE_ID_AMD_HUDSON2_SMBUS &&
 	     PIIX4_dev->revision >= 0x41) ||
 	    (PIIX4_dev->vendor == PCI_VENDOR_ID_AMD &&
-	     PIIX4_dev->device == 0x790b &&
+	     PIIX4_dev->device == PCI_DEVICE_ID_AMD_KERNCZ_SMBUS &&
 	     PIIX4_dev->revision >= 0x49))
 		smb_en = 0x00;
 	else
@@ -545,7 +545,7 @@ static const struct pci_device_id piix4_ids[] = {
 	{ PCI_DEVICE(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_IXP400_SMBUS) },
 	{ PCI_DEVICE(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_SBX00_SMBUS) },
 	{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_HUDSON2_SMBUS) },
-	{ PCI_DEVICE(PCI_VENDOR_ID_AMD, 0x790b) },
+	{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_KERNCZ_SMBUS) },
 	{ PCI_DEVICE(PCI_VENDOR_ID_SERVERWORKS,
 		     PCI_DEVICE_ID_SERVERWORKS_OSB4) },
 	{ PCI_DEVICE(PCI_VENDOR_ID_SERVERWORKS,
Signature · 6 lines
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
maintainer Acked-by on v2 1/3
#7 lore raw
In reply to Wan ZongShun
Quoted 2 lines · Wan ZongShun

The KERNCZ is new AMD SB/FCH generation name, like HUDSON2. We will adopt 0x790b as device ID since from this gereration.

s/We will adopt 0x790b as device ID since from/0x790b is the device ID for/ s/gereration/generation/

Quoted 1 line
Quoted 23 lines
---
 include/linux/pci_ids.h | 1 +
 1 file changed, 1 insertion(+)
include/linux/pci_ids.h +1 -0
index 2f7b9a4..cb63a7b 100644
@@ -579,6 +579,7 @@
 #define PCI_DEVICE_ID_AMD_HUDSON2_SATA_IDE	0x7800
 #define PCI_DEVICE_ID_AMD_HUDSON2_SMBUS		0x780b
 #define PCI_DEVICE_ID_AMD_HUDSON2_IDE		0x780c
+#define PCI_DEVICE_ID_AMD_KERNCZ_SMBUS  0x790b
 
 #define PCI_VENDOR_ID_TRIDENT		0x1023
 #define PCI_DEVICE_ID_TRIDENT_4DWAVE_DX	0x2000
Signature · 6 lines
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Applied
#8 lore raw
Quoted 10 lines · Bjorn Helgaas
Quoted 2 lines · Wan ZongShun

The KERNCZ is new AMD SB/FCH generation name, like HUDSON2. We will adopt 0x790b as device ID since from this gereration.

s/We will adopt 0x790b as device ID since from/0x790b is the device ID for/ s/gereration/generation/

Quoted 1 line

Thanks, applied with Bjorn's ack and his suggested changes.

Kind regards
Uffe

Quoted 24 lines
Quoted 24 lines
---
 include/linux/pci_ids.h | 1 +
 1 file changed, 1 insertion(+)
include/linux/pci_ids.h +1 -1
index 2f7b9a4..cb63a7b 100644
@@ -579,6 +579,7 @@
 #define PCI_DEVICE_ID_AMD_HUDSON2_SATA_IDE   0x7800
 #define PCI_DEVICE_ID_AMD_HUDSON2_SMBUS              0x780b
 #define PCI_DEVICE_ID_AMD_HUDSON2_IDE                0x780c
+#define PCI_DEVICE_ID_AMD_KERNCZ_SMBUS  0x790b
 
 #define PCI_VENDOR_ID_TRIDENT                0x1023
 #define PCI_DEVICE_ID_TRIDENT_4DWAVE_DX      0x2000
--

1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

Applied
#3 lore raw

Re: [PATCH V2 2/3] i2c-piix4: Use Macro for AMD CZ SMBus device ID

In reply to Wolfram Sang
Quoted 11 lines · Wolfram Sang
Quoted 4 lines · Wan ZongShun

Change AMD CZ SMBUS device ID from 0x790b to
use Macro definition

I think it makes sense that this patch goes in via MMC. This I2C change is trivial, but for MMC there is more to handle. I don't expect conflicts. So:

Thanks, applied!

Kind regards
Uffe

Quoted 34 lines
Quoted 34 lines
---
 drivers/i2c/busses/i2c-piix4.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/i2c/busses/i2c-piix4.c +2 -3
index 67cbec6..630bce6 100644
@@ -245,7 +245,7 @@ static int piix4_setup_sb800(struct pci_dev *PIIX4_dev,
           PIIX4_dev->device == PCI_DEVICE_ID_AMD_HUDSON2_SMBUS &&
           PIIX4_dev->revision >= 0x41) ||
          (PIIX4_dev->vendor == PCI_VENDOR_ID_AMD &&
-          PIIX4_dev->device == 0x790b &&
+          PIIX4_dev->device == PCI_DEVICE_ID_AMD_KERNCZ_SMBUS &&
           PIIX4_dev->revision >= 0x49))
              smb_en = 0x00;
      else
@@ -545,7 +545,7 @@ static const struct pci_device_id piix4_ids[] = {
      { PCI_DEVICE(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_IXP400_SMBUS) },
      { PCI_DEVICE(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_SBX00_SMBUS) },
      { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_HUDSON2_SMBUS) },
-     { PCI_DEVICE(PCI_VENDOR_ID_AMD, 0x790b) },
+     { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_KERNCZ_SMBUS) },
      { PCI_DEVICE(PCI_VENDOR_ID_SERVERWORKS,
                   PCI_DEVICE_ID_SERVERWORKS_OSB4) },
      { PCI_DEVICE(PCI_VENDOR_ID_SERVERWORKS,
--

1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-i2c" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

Applied
#6 lore raw

Re: [PATCH V2 3/3] SDHCI: Change AMD SDHCI quirk application scope

In reply to Wan ZongShun
Quoted 6 lines · Wan ZongShun

Change this quirk to apply to AMD Carrizo platform.

Thanks, applied! I changed the prefix of the commit message header from "SDHCI." to "mmc: sdhci-pci:"

Kind regards
Uffe

Quoted 50 lines
---
 drivers/mmc/host/sdhci-pci.c | 25 ++++++++++++++++++++++++-
 1 file changed, 24 insertions(+), 1 deletion(-)
drivers/mmc/host/sdhci-pci.c +24 -2
index f208f20..94f54d2 100644
@@ -724,14 +724,37 @@ static const struct sdhci_pci_fixes sdhci_rtsx = {
        .probe_slot     = rtsx_probe_slot,
 };
 
+/*AMD chipset generation*/
+enum amd_chipset_gen {
+       AMD_CHIPSET_BEFORE_ML,
+       AMD_CHIPSET_CZ,
+       AMD_CHIPSET_NL,
+       AMD_CHIPSET_UNKNOWN,
+};
+
 static int amd_probe(struct sdhci_pci_chip *chip)
 {
        struct pci_dev  *smbus_dev;
+       enum amd_chipset_gen gen;
 
        smbus_dev = pci_get_device(PCI_VENDOR_ID_AMD,
                        PCI_DEVICE_ID_AMD_HUDSON2_SMBUS, NULL);
+       if (smbus_dev) {
+               gen = AMD_CHIPSET_BEFORE_ML;
+       } else {
+               smbus_dev = pci_get_device(PCI_VENDOR_ID_AMD,
+                               PCI_DEVICE_ID_AMD_KERNCZ_SMBUS, NULL);
+               if (smbus_dev) {
+                       if (smbus_dev->revision < 0x51)
+                               gen = AMD_CHIPSET_CZ;
+                       else
+                               gen = AMD_CHIPSET_NL;
+               } else {
+                       gen = AMD_CHIPSET_UNKNOWN;
+               }
+       }
 
-       if (smbus_dev && (smbus_dev->revision < 0x51)) {
+       if ((gen == AMD_CHIPSET_BEFORE_ML) || (gen == AMD_CHIPSET_CZ)) {
                chip->quirks2 |= SDHCI_QUIRK2_CLEAR_TRANSFERMODE_REG_BEFORE_CMD;
                chip->quirks2 |= SDHCI_QUIRK2_BROKEN_HS200;
        }
--

1.9.1

Acked-by on v2 2/3
#4 lore raw

Re: [PATCH V2 2/3] i2c-piix4: Use Macro for AMD CZ SMBus device ID

In reply to Wan ZongShun
Quoted 22 lines · Wan ZongShun

Change AMD CZ SMBUS device ID from 0x790b to
use Macro definition

---
 drivers/i2c/busses/i2c-piix4.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/i2c/busses/i2c-piix4.c +1 -1
index 67cbec6..630bce6 100644
@@ -245,7 +245,7 @@ static int piix4_setup_sb800(struct pci_dev *PIIX4_dev,
 	     PIIX4_dev->device == PCI_DEVICE_ID_AMD_HUDSON2_SMBUS &&
 	     PIIX4_dev->revision >= 0x41) ||
 	    (PIIX4_dev->vendor == PCI_VENDOR_ID_AMD &&
-	     PIIX4_dev->device == 0x790b &&
+	     PIIX4_dev->device == PCI_DEVICE_ID_AMD_KERNCZ_SMBUS &&
 	     PIIX4_dev->revision >= 0x49))
 		smb_en = 0x00;
 	else

drivers/i2c/busses/i2c-piix4.c static const struct pci_device_id piix4_ids[] = { · line 551

Quoted 8 lines
drivers/i2c/busses/i2c-piix4.c +1 -1
@@ -545,7 +545,7 @@ static const struct pci_device_id piix4_ids[] = {
 	{ PCI_DEVICE(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_IXP400_SMBUS) },
 	{ PCI_DEVICE(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_SBX00_SMBUS) },
 	{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_HUDSON2_SMBUS) },
-	{ PCI_DEVICE(PCI_VENDOR_ID_AMD, 0x790b) },
+	{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_KERNCZ_SMBUS) },
 	{ PCI_DEVICE(PCI_VENDOR_ID_SERVERWORKS,
 		     PCI_DEVICE_ID_SERVERWORKS_OSB4) },
 	{ PCI_DEVICE(PCI_VENDOR_ID_SERVERWORKS,

Probably too late but anyway:

Signature · 2 lines
Jean Delvare
SUSE L3 Support