diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig index bd12196740a81..9e4473b2561b6 100644 --- a/drivers/gpio/Kconfig +++ b/drivers/gpio/Kconfig @@ -1724,6 +1724,7 @@ config GPIO_PCIE_IDIO_24 config GPIO_PHYTIUM_PCI tristate "Phytium GPIO PCI support" + depends on PCI && ARCH_PHYTIUM select GPIO_PHYTIUM_CORE select IRQ_DOMAIN select GENERIC_IRQ_CHIP diff --git a/drivers/gpio/gpio-phytium-core.h b/drivers/gpio/gpio-phytium-core.h index bb3f5af26c8db..c7aecbe658e32 100644 --- a/drivers/gpio/gpio-phytium-core.h +++ b/drivers/gpio/gpio-phytium-core.h @@ -34,7 +34,7 @@ #define GPIO_PORT_STRIDE (GPIO_EXT_PORTB - GPIO_EXT_PORTA) #define GPIO_CLEAR_IRQ 0xffffffff -#define PHYTIUM_GPIO_DRIVER_VERSION "1.1.2" +#define PHYTIUM_GPIO_DRIVER_VERSION "1.1.3" struct pin_loc { unsigned int port; diff --git a/drivers/gpio/gpio-phytium-platform.c b/drivers/gpio/gpio-phytium-platform.c index 2ebe2be5a7f88..d6475d67b805e 100644 --- a/drivers/gpio/gpio-phytium-platform.c +++ b/drivers/gpio/gpio-phytium-platform.c @@ -136,6 +136,20 @@ static int phytium_gpio_probe(struct platform_device *pdev) return 0; } +/* Rebind parent-to-child dispatch chain and enable parent IRQ lines. */ +static void phytium_set_irq_chained_handler(struct phytium_gpio *gpio) +{ + struct gpio_irq_chip *girq = &gpio->gc.irq; + int i; + + for (i = 0; i < girq->num_parents; i++) { + if (gpio->irq[i] >= 0) { + irq_set_chained_handler_and_data(gpio->irq[i], + phytium_gpio_irq_handler, &gpio->gc); + } + } +} + #ifdef CONFIG_PM_SLEEP static int phytium_gpio_suspend(struct device *dev) { @@ -193,6 +207,8 @@ static int phytium_gpio_resume(struct device *dev) raw_spin_unlock_irqrestore(&gpio->lock, flags); + phytium_set_irq_chained_handler(gpio); + return 0; } #endif diff --git a/drivers/pci/switch/switchtec.c b/drivers/pci/switch/switchtec.c index 5ff84fb8fb0f4..f32ddfa79da99 100644 --- a/drivers/pci/switch/switchtec.c +++ b/drivers/pci/switch/switchtec.c @@ -1852,6 +1852,22 @@ static const struct pci_device_id switchtec_pci_tbl[] = { SWITCHTEC_PCI_DEVICE(0x5552, SWITCHTEC_GEN5), /* PAXA 52XG5 */ SWITCHTEC_PCI_DEVICE(0x5536, SWITCHTEC_GEN5), /* PAXA 36XG5 */ SWITCHTEC_PCI_DEVICE(0x5528, SWITCHTEC_GEN5), /* PAXA 28XG5 */ + SWITCHTEC_PCI_DEVICE(0x6048, SWITCHTEC_GEN6), /* PFXs 48XG6 */ + SWITCHTEC_PCI_DEVICE(0x6064, SWITCHTEC_GEN6), /* PFXs 64XG6 */ + SWITCHTEC_PCI_DEVICE(0x6044, SWITCHTEC_GEN6), /* PFXs 144XG6 */ + SWITCHTEC_PCI_DEVICE(0x6060, SWITCHTEC_GEN6), /* PFXs 160XG6 */ + SWITCHTEC_PCI_DEVICE(0x6148, SWITCHTEC_GEN6), /* PSXs 48XG6 */ + SWITCHTEC_PCI_DEVICE(0x6164, SWITCHTEC_GEN6), /* PSXs 64XG6 */ + SWITCHTEC_PCI_DEVICE(0x6144, SWITCHTEC_GEN6), /* PSXs 144XG6 */ + SWITCHTEC_PCI_DEVICE(0x6160, SWITCHTEC_GEN6), /* PSXs 160XG6 */ + SWITCHTEC_PCI_DEVICE(0x6248, SWITCHTEC_GEN6), /* PFX 48XG6 */ + SWITCHTEC_PCI_DEVICE(0x6264, SWITCHTEC_GEN6), /* PFX 64XG6 */ + SWITCHTEC_PCI_DEVICE(0x6244, SWITCHTEC_GEN6), /* PFX 144XG6 */ + SWITCHTEC_PCI_DEVICE(0x6260, SWITCHTEC_GEN6), /* PFX 160XG6 */ + SWITCHTEC_PCI_DEVICE(0x6348, SWITCHTEC_GEN6), /* PSX 48XG6 */ + SWITCHTEC_PCI_DEVICE(0x6364, SWITCHTEC_GEN6), /* PSX 64XG6 */ + SWITCHTEC_PCI_DEVICE(0x6344, SWITCHTEC_GEN6), /* PSX 144XG6 */ + SWITCHTEC_PCI_DEVICE(0x6360, SWITCHTEC_GEN6), /* PSX 160XG6 */ SWITCHTEC_PCI100X_DEVICE(0x1001, SWITCHTEC_GEN4), /* PCI1001 16XG4 */ SWITCHTEC_PCI100X_DEVICE(0x1002, SWITCHTEC_GEN4), /* PCI1002 12XG4 */ SWITCHTEC_PCI100X_DEVICE(0x1003, SWITCHTEC_GEN4), /* PCI1003 16XG4 */ diff --git a/include/linux/switchtec.h b/include/linux/switchtec.h index cdb58d61c1526..724da6c08bf7d 100644 --- a/include/linux/switchtec.h +++ b/include/linux/switchtec.h @@ -42,6 +42,7 @@ enum switchtec_gen { SWITCHTEC_GEN3, SWITCHTEC_GEN4, SWITCHTEC_GEN5, + SWITCHTEC_GEN6, }; struct mrpc_regs {