spi: intel: PCI driver housekeeping
cover spi: intel: PCI driver housekeeping
Found some controllers' private data that were wrong according to the documentation. Also, the number of Protected Regions from BXT types was changed.
The second patch adds more Device IDs to the module table. Probably good candidates to stable?
Mauro Lima (2):
spi: intel: Fix device private data and PR_NUM for BXT
spi: intel: Add support for controllers
drivers/spi/spi-intel-pci.c | 13 ++++++++----- drivers/spi/spi-intel.c | 2 +- 2 files changed, 9 insertions(+), 6 deletions(-)
Signature · 1 line
2.39.1
PATCH 1/2 spi: intel: Fix device private data and PR_NUM for BXT
Some private data fields have to change from bxt_info to cnl_info. Here is the list of Device IDs with the respective documentation taken for validation:
0xa0a4 - Intel® 500 Series Chipset Family On-Package Platform Controller Hub
0x02a4 - Intel® 400 Series Chipset Family On-Package PCH
0x06a4 - Intel® 400 Series Chipset Family Platform Controller Hub
0x34a4 - Intel® 495 Chipset Family On-Package
0xa3a4 - Intel® B460 and H410 ChipsetAccording to documentation BXT has five PR registers.
--- drivers/spi/spi-intel-pci.c | 10 +++++----- drivers/spi/spi-intel.c | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-)
drivers/spi/spi-intel-pci.c +5 -5
@@ -60,12 +60,12 @@ static int intel_spi_pci_probe(struct pci_dev *pdev, }static const struct pci_device_id intel_spi_pci_ids[] = { - {PCI_VDEVICE (INTEL ,0x02a4 ), (unsigned long )&bxt_info }, - {PCI_VDEVICE (INTEL ,0x06a4 ), (unsigned long )&bxt_info }, + {PCI_VDEVICE (INTEL ,0x02a4 ), (unsigned long )&cnl_info }, + {PCI_VDEVICE (INTEL ,0x06a4 ), (unsigned long )&cnl_info }, {PCI_VDEVICE (INTEL ,0x18e0 ), (unsigned long )&bxt_info }, {PCI_VDEVICE (INTEL ,0x19e0 ), (unsigned long )&bxt_info }, {PCI_VDEVICE (INTEL ,0x1bca ), (unsigned long )&bxt_info }, - {PCI_VDEVICE (INTEL ,0x34a4 ), (unsigned long )&bxt_info }, + {PCI_VDEVICE (INTEL ,0x34a4 ), (unsigned long )&cnl_info }, {PCI_VDEVICE (INTEL ,0x38a4 ), (unsigned long )&bxt_info }, {PCI_VDEVICE (INTEL ,0x43a4 ), (unsigned long )&cnl_info }, {PCI_VDEVICE (INTEL ,0x4b24 ), (unsigned long )&bxt_info },
@@ -75,11 +75,11 @@ static const struct pci_device_id intel_spi_pci_ids[] = { { PCI_VDEVICE(INTEL, 0x7a24), (unsigned long)&cnl_info }, { PCI_VDEVICE(INTEL, 0x7aa4), (unsigned long)&cnl_info }, { PCI_VDEVICE(INTEL, 0x7e23), (unsigned long)&cnl_info }, - { PCI_VDEVICE(INTEL, 0xa0a4), (unsigned long)&bxt_info }, + { PCI_VDEVICE(INTEL, 0xa0a4), (unsigned long)&cnl_info }, { PCI_VDEVICE(INTEL, 0xa1a4), (unsigned long)&bxt_info }, { PCI_VDEVICE(INTEL, 0xa224), (unsigned long)&bxt_info }, { PCI_VDEVICE(INTEL, 0xa324), (unsigned long)&cnl_info }, - { PCI_VDEVICE(INTEL, 0xa3a4), (unsigned long)&bxt_info }, + { PCI_VDEVICE(INTEL, 0xa3a4), (unsigned long)&cnl_info }, { }, };MODULE_DEVICE_TABLE (pci, intel_spi_pci_ids);
drivers/spi/spi-intel.c +1 -1
@@ -104,7 +104,7 @@#define BXT_PR 0x84#define BXT_SSFSTS_CTL 0xa0#define BXT_FREG_NUM 12 -#define BXT_PR_NUM 6 +#define BXT_PR_NUM 5#define CNL_PR 0x84#define CNL_FREG_NUM 6
Signature · 1 line
2.39.1
Re: [PATCH 1/2] spi: intel: Fix device private data and PR_NUM for BXT
Hi Mauro,
Please call it "Broxton".
Quoted 10 lines · Mauro Lima
Some private data fields have to change from
bxt_infotocnl_info. Here is the list of Device IDs with the respective documentation taken for validation:0xa0a4 - Intel® 500 Series Chipset Family On-Package Platform Controller Hub 0x02a4 - Intel® 400 Series Chipset Family On-Package PCH 0x06a4 - Intel® 400 Series Chipset Family Platform Controller Hub 0x34a4 - Intel® 495 Chipset Family On-Package 0xa3a4 - Intel® B460 and H410 ChipsetAccording to documentation BXT has five PR registers.
Here too, "Broxton".
Quoted 1 line
Signed-off-by Mauro Lima <[email protected]>
PATCH 2/2 spi: intel: Add support for controllers
In reply to Mauro LimaAdd Device IDs to the module table for the following controllers:
- 9da4 Cannon Lake 300 Series On-Package - a2a4 200 Series/Z370 Chipset Family SPI Controller - 9d24 Intel® 200 Series Chipset Family (Including Intel® X299), Intel® Z370 Intel® H310C,B365, also Intel® B460 and H410 Chipset Platform Controller Hub
--- drivers/spi/spi-intel-pci.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/spi/spi-intel-pci.c +3 -0
@@ -80,6 +80,9 @@ static const struct pci_device_id intel_spi_pci_ids[] = { { PCI_VDEVICE(INTEL, 0xa224), (unsigned long)&bxt_info }, { PCI_VDEVICE(INTEL, 0xa324), (unsigned long)&cnl_info }, { PCI_VDEVICE(INTEL, 0xa3a4), (unsigned long)&cnl_info }, + { PCI_VDEVICE(INTEL, 0x9da4), (unsigned long)&cnl_info }, + { PCI_VDEVICE(INTEL, 0xa2a4), (unsigned long)&cnl_info }, + { PCI_VDEVICE(INTEL, 0x9d24), (unsigned long)&cnl_info }, { }, };MODULE_DEVICE_TABLE (pci, intel_spi_pci_ids);
Signature · 1 line
2.39.1
Re: [PATCH 2/2] spi: intel: Add support for controllers
Quoted 17 lines · Mauro Lima
Add Device IDs to the module table for the following controllers:
- 9da4 Cannon Lake 300 Series On-Package - a2a4 200 Series/Z370 Chipset Family SPI Controller - 9d24 Intel® 200 Series Chipset Family (Including Intel® X299), Intel® Z370 Intel® H310C,B365, also Intel® B460 and H410 Chipset Platform Controller HubSigned-off-by Mauro Lima <[email protected]>--- drivers/spi/spi-intel-pci.c | 3 +++ 1 file changed, 3 insertions(+)drivers/spi/spi-intel-pci.c +0
-0
drivers/spi/spi-intel-pci.c static const struct pci_device_id intel_spi_pci_ids[] = { · line 85
Quoted 6 lines
drivers/spi/spi-intel-pci.c +3
-0@@ -80,6 +80,9 @@ static const struct pci_device_id intel_spi_pci_ids[] = { { PCI_VDEVICE(INTEL, 0xa224), (unsigned long)&bxt_info }, { PCI_VDEVICE(INTEL, 0xa324), (unsigned long)&cnl_info }, { PCI_VDEVICE(INTEL, 0xa3a4), (unsigned long)&cnl_info }, + { PCI_VDEVICE(INTEL, 0x9da4), (unsigned long)&cnl_info }, + { PCI_VDEVICE(INTEL, 0xa2a4), (unsigned long)&cnl_info }, + { PCI_VDEVICE(INTEL, 0x9d24), (unsigned long)&cnl_info },
Make sure these are sorted numerically.
Otherwise looks good, thanks for doing this!
Re: [PATCH 2/2] spi: intel: Add support for controllers
9d24 and 9da4 should come after { PCI_VDEVICE(INTEL, 0x7e23), (unsigned long)&cnl_info
and a2a4 should be after { PCI_VDEVICE(INTEL, 0xa224), (unsigned long)&bxt_info }
Thanks,
Alok
Quoted 28 lines · Mika Westerberg
Quoted 17 lines · Mauro Lima
Add Device IDs to the module table for the following controllers:
- 9da4 Cannon Lake 300 Series On-Package - a2a4 200 Series/Z370 Chipset Family SPI Controller - 9d24 Intel® 200 Series Chipset Family (Including Intel® X299), Intel® Z370 Intel® H310C,B365, also Intel® B460 and H410 Chipset Platform Controller HubSigned-off-by Mauro Lima <[email protected]>--- drivers/spi/spi-intel-pci.c | 3 +++ 1 file changed, 3 insertions(+)drivers/spi/spi-intel-pci.c +0
-0drivers/spi/spi-intel-pci.c static const struct pci_device_id intel_spi_pci_ids[] = { · line 85
Quoted 6 lines
drivers/spi/spi-intel-pci.c +3
-0@@ -80,6 +80,9 @@ static const struct pci_device_id intel_spi_pci_ids[] = { { PCI_VDEVICE(INTEL, 0xa224), (unsigned long)&bxt_info }, { PCI_VDEVICE(INTEL, 0xa324), (unsigned long)&cnl_info }, { PCI_VDEVICE(INTEL, 0xa3a4), (unsigned long)&cnl_info }, + { PCI_VDEVICE(INTEL, 0x9da4), (unsigned long)&cnl_info }, + { PCI_VDEVICE(INTEL, 0xa2a4), (unsigned long)&cnl_info }, + { PCI_VDEVICE(INTEL, 0x9d24), (unsigned long)&cnl_info },Make sure these are sorted numerically.
Otherwise looks good, thanks for doing this!