Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge tag 'spi-v6.16-merge-window' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi

Pull more spi updates from Mark Brown:
"A small set of updates that came in during the merge window, we've
got:

- Some small fixes for the Broadcom and spi-pci1xxxx drivers

- A change to the QPIC SNAND driver to flag that the error correction
features are less useful than people might be expecting

- A new device ID for the SOPHGO SG2042

- The addition of Yang Shen as a Huawei maintainer"

* tag 'spi-v6.16-merge-window' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi:
spi: spi-qpic-snand: document the limited bit error reporting capability
spi: bcm63xx-hsspi: fix shared reset
spi: bcm63xx-spi: fix shared reset
MAINTAINERS: Update HiSilicon SFC driver maintainer
MAINTAINERS: Update HiSilicon SPI Controller driver maintainer
spi: dt-bindings: spi-sg2044-nor: Add SOPHGO SG2042
spi: spi-pci1xxxx: Fix Probe failure with Dual SPI instance with INTx interrupts

+58 -19
+6 -1
Documentation/devicetree/bindings/spi/spi-sg2044-nor.yaml
··· 14 14 15 15 properties: 16 16 compatible: 17 - const: sophgo,sg2044-spifmc-nor 17 + oneOf: 18 + - const: sophgo,sg2044-spifmc-nor 19 + - items: 20 + - enum: 21 + - sophgo,sg2042-spifmc-nor 22 + - const: sophgo,sg2044-spifmc-nor 18 23 19 24 reg: 20 25 maxItems: 1
+2 -2
MAINTAINERS
··· 10966 10966 F: drivers/crypto/hisilicon/sec2/sec_main.c 10967 10967 10968 10968 HISILICON SPI Controller DRIVER FOR KUNPENG SOCS 10969 - M: Jay Fang <f.fangjian@huawei.com> 10969 + M: Yang Shen <shenyang39@huawei.com> 10970 10970 L: linux-spi@vger.kernel.org 10971 10971 S: Maintained 10972 10972 W: http://www.hisilicon.com ··· 10992 10992 F: drivers/crypto/hisilicon/trng/trng.c 10993 10993 10994 10994 HISILICON V3XX SPI NOR FLASH Controller Driver 10995 - M: Jay Fang <f.fangjian@huawei.com> 10995 + M: Yang Shen <shenyang39@huawei.com> 10996 10996 S: Maintained 10997 10997 W: http://www.hisilicon.com 10998 10998 F: drivers/spi/spi-hisi-sfc-v3xx.c
+1 -1
drivers/spi/spi-bcm63xx-hsspi.c
··· 745 745 if (IS_ERR(clk)) 746 746 return PTR_ERR(clk); 747 747 748 - reset = devm_reset_control_get_optional_exclusive(dev, NULL); 748 + reset = devm_reset_control_get_optional_shared(dev, NULL); 749 749 if (IS_ERR(reset)) 750 750 return PTR_ERR(reset); 751 751
+1 -1
drivers/spi/spi-bcm63xx.c
··· 523 523 return PTR_ERR(clk); 524 524 } 525 525 526 - reset = devm_reset_control_get_optional_exclusive(dev, NULL); 526 + reset = devm_reset_control_get_optional_shared(dev, NULL); 527 527 if (IS_ERR(reset)) 528 528 return PTR_ERR(reset); 529 529
+34 -14
drivers/spi/spi-pci1xxxx.c
··· 685 685 return pci1xxxx_spi_isr_io(irq, dev); 686 686 } 687 687 688 + static irqreturn_t pci1xxxx_spi_shared_isr(int irq, void *dev) 689 + { 690 + struct pci1xxxx_spi *par = dev; 691 + u8 i = 0; 692 + 693 + for (i = 0; i < par->total_hw_instances; i++) 694 + pci1xxxx_spi_isr(irq, par->spi_int[i]); 695 + 696 + return IRQ_HANDLED; 697 + } 698 + 688 699 static bool pci1xxxx_spi_can_dma(struct spi_controller *host, 689 700 struct spi_device *spi, 690 701 struct spi_transfer *xfer) ··· 713 702 struct device *dev = &pdev->dev; 714 703 struct pci1xxxx_spi *spi_bus; 715 704 struct spi_controller *spi_host; 705 + int num_vector = 0; 716 706 u32 regval; 717 707 int ret; 718 708 ··· 761 749 if (!spi_bus->reg_base) 762 750 return -EINVAL; 763 751 764 - ret = pci_alloc_irq_vectors(pdev, hw_inst_cnt, hw_inst_cnt, 765 - PCI_IRQ_ALL_TYPES); 766 - if (ret < 0) { 752 + num_vector = pci_alloc_irq_vectors(pdev, 1, hw_inst_cnt, 753 + PCI_IRQ_ALL_TYPES); 754 + if (num_vector < 0) { 767 755 dev_err(&pdev->dev, "Error allocating MSI vectors\n"); 768 756 return ret; 769 757 } ··· 777 765 SPI_MST_EVENT_MASK_REG_OFFSET(spi_sub_ptr->hw_inst)); 778 766 spi_sub_ptr->irq = pci_irq_vector(pdev, 0); 779 767 780 - ret = devm_request_irq(&pdev->dev, spi_sub_ptr->irq, 781 - pci1xxxx_spi_isr, PCI1XXXX_IRQ_FLAGS, 782 - pci_name(pdev), spi_sub_ptr); 768 + if (num_vector >= hw_inst_cnt) 769 + ret = devm_request_irq(&pdev->dev, spi_sub_ptr->irq, 770 + pci1xxxx_spi_isr, PCI1XXXX_IRQ_FLAGS, 771 + pci_name(pdev), spi_sub_ptr); 772 + else 773 + ret = devm_request_irq(&pdev->dev, spi_sub_ptr->irq, 774 + pci1xxxx_spi_shared_isr, 775 + PCI1XXXX_IRQ_FLAGS | IRQF_SHARED, 776 + pci_name(pdev), spi_bus); 783 777 if (ret < 0) { 784 778 dev_err(&pdev->dev, "Unable to request irq : %d", 785 779 spi_sub_ptr->irq); ··· 816 798 regval &= ~SPI_INTR; 817 799 writel(regval, spi_bus->reg_base + 818 800 SPI_MST_EVENT_MASK_REG_OFFSET(spi_sub_ptr->hw_inst)); 819 - spi_sub_ptr->irq = pci_irq_vector(pdev, iter); 820 - ret = devm_request_irq(&pdev->dev, spi_sub_ptr->irq, 821 - pci1xxxx_spi_isr, PCI1XXXX_IRQ_FLAGS, 822 - pci_name(pdev), spi_sub_ptr); 823 - if (ret < 0) { 824 - dev_err(&pdev->dev, "Unable to request irq : %d", 825 - spi_sub_ptr->irq); 826 - return -ENODEV; 801 + if (num_vector >= hw_inst_cnt) { 802 + spi_sub_ptr->irq = pci_irq_vector(pdev, iter); 803 + ret = devm_request_irq(&pdev->dev, spi_sub_ptr->irq, 804 + pci1xxxx_spi_isr, PCI1XXXX_IRQ_FLAGS, 805 + pci_name(pdev), spi_sub_ptr); 806 + if (ret < 0) { 807 + dev_err(&pdev->dev, "Unable to request irq : %d", 808 + spi_sub_ptr->irq); 809 + return -ENODEV; 810 + } 827 811 } 828 812 } 829 813
+14
drivers/spi/spi-qpic-snand.c
··· 639 639 unsigned int stat; 640 640 641 641 stat = buffer & BS_CORRECTABLE_ERR_MSK; 642 + 643 + /* 644 + * The exact number of the corrected bits is 645 + * unknown because the hardware only reports the 646 + * number of the corrected bytes. 647 + * 648 + * Since we have no better solution at the moment, 649 + * report that value as the number of bit errors 650 + * despite that it is inaccurate in most cases. 651 + */ 652 + if (stat && stat != ecc_cfg->strength) 653 + dev_warn_once(snandc->dev, 654 + "Warning: due to hw limitation, the reported number of the corrected bits may be inaccurate\n"); 655 + 642 656 snandc->qspi->ecc_stats.corrected += stat; 643 657 max_bitflips = max(max_bitflips, stat); 644 658 }