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

mfd: lpc_sch: Partially revert "Add support for Intel Quark X1000"

The IRQ support for SCH GPIO is not specific to the Intel Quark SoC.
Moreover the IRQ routing is quite interesting there, so while it's
needs a special support, the driver haven't it anyway yet.

Due to above remove basically redundant code of IRQ support.

This reverts commit ec689a8a8155ce8b966bd5d7737a3916f5e48be3.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>

authored by

Andy Shevchenko and committed by
Lee Jones
922e8ce8 fe6df2b4

+6 -26
+6 -26
drivers/mfd/lpc_sch.c
··· 26 26 #define GPIO_IO_SIZE 64 27 27 #define GPIO_IO_SIZE_CENTERTON 128 28 28 29 - /* Intel Quark X1000 GPIO IRQ Number */ 30 - #define GPIO_IRQ_QUARK_X1000 9 31 - 32 29 #define WDTBASE 0x84 33 30 #define WDT_IO_SIZE 64 34 31 ··· 40 43 unsigned int io_size_smbus; 41 44 unsigned int io_size_gpio; 42 45 unsigned int io_size_wdt; 43 - int irq_gpio; 44 46 }; 45 47 46 48 static struct lpc_sch_info sch_chipset_info[] = { 47 49 [LPC_SCH] = { 48 50 .io_size_smbus = SMBUS_IO_SIZE, 49 51 .io_size_gpio = GPIO_IO_SIZE, 50 - .irq_gpio = -1, 51 52 }, 52 53 [LPC_ITC] = { 53 54 .io_size_smbus = SMBUS_IO_SIZE, 54 55 .io_size_gpio = GPIO_IO_SIZE, 55 56 .io_size_wdt = WDT_IO_SIZE, 56 - .irq_gpio = -1, 57 57 }, 58 58 [LPC_CENTERTON] = { 59 59 .io_size_smbus = SMBUS_IO_SIZE, 60 60 .io_size_gpio = GPIO_IO_SIZE_CENTERTON, 61 61 .io_size_wdt = WDT_IO_SIZE, 62 - .irq_gpio = -1, 63 62 }, 64 63 [LPC_QUARK_X1000] = { 65 64 .io_size_gpio = GPIO_IO_SIZE, 66 - .irq_gpio = GPIO_IRQ_QUARK_X1000, 67 65 .io_size_wdt = WDT_IO_SIZE, 68 66 }, 69 67 }; ··· 105 113 } 106 114 107 115 static int lpc_sch_populate_cell(struct pci_dev *pdev, int where, 108 - const char *name, int size, int irq, 109 - int id, struct mfd_cell *cell) 116 + const char *name, int size, int id, 117 + struct mfd_cell *cell) 110 118 { 111 119 struct resource *res; 112 120 int ret; 113 121 114 - res = devm_kcalloc(&pdev->dev, 2, sizeof(*res), GFP_KERNEL); 122 + res = devm_kzalloc(&pdev->dev, sizeof(*res), GFP_KERNEL); 115 123 if (!res) 116 124 return -ENOMEM; 117 125 ··· 127 135 cell->ignore_resource_conflicts = true; 128 136 cell->id = id; 129 137 130 - /* Check if we need to add an IRQ resource */ 131 - if (irq < 0) 132 - return 0; 133 - 134 - res++; 135 - 136 - res->start = irq; 137 - res->end = irq; 138 - res->flags = IORESOURCE_IRQ; 139 - 140 - cell->num_resources++; 141 - 142 138 return 0; 143 139 } 144 140 ··· 138 158 int ret; 139 159 140 160 ret = lpc_sch_populate_cell(dev, SMBASE, "isch_smbus", 141 - info->io_size_smbus, -1, 161 + info->io_size_smbus, 142 162 id->device, &lpc_sch_cells[cells]); 143 163 if (ret < 0) 144 164 return ret; ··· 146 166 cells++; 147 167 148 168 ret = lpc_sch_populate_cell(dev, GPIOBASE, "sch_gpio", 149 - info->io_size_gpio, info->irq_gpio, 169 + info->io_size_gpio, 150 170 id->device, &lpc_sch_cells[cells]); 151 171 if (ret < 0) 152 172 return ret; ··· 154 174 cells++; 155 175 156 176 ret = lpc_sch_populate_cell(dev, WDTBASE, "ie6xx_wdt", 157 - info->io_size_wdt, -1, 177 + info->io_size_wdt, 158 178 id->device, &lpc_sch_cells[cells]); 159 179 if (ret < 0) 160 180 return ret;