* [PATCH V2 1/3] pci_ids: Add AMD KERNCZ device ID support @ 2015-06-11 12:11 ` Wan ZongShun 0 siblings, 0 replies; 14+ messages in thread From: Wan ZongShun @ 2015-06-11 12:11 UTC (permalink / raw) To: ulf.hansson, linux-mmc, linux-i2c, bp, jdelvare Cc: linux-pci, linux-kernel, mcuos.com, Wan ZongShun The KERNCZ is new AMD SB/FCH generation name, like HUDSON2. We will adopt 0x790b as device ID since from this gereration. Signed-off-by: Wan ZongShun <Vincent.Wan@amd.com> --- include/linux/pci_ids.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index 2f7b9a4..cb63a7b 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h @@ -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 ^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH V2 1/3] pci_ids: Add AMD KERNCZ device ID support @ 2015-06-11 12:11 ` Wan ZongShun 0 siblings, 0 replies; 14+ messages in thread From: Wan ZongShun @ 2015-06-11 12:11 UTC (permalink / raw) To: ulf.hansson-QSEj5FYQhm4dnm+yROfE0A, linux-mmc-u79uwXL29TY76Z2rM5mHXA, linux-i2c-u79uwXL29TY76Z2rM5mHXA, bp-Gina5bIWoIWzQB+pC5nmwQ, jdelvare-l3A5Bk7waGM Cc: linux-pci-u79uwXL29TY76Z2rM5mHXA, linux-kernel-u79uwXL29TY76Z2rM5mHXA, mcuos.com-Re5JQEeQqe8AvxtiuMwx3w, Wan ZongShun The KERNCZ is new AMD SB/FCH generation name, like HUDSON2. We will adopt 0x790b as device ID since from this gereration. Signed-off-by: Wan ZongShun <Vincent.Wan-5C7GfCeVMHo@public.gmane.org> --- include/linux/pci_ids.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index 2f7b9a4..cb63a7b 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h @@ -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 ^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH V2 2/3] i2c-piix4: Use Macro for AMD CZ SMBus device ID 2015-06-11 12:11 ` Wan ZongShun @ 2015-06-11 12:11 ` Wan ZongShun -1 siblings, 0 replies; 14+ messages in thread From: Wan ZongShun @ 2015-06-11 12:11 UTC (permalink / raw) To: ulf.hansson, linux-mmc, linux-i2c, bp, jdelvare Cc: linux-pci, linux-kernel, mcuos.com, Wan ZongShun Change AMD CZ SMBUS device ID from 0x790b to use Macro definition Signed-off-by: Wan ZongShun <Vincent.Wan@amd.com> --- drivers/i2c/busses/i2c-piix4.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/i2c/busses/i2c-piix4.c b/drivers/i2c/busses/i2c-piix4.c index 67cbec6..630bce6 100644 --- a/drivers/i2c/busses/i2c-piix4.c +++ b/drivers/i2c/busses/i2c-piix4.c @@ -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 ^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH V2 2/3] i2c-piix4: Use Macro for AMD CZ SMBus device ID @ 2015-06-11 12:11 ` Wan ZongShun 0 siblings, 0 replies; 14+ messages in thread From: Wan ZongShun @ 2015-06-11 12:11 UTC (permalink / raw) To: ulf.hansson, linux-mmc, linux-i2c, bp, jdelvare Cc: linux-pci, linux-kernel, mcuos.com, Wan ZongShun Change AMD CZ SMBUS device ID from 0x790b to use Macro definition Signed-off-by: Wan ZongShun <Vincent.Wan@amd.com> --- drivers/i2c/busses/i2c-piix4.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/i2c/busses/i2c-piix4.c b/drivers/i2c/busses/i2c-piix4.c index 67cbec6..630bce6 100644 --- a/drivers/i2c/busses/i2c-piix4.c +++ b/drivers/i2c/busses/i2c-piix4.c @@ -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 ^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [PATCH V2 2/3] i2c-piix4: Use Macro for AMD CZ SMBus device ID 2015-06-11 12:11 ` Wan ZongShun (?) @ 2015-06-11 13:07 ` Wolfram Sang 2015-06-15 9:55 ` Ulf Hansson -1 siblings, 1 reply; 14+ messages in thread From: Wolfram Sang @ 2015-06-11 13:07 UTC (permalink / raw) To: Wan ZongShun Cc: ulf.hansson, linux-mmc, linux-i2c, bp, jdelvare, linux-pci, linux-kernel, mcuos.com [-- Attachment #1: Type: text/plain, Size: 1882 bytes --] On Thu, Jun 11, 2015 at 08:11:46PM +0800, Wan ZongShun wrote: > Change AMD CZ SMBUS device ID from 0x790b to > use Macro definition > > Signed-off-by: Wan ZongShun <Vincent.Wan@amd.com> 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: Acked-by: Wolfram Sang <wsa@the-dreams.de> > --- > drivers/i2c/busses/i2c-piix4.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/i2c/busses/i2c-piix4.c b/drivers/i2c/busses/i2c-piix4.c > index 67cbec6..630bce6 100644 > --- a/drivers/i2c/busses/i2c-piix4.c > +++ b/drivers/i2c/busses/i2c-piix4.c > @@ -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 majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html [-- Attachment #2: Digital signature --] [-- Type: application/pgp-signature, Size: 819 bytes --] ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH V2 2/3] i2c-piix4: Use Macro for AMD CZ SMBus device ID 2015-06-11 13:07 ` Wolfram Sang @ 2015-06-15 9:55 ` Ulf Hansson 0 siblings, 0 replies; 14+ messages in thread From: Ulf Hansson @ 2015-06-15 9:55 UTC (permalink / raw) To: Wan ZongShun Cc: linux-mmc, Wolfram Sang, linux-i2c, bp, Jean Delvare, Linux PCI, linux-kernel, ZongShun Wan On 11 June 2015 at 15:07, Wolfram Sang <wsa@the-dreams.de> wrote: > On Thu, Jun 11, 2015 at 08:11:46PM +0800, Wan ZongShun wrote: >> Change AMD CZ SMBUS device ID from 0x790b to >> use Macro definition >> >> Signed-off-by: Wan ZongShun <Vincent.Wan@amd.com> > > 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: > > Acked-by: Wolfram Sang <wsa@the-dreams.de> Thanks, applied! Kind regards Uffe > >> --- >> drivers/i2c/busses/i2c-piix4.c | 4 ++-- >> 1 file changed, 2 insertions(+), 2 deletions(-) >> >> diff --git a/drivers/i2c/busses/i2c-piix4.c b/drivers/i2c/busses/i2c-piix4.c >> index 67cbec6..630bce6 100644 >> --- a/drivers/i2c/busses/i2c-piix4.c >> +++ b/drivers/i2c/busses/i2c-piix4.c >> @@ -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 majordomo@vger.kernel.org >> More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH V2 2/3] i2c-piix4: Use Macro for AMD CZ SMBus device ID 2015-06-11 12:11 ` Wan ZongShun @ 2015-06-15 12:27 ` Jean Delvare -1 siblings, 0 replies; 14+ messages in thread From: Jean Delvare @ 2015-06-15 12:27 UTC (permalink / raw) To: Wan ZongShun Cc: ulf.hansson, linux-mmc, linux-i2c, bp, linux-pci, linux-kernel, mcuos.com On Thu, 11 Jun 2015 20:11:46 +0800, Wan ZongShun wrote: > Change AMD CZ SMBUS device ID from 0x790b to > use Macro definition > > Signed-off-by: Wan ZongShun <Vincent.Wan@amd.com> > --- > drivers/i2c/busses/i2c-piix4.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/i2c/busses/i2c-piix4.c b/drivers/i2c/busses/i2c-piix4.c > index 67cbec6..630bce6 100644 > --- a/drivers/i2c/busses/i2c-piix4.c > +++ b/drivers/i2c/busses/i2c-piix4.c > @@ -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, Probably too late but anyway: Acked-by: Jean Delvare <jdelvare@suse.de> -- Jean Delvare SUSE L3 Support ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH V2 2/3] i2c-piix4: Use Macro for AMD CZ SMBus device ID @ 2015-06-15 12:27 ` Jean Delvare 0 siblings, 0 replies; 14+ messages in thread From: Jean Delvare @ 2015-06-15 12:27 UTC (permalink / raw) To: Wan ZongShun Cc: ulf.hansson, linux-mmc, linux-i2c, bp, linux-pci, linux-kernel, mcuos.com On Thu, 11 Jun 2015 20:11:46 +0800, Wan ZongShun wrote: > Change AMD CZ SMBUS device ID from 0x790b to > use Macro definition > > Signed-off-by: Wan ZongShun <Vincent.Wan@amd.com> > --- > drivers/i2c/busses/i2c-piix4.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/i2c/busses/i2c-piix4.c b/drivers/i2c/busses/i2c-piix4.c > index 67cbec6..630bce6 100644 > --- a/drivers/i2c/busses/i2c-piix4.c > +++ b/drivers/i2c/busses/i2c-piix4.c > @@ -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, Probably too late but anyway: Acked-by: Jean Delvare <jdelvare@suse.de> -- Jean Delvare SUSE L3 Support ^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH V2 3/3] SDHCI: Change AMD SDHCI quirk application scope 2015-06-11 12:11 ` Wan ZongShun @ 2015-06-11 12:11 ` Wan ZongShun -1 siblings, 0 replies; 14+ messages in thread From: Wan ZongShun @ 2015-06-11 12:11 UTC (permalink / raw) To: ulf.hansson, linux-mmc, linux-i2c, bp, jdelvare Cc: linux-pci, linux-kernel, mcuos.com, Wan ZongShun Change this quirk to apply to AMD Carrizo platform. Signed-off-by: Wan ZongShun <Vincent.Wan@amd.com> Tested-by: Nath, Arindam <Arindam.Nath@amd.com> Tested-by: Ramesh, Ramya <Ramya.Ramesh@amd.com> --- drivers/mmc/host/sdhci-pci.c | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/drivers/mmc/host/sdhci-pci.c b/drivers/mmc/host/sdhci-pci.c index f208f20..94f54d2 100644 --- a/drivers/mmc/host/sdhci-pci.c +++ b/drivers/mmc/host/sdhci-pci.c @@ -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 ^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH V2 3/3] SDHCI: Change AMD SDHCI quirk application scope @ 2015-06-11 12:11 ` Wan ZongShun 0 siblings, 0 replies; 14+ messages in thread From: Wan ZongShun @ 2015-06-11 12:11 UTC (permalink / raw) To: ulf.hansson, linux-mmc, linux-i2c, bp, jdelvare Cc: linux-pci, linux-kernel, mcuos.com, Wan ZongShun Change this quirk to apply to AMD Carrizo platform. Signed-off-by: Wan ZongShun <Vincent.Wan@amd.com> Tested-by: Nath, Arindam <Arindam.Nath@amd.com> Tested-by: Ramesh, Ramya <Ramya.Ramesh@amd.com> --- drivers/mmc/host/sdhci-pci.c | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/drivers/mmc/host/sdhci-pci.c b/drivers/mmc/host/sdhci-pci.c index f208f20..94f54d2 100644 --- a/drivers/mmc/host/sdhci-pci.c +++ b/drivers/mmc/host/sdhci-pci.c @@ -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 ^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [PATCH V2 3/3] SDHCI: Change AMD SDHCI quirk application scope 2015-06-11 12:11 ` Wan ZongShun (?) @ 2015-06-15 9:55 ` Ulf Hansson -1 siblings, 0 replies; 14+ messages in thread From: Ulf Hansson @ 2015-06-15 9:55 UTC (permalink / raw) To: Wan ZongShun Cc: linux-mmc, linux-i2c, bp, Jean Delvare, Linux PCI, linux-kernel, ZongShun Wan On 11 June 2015 at 14:11, Wan ZongShun <Vincent.Wan@amd.com> wrote: > Change this quirk to apply to AMD Carrizo platform. > > Signed-off-by: Wan ZongShun <Vincent.Wan@amd.com> > > Tested-by: Nath, Arindam <Arindam.Nath@amd.com> > Tested-by: Ramesh, Ramya <Ramya.Ramesh@amd.com> Thanks, applied! I changed the prefix of the commit message header from "SDHCI." to "mmc: sdhci-pci:" Kind regards Uffe > --- > drivers/mmc/host/sdhci-pci.c | 25 ++++++++++++++++++++++++- > 1 file changed, 24 insertions(+), 1 deletion(-) > > diff --git a/drivers/mmc/host/sdhci-pci.c b/drivers/mmc/host/sdhci-pci.c > index f208f20..94f54d2 100644 > --- a/drivers/mmc/host/sdhci-pci.c > +++ b/drivers/mmc/host/sdhci-pci.c > @@ -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 > ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH V2 1/3] pci_ids: Add AMD KERNCZ device ID support 2015-06-11 12:11 ` Wan ZongShun ` (2 preceding siblings ...) (?) @ 2015-06-12 20:34 ` Bjorn Helgaas 2015-06-15 9:54 ` Ulf Hansson -1 siblings, 1 reply; 14+ messages in thread From: Bjorn Helgaas @ 2015-06-12 20:34 UTC (permalink / raw) To: Wan ZongShun Cc: ulf.hansson, linux-mmc, linux-i2c, bp, jdelvare, linux-pci, linux-kernel, mcuos.com On Thu, Jun 11, 2015 at 08:11:45PM +0800, Wan ZongShun wrote: > 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/ > Signed-off-by: Wan ZongShun <Vincent.Wan@amd.com> Acked-by: Bjorn Helgaas <bhelgaas@google.com> > --- > include/linux/pci_ids.h | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h > index 2f7b9a4..cb63a7b 100644 > --- a/include/linux/pci_ids.h > +++ b/include/linux/pci_ids.h > @@ -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 majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH V2 1/3] pci_ids: Add AMD KERNCZ device ID support @ 2015-06-15 9:54 ` Ulf Hansson 0 siblings, 0 replies; 14+ messages in thread From: Ulf Hansson @ 2015-06-15 9:54 UTC (permalink / raw) To: Wan ZongShun Cc: linux-mmc, Bjorn Helgaas, linux-i2c, bp, Jean Delvare, Linux PCI, linux-kernel, ZongShun Wan On 12 June 2015 at 22:34, Bjorn Helgaas <bhelgaas@google.com> wrote: > On Thu, Jun 11, 2015 at 08:11:45PM +0800, Wan ZongShun wrote: >> 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/ > >> Signed-off-by: Wan ZongShun <Vincent.Wan@amd.com> > > Acked-by: Bjorn Helgaas <bhelgaas@google.com> Thanks, applied with Bjorn's ack and his suggested changes. Kind regards Uffe > >> --- >> include/linux/pci_ids.h | 1 + >> 1 file changed, 1 insertion(+) >> >> diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h >> index 2f7b9a4..cb63a7b 100644 >> --- a/include/linux/pci_ids.h >> +++ b/include/linux/pci_ids.h >> @@ -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 majordomo@vger.kernel.org >> More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH V2 1/3] pci_ids: Add AMD KERNCZ device ID support @ 2015-06-15 9:54 ` Ulf Hansson 0 siblings, 0 replies; 14+ messages in thread From: Ulf Hansson @ 2015-06-15 9:54 UTC (permalink / raw) To: Wan ZongShun Cc: linux-mmc, Bjorn Helgaas, linux-i2c-u79uwXL29TY76Z2rM5mHXA, bp-Gina5bIWoIWzQB+pC5nmwQ, Jean Delvare, Linux PCI, linux-kernel-u79uwXL29TY76Z2rM5mHXA, ZongShun Wan On 12 June 2015 at 22:34, Bjorn Helgaas <bhelgaas-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org> wrote: > On Thu, Jun 11, 2015 at 08:11:45PM +0800, Wan ZongShun wrote: >> 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/ > >> Signed-off-by: Wan ZongShun <Vincent.Wan-5C7GfCeVMHo@public.gmane.org> > > Acked-by: Bjorn Helgaas <bhelgaas-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org> Thanks, applied with Bjorn's ack and his suggested changes. Kind regards Uffe > >> --- >> include/linux/pci_ids.h | 1 + >> 1 file changed, 1 insertion(+) >> >> diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h >> index 2f7b9a4..cb63a7b 100644 >> --- a/include/linux/pci_ids.h >> +++ b/include/linux/pci_ids.h >> @@ -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 majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org >> More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2015-06-15 12:28 UTC | newest] Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2015-06-11 12:11 [PATCH V2 1/3] pci_ids: Add AMD KERNCZ device ID support Wan ZongShun 2015-06-11 12:11 ` Wan ZongShun 2015-06-11 12:11 ` [PATCH V2 2/3] i2c-piix4: Use Macro for AMD CZ SMBus device ID Wan ZongShun 2015-06-11 12:11 ` Wan ZongShun 2015-06-11 13:07 ` Wolfram Sang 2015-06-15 9:55 ` Ulf Hansson 2015-06-15 12:27 ` Jean Delvare 2015-06-15 12:27 ` Jean Delvare 2015-06-11 12:11 ` [PATCH V2 3/3] SDHCI: Change AMD SDHCI quirk application scope Wan ZongShun 2015-06-11 12:11 ` Wan ZongShun 2015-06-15 9:55 ` Ulf Hansson 2015-06-12 20:34 ` [PATCH V2 1/3] pci_ids: Add AMD KERNCZ device ID support Bjorn Helgaas 2015-06-15 9:54 ` Ulf Hansson 2015-06-15 9:54 ` Ulf Hansson
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.