]> Git Repo - J-linux.git/commitdiff
Merge branch 'spi-4.20' into spi-next
authorMark Brown <[email protected]>
Sun, 21 Oct 2018 16:00:14 +0000 (17:00 +0100)
committerMark Brown <[email protected]>
Sun, 21 Oct 2018 16:00:14 +0000 (17:00 +0100)
1  2 
drivers/spi/spi-gpio.c
drivers/spi/spi-rockchip.c
drivers/spi/spi-rspi.c
drivers/spi/spi-sh-msiof.c
drivers/spi/spi.c
include/linux/pci.h

diff --combined drivers/spi/spi-gpio.c
index 421bfc7dda67413bd72ae96055c3767d01a33fa7,a2b08b464857fa7b527c9382a6a76eb1fe358ba1..45973ee3ae119e59a3b6846889b0449a7ba3e0d6
@@@ -295,13 -295,15 +295,15 @@@ static int spi_gpio_request(struct devi
        spi_gpio->miso = devm_gpiod_get_optional(dev, "miso", GPIOD_IN);
        if (IS_ERR(spi_gpio->miso))
                return PTR_ERR(spi_gpio->miso);
-       if (!spi_gpio->miso)
-               /* HW configuration without MISO pin */
-               *mflags |= SPI_MASTER_NO_RX;
+       /*
+        * No setting SPI_MASTER_NO_RX here - if there is only a MOSI
+        * pin connected the host can still do RX by changing the
+        * direction of the line.
+        */
  
        spi_gpio->sck = devm_gpiod_get(dev, "sck", GPIOD_OUT_LOW);
 -      if (IS_ERR(spi_gpio->mosi))
 -              return PTR_ERR(spi_gpio->mosi);
 +      if (IS_ERR(spi_gpio->sck))
 +              return PTR_ERR(spi_gpio->sck);
  
        for (i = 0; i < num_chipselects; i++) {
                spi_gpio->cs_gpios[i] = devm_gpiod_get_index(dev, "cs",
@@@ -423,7 -425,7 +425,7 @@@ static int spi_gpio_probe(struct platfo
        spi_gpio->bitbang.chipselect = spi_gpio_chipselect;
        spi_gpio->bitbang.set_line_direction = spi_gpio_set_direction;
  
-       if ((master_flags & (SPI_MASTER_NO_TX | SPI_MASTER_NO_RX)) == 0) {
+       if ((master_flags & SPI_MASTER_NO_TX) == 0) {
                spi_gpio->bitbang.txrx_word[SPI_MODE_0] = spi_gpio_txrx_word_mode0;
                spi_gpio->bitbang.txrx_word[SPI_MODE_1] = spi_gpio_txrx_word_mode1;
                spi_gpio->bitbang.txrx_word[SPI_MODE_2] = spi_gpio_txrx_word_mode2;
  static int spi_gpio_remove(struct platform_device *pdev)
  {
        struct spi_gpio                 *spi_gpio;
-       struct spi_gpio_platform_data   *pdata;
  
        spi_gpio = platform_get_drvdata(pdev);
-       pdata = dev_get_platdata(&pdev->dev);
  
        /* stop() unregisters child devices too */
        spi_bitbang_stop(&spi_gpio->bitbang);
index 185bbdce62b1467acbe833255f3fe79e4fad0840,ffa564fbf970617de3128fff88707a4e0be2539f..51ef632bca52564b8db1f79063f29e99078874a1
@@@ -164,7 -164,6 +164,6 @@@ enum rockchip_ssi_type 
  
  struct rockchip_spi_dma_data {
        struct dma_chan *ch;
-       enum dma_transfer_direction direction;
        dma_addr_t addr;
  };
  
@@@ -202,12 -201,11 +201,11 @@@ struct rockchip_spi 
  
        bool cs_asserted[ROCKCHIP_SPI_MAX_CS_NUM];
  
-       u32 use_dma;
+       bool use_dma;
        struct sg_table tx_sg;
        struct sg_table rx_sg;
        struct rockchip_spi_dma_data dma_rx;
        struct rockchip_spi_dma_data dma_tx;
-       struct dma_slave_caps dma_caps;
  };
  
  static inline void spi_enable_chip(struct rockchip_spi *rs, int enable)
@@@ -381,6 -379,8 +379,8 @@@ static int rockchip_spi_pio_transfer(st
  {
        int remain = 0;
  
+       spi_enable_chip(rs, 1);
        do {
                if (rs->tx) {
                        remain = rs->tx_end - rs->tx;
@@@ -445,9 -445,6 +445,9 @@@ static int rockchip_spi_prepare_dma(str
        struct dma_slave_config rxconf, txconf;
        struct dma_async_tx_descriptor *rxdesc, *txdesc;
  
 +      memset(&rxconf, 0, sizeof(rxconf));
 +      memset(&txconf, 0, sizeof(txconf));
 +
        spin_lock_irqsave(&rs->lock, flags);
        rs->state &= ~RXBUSY;
        rs->state &= ~TXBUSY;
  
        rxdesc = NULL;
        if (rs->rx) {
-               rxconf.direction = rs->dma_rx.direction;
+               rxconf.direction = DMA_DEV_TO_MEM;
                rxconf.src_addr = rs->dma_rx.addr;
                rxconf.src_addr_width = rs->n_bytes;
-               if (rs->dma_caps.max_burst > 4)
-                       rxconf.src_maxburst = 4;
-               else
-                       rxconf.src_maxburst = 1;
+               rxconf.src_maxburst = 1;
                dmaengine_slave_config(rs->dma_rx.ch, &rxconf);
  
                rxdesc = dmaengine_prep_slave_sg(
                                rs->dma_rx.ch,
                                rs->rx_sg.sgl, rs->rx_sg.nents,
-                               rs->dma_rx.direction, DMA_PREP_INTERRUPT);
+                               DMA_DEV_TO_MEM, DMA_PREP_INTERRUPT);
                if (!rxdesc)
                        return -EINVAL;
  
  
        txdesc = NULL;
        if (rs->tx) {
-               txconf.direction = rs->dma_tx.direction;
+               txconf.direction = DMA_MEM_TO_DEV;
                txconf.dst_addr = rs->dma_tx.addr;
                txconf.dst_addr_width = rs->n_bytes;
-               if (rs->dma_caps.max_burst > 4)
-                       txconf.dst_maxburst = 4;
-               else
-                       txconf.dst_maxburst = 1;
+               txconf.dst_maxburst = rs->fifo_len / 2;
                dmaengine_slave_config(rs->dma_tx.ch, &txconf);
  
                txdesc = dmaengine_prep_slave_sg(
                                rs->dma_tx.ch,
                                rs->tx_sg.sgl, rs->tx_sg.nents,
-                               rs->dma_tx.direction, DMA_PREP_INTERRUPT);
+                               DMA_MEM_TO_DEV, DMA_PREP_INTERRUPT);
                if (!txdesc) {
                        if (rxdesc)
                                dmaengine_terminate_sync(rs->dma_rx.ch);
                dma_async_issue_pending(rs->dma_rx.ch);
        }
  
+       spi_enable_chip(rs, 1);
        if (txdesc) {
                spin_lock_irqsave(&rs->lock, flags);
                rs->state |= TXBUSY;
                dma_async_issue_pending(rs->dma_tx.ch);
        }
  
-       return 0;
+       /* 1 means the transfer is in progress */
+       return 1;
  }
  
  static void rockchip_spi_config(struct rockchip_spi *rs)
        writel_relaxed(rs->fifo_len / 2 - 1, rs->regs + ROCKCHIP_SPI_TXFTLR);
        writel_relaxed(rs->fifo_len / 2 - 1, rs->regs + ROCKCHIP_SPI_RXFTLR);
  
-       writel_relaxed(0, rs->regs + ROCKCHIP_SPI_DMATDLR);
+       writel_relaxed(rs->fifo_len / 2 - 1, rs->regs + ROCKCHIP_SPI_DMATDLR);
        writel_relaxed(0, rs->regs + ROCKCHIP_SPI_DMARDLR);
        writel_relaxed(dmacr, rs->regs + ROCKCHIP_SPI_DMACR);
  
@@@ -600,7 -594,6 +597,6 @@@ static int rockchip_spi_transfer_one
                struct spi_device *spi,
                struct spi_transfer *xfer)
  {
-       int ret = 0;
        struct rockchip_spi *rs = spi_master_get_devdata(master);
  
        WARN_ON(readl_relaxed(rs->regs + ROCKCHIP_SPI_SSIENR) &&
  
        /* we need prepare dma before spi was enabled */
        if (master->can_dma && master->can_dma(master, spi, xfer))
-               rs->use_dma = 1;
+               rs->use_dma = true;
        else
-               rs->use_dma = 0;
+               rs->use_dma = false;
  
        rockchip_spi_config(rs);
  
-       if (rs->use_dma) {
-               if (rs->tmode == CR0_XFM_RO) {
-                       /* rx: dma must be prepared first */
-                       ret = rockchip_spi_prepare_dma(rs);
-                       spi_enable_chip(rs, 1);
-               } else {
-                       /* tx or tr: spi must be enabled first */
-                       spi_enable_chip(rs, 1);
-                       ret = rockchip_spi_prepare_dma(rs);
-               }
-               /* successful DMA prepare means the transfer is in progress */
-               ret = ret ? ret : 1;
-       } else {
-               spi_enable_chip(rs, 1);
-               ret = rockchip_spi_pio_transfer(rs);
-       }
+       if (rs->use_dma)
+               return rockchip_spi_prepare_dma(rs);
  
-       return ret;
+       return rockchip_spi_pio_transfer(rs);
  }
  
  static bool rockchip_spi_can_dma(struct spi_master *master,
@@@ -783,11 -762,8 +765,8 @@@ static int rockchip_spi_probe(struct pl
        }
  
        if (rs->dma_tx.ch && rs->dma_rx.ch) {
-               dma_get_slave_caps(rs->dma_rx.ch, &(rs->dma_caps));
                rs->dma_tx.addr = (dma_addr_t)(mem->start + ROCKCHIP_SPI_TXDR);
                rs->dma_rx.addr = (dma_addr_t)(mem->start + ROCKCHIP_SPI_RXDR);
-               rs->dma_tx.direction = DMA_MEM_TO_DEV;
-               rs->dma_rx.direction = DMA_DEV_TO_MEM;
  
                master->can_dma = rockchip_spi_can_dma;
                master->dma_tx = rs->dma_tx.ch;
diff --combined drivers/spi/spi-rspi.c
index b37de1d991d6abe1e0a25c5fffcf04d9851aba3e,018dec2fac4b7484a04f91ba165926c75147d570..55f8e55327b3fa6901d8213685b7a76b196d5f29
@@@ -1,3 -1,4 +1,4 @@@
+ // SPDX-License-Identifier: GPL-2.0
  /*
   * SH RSPI driver
   *
@@@ -6,15 -7,6 +7,6 @@@
   *
   * Based on spi-sh.c:
   * Copyright (C) 2011 Renesas Solutions Corp.
-  *
-  * This program is free software; you can redistribute it and/or modify
-  * it under the terms of the GNU General Public License as published by
-  * the Free Software Foundation; version 2 of the License.
-  *
-  * This program is distributed in the hope that it will be useful,
-  * but WITHOUT ANY WARRANTY; without even the implied warranty of
-  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  * GNU General Public License for more details.
   */
  
  #include <linux/module.h>
@@@ -598,13 -590,11 +590,13 @@@ static int rspi_dma_transfer(struct rsp
  
        ret = wait_event_interruptible_timeout(rspi->wait,
                                               rspi->dma_callbacked, HZ);
 -      if (ret > 0 && rspi->dma_callbacked)
 +      if (ret > 0 && rspi->dma_callbacked) {
                ret = 0;
 -      else if (!ret) {
 -              dev_err(&rspi->master->dev, "DMA timeout\n");
 -              ret = -ETIMEDOUT;
 +      } else {
 +              if (!ret) {
 +                      dev_err(&rspi->master->dev, "DMA timeout\n");
 +                      ret = -ETIMEDOUT;
 +              }
                if (tx)
                        dmaengine_terminate_all(rspi->master->dma_tx);
                if (rx)
@@@ -1352,36 -1342,12 +1344,36 @@@ static const struct platform_device_id 
  
  MODULE_DEVICE_TABLE(platform, spi_driver_ids);
  
 +#ifdef CONFIG_PM_SLEEP
 +static int rspi_suspend(struct device *dev)
 +{
 +      struct platform_device *pdev = to_platform_device(dev);
 +      struct rspi_data *rspi = platform_get_drvdata(pdev);
 +
 +      return spi_master_suspend(rspi->master);
 +}
 +
 +static int rspi_resume(struct device *dev)
 +{
 +      struct platform_device *pdev = to_platform_device(dev);
 +      struct rspi_data *rspi = platform_get_drvdata(pdev);
 +
 +      return spi_master_resume(rspi->master);
 +}
 +
 +static SIMPLE_DEV_PM_OPS(rspi_pm_ops, rspi_suspend, rspi_resume);
 +#define DEV_PM_OPS    &rspi_pm_ops
 +#else
 +#define DEV_PM_OPS    NULL
 +#endif /* CONFIG_PM_SLEEP */
 +
  static struct platform_driver rspi_driver = {
        .probe =        rspi_probe,
        .remove =       rspi_remove,
        .id_table =     spi_driver_ids,
        .driver         = {
                .name = "renesas_spi",
 +              .pm = DEV_PM_OPS,
                .of_match_table = of_match_ptr(rspi_of_match),
        },
  };
index 30ea0a2068e094ab47822b63da58da4778858ee3,3eb7bcd33f2258acc1aeb3cfee96f4e3bff5eb6b..adf384323934a6e432183bb16bcad27090b29881
@@@ -1,14 -1,10 +1,10 @@@
+ // SPDX-License-Identifier: GPL-2.0
  /*
   * SuperH MSIOF SPI Master Interface
   *
   * Copyright (c) 2009 Magnus Damm
   * Copyright (C) 2014 Renesas Electronics Corporation
   * Copyright (C) 2014-2017 Glider bvba
-  *
-  * This program is free software; you can redistribute it and/or modify
-  * it under the terms of the GNU General Public License version 2 as
-  * published by the Free Software Foundation.
-  *
   */
  
  #include <linux/bitmap.h>
@@@ -397,8 -393,7 +393,8 @@@ static void sh_msiof_spi_set_mode_regs(
  
  static void sh_msiof_reset_str(struct sh_msiof_spi_priv *p)
  {
 -      sh_msiof_write(p, STR, sh_msiof_read(p, STR));
 +      sh_msiof_write(p, STR,
 +                     sh_msiof_read(p, STR) & ~(STR_TDREQ | STR_RDREQ));
  }
  
  static void sh_msiof_spi_write_fifo_8(struct sh_msiof_spi_priv *p,
@@@ -1343,8 -1338,8 +1339,8 @@@ static int sh_msiof_spi_probe(struct pl
  
        i = platform_get_irq(pdev, 0);
        if (i < 0) {
 -              dev_err(&pdev->dev, "cannot get platform IRQ\n");
 -              ret = -ENOENT;
 +              dev_err(&pdev->dev, "cannot get IRQ\n");
 +              ret = i;
                goto err1;
        }
  
@@@ -1427,37 -1422,12 +1423,37 @@@ static const struct platform_device_id 
  };
  MODULE_DEVICE_TABLE(platform, spi_driver_ids);
  
 +#ifdef CONFIG_PM_SLEEP
 +static int sh_msiof_spi_suspend(struct device *dev)
 +{
 +      struct platform_device *pdev = to_platform_device(dev);
 +      struct sh_msiof_spi_priv *p = platform_get_drvdata(pdev);
 +
 +      return spi_master_suspend(p->master);
 +}
 +
 +static int sh_msiof_spi_resume(struct device *dev)
 +{
 +      struct platform_device *pdev = to_platform_device(dev);
 +      struct sh_msiof_spi_priv *p = platform_get_drvdata(pdev);
 +
 +      return spi_master_resume(p->master);
 +}
 +
 +static SIMPLE_DEV_PM_OPS(sh_msiof_spi_pm_ops, sh_msiof_spi_suspend,
 +                       sh_msiof_spi_resume);
 +#define DEV_PM_OPS    &sh_msiof_spi_pm_ops
 +#else
 +#define DEV_PM_OPS    NULL
 +#endif /* CONFIG_PM_SLEEP */
 +
  static struct platform_driver sh_msiof_spi_drv = {
        .probe          = sh_msiof_spi_probe,
        .remove         = sh_msiof_spi_remove,
        .id_table       = spi_driver_ids,
        .driver         = {
                .name           = "spi_sh_msiof",
 +              .pm             = DEV_PM_OPS,
                .of_match_table = of_match_ptr(sh_msiof_match),
        },
  };
diff --combined drivers/spi/spi.c
index 9da0bc5a036cfff6af0395ace48cad20ae9852d6,ea3e5e146764dafd4afb8037dec5df0a016d093e..42da9cf771e8367f7cef40a75555daf234c571a1
@@@ -1,18 -1,9 +1,9 @@@
+ // SPDX-License-Identifier: GPL-2.0-or-later
  /*
   * SPI init/core code
   *
   * Copyright (C) 2005 David Brownell
   * Copyright (C) 2008 Secret Lab Technologies Ltd.
-  *
-  * This program is free software; you can redistribute it and/or modify
-  * it under the terms of the GNU General Public License as published by
-  * the Free Software Foundation; either version 2 of the License, or
-  * (at your option) any later version.
-  *
-  * This program is distributed in the hope that it will be useful,
-  * but WITHOUT ANY WARRANTY; without even the implied warranty of
-  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  * GNU General Public License for more details.
   */
  
  #include <linux/kernel.h>
@@@ -60,6 -51,7 +51,7 @@@ static void spidev_release(struct devic
                spi->controller->cleanup(spi);
  
        spi_controller_put(spi->controller);
+       kfree(spi->driver_override);
        kfree(spi);
  }
  
@@@ -77,6 -69,51 +69,51 @@@ modalias_show(struct device *dev, struc
  }
  static DEVICE_ATTR_RO(modalias);
  
+ static ssize_t driver_override_store(struct device *dev,
+                                    struct device_attribute *a,
+                                    const char *buf, size_t count)
+ {
+       struct spi_device *spi = to_spi_device(dev);
+       const char *end = memchr(buf, '\n', count);
+       const size_t len = end ? end - buf : count;
+       const char *driver_override, *old;
+       /* We need to keep extra room for a newline when displaying value */
+       if (len >= (PAGE_SIZE - 1))
+               return -EINVAL;
+       driver_override = kstrndup(buf, len, GFP_KERNEL);
+       if (!driver_override)
+               return -ENOMEM;
+       device_lock(dev);
+       old = spi->driver_override;
+       if (len) {
+               spi->driver_override = driver_override;
+       } else {
+               /* Emptry string, disable driver override */
+               spi->driver_override = NULL;
+               kfree(driver_override);
+       }
+       device_unlock(dev);
+       kfree(old);
+       return count;
+ }
+ static ssize_t driver_override_show(struct device *dev,
+                                   struct device_attribute *a, char *buf)
+ {
+       const struct spi_device *spi = to_spi_device(dev);
+       ssize_t len;
+       device_lock(dev);
+       len = snprintf(buf, PAGE_SIZE, "%s\n", spi->driver_override ? : "");
+       device_unlock(dev);
+       return len;
+ }
+ static DEVICE_ATTR_RW(driver_override);
  #define SPI_STATISTICS_ATTRS(field, file)                             \
  static ssize_t spi_controller_##field##_show(struct device *dev,      \
                                             struct device_attribute *attr, \
@@@ -158,6 -195,7 +195,7 @@@ SPI_STATISTICS_SHOW(transfers_split_max
  
  static struct attribute *spi_dev_attrs[] = {
        &dev_attr_modalias.attr,
+       &dev_attr_driver_override.attr,
        NULL,
  };
  
@@@ -305,6 -343,10 +343,10 @@@ static int spi_match_device(struct devi
        const struct spi_device *spi = to_spi_device(dev);
        const struct spi_driver *sdrv = to_spi_driver(drv);
  
+       /* Check override first, and if set, only use the named driver */
+       if (spi->driver_override)
+               return strcmp(spi->driver_override, drv->name) == 0;
        /* Attempt an OF style match */
        if (of_driver_match_device(dev, drv))
                return 1;
@@@ -733,7 -775,9 +775,9 @@@ static void spi_set_cs(struct spi_devic
                enable = !enable;
  
        if (gpio_is_valid(spi->cs_gpio)) {
-               gpio_set_value(spi->cs_gpio, !enable);
+               /* Honour the SPI_NO_CS flag */
+               if (!(spi->mode & SPI_NO_CS))
+                       gpio_set_value(spi->cs_gpio, !enable);
                /* Some SPI masters need both GPIO CS & slave_select */
                if ((spi->controller->flags & SPI_MASTER_GPIO_SS) &&
                    spi->controller->set_cs)
@@@ -2143,17 -2187,8 +2187,17 @@@ int spi_register_controller(struct spi_
         */
        if (ctlr->num_chipselect == 0)
                return -EINVAL;
 -      /* allocate dynamic bus number using Linux idr */
 -      if ((ctlr->bus_num < 0) && ctlr->dev.of_node) {
 +      if (ctlr->bus_num >= 0) {
 +              /* devices with a fixed bus num must check-in with the num */
 +              mutex_lock(&board_lock);
 +              id = idr_alloc(&spi_master_idr, ctlr, ctlr->bus_num,
 +                      ctlr->bus_num + 1, GFP_KERNEL);
 +              mutex_unlock(&board_lock);
 +              if (WARN(id < 0, "couldn't get idr"))
 +                      return id == -ENOSPC ? -EBUSY : id;
 +              ctlr->bus_num = id;
 +      } else if (ctlr->dev.of_node) {
 +              /* allocate dynamic bus number using Linux idr */
                id = of_alias_get_id(ctlr->dev.of_node, "spi");
                if (id >= 0) {
                        ctlr->bus_num = id;
@@@ -2783,8 -2818,10 +2827,10 @@@ int spi_setup(struct spi_device *spi
                return -EINVAL;
        /* help drivers fail *cleanly* when they need options
         * that aren't supported with their current controller
+        * SPI_CS_WORD has a fallback software implementation,
+        * so it is ignored here.
         */
-       bad_bits = spi->mode & ~spi->controller->mode_bits;
+       bad_bits = spi->mode & ~(spi->controller->mode_bits | SPI_CS_WORD);
        ugly_bits = bad_bits &
                    (SPI_TX_DUAL | SPI_TX_QUAD | SPI_RX_DUAL | SPI_RX_QUAD);
        if (ugly_bits) {
@@@ -2838,6 -2875,35 +2884,35 @@@ static int __spi_validate(struct spi_de
        if (list_empty(&message->transfers))
                return -EINVAL;
  
+       /* If an SPI controller does not support toggling the CS line on each
+        * transfer (indicated by the SPI_CS_WORD flag) or we are using a GPIO
+        * for the CS line, we can emulate the CS-per-word hardware function by
+        * splitting transfers into one-word transfers and ensuring that
+        * cs_change is set for each transfer.
+        */
+       if ((spi->mode & SPI_CS_WORD) && (!(ctlr->mode_bits & SPI_CS_WORD) ||
+                                         gpio_is_valid(spi->cs_gpio))) {
+               size_t maxsize;
+               int ret;
+               maxsize = (spi->bits_per_word + 7) / 8;
+               /* spi_split_transfers_maxsize() requires message->spi */
+               message->spi = spi;
+               ret = spi_split_transfers_maxsize(ctlr, message, maxsize,
+                                                 GFP_KERNEL);
+               if (ret)
+                       return ret;
+               list_for_each_entry(xfer, &message->transfers, transfer_list) {
+                       /* don't change cs_change on the last entry in the list */
+                       if (list_is_last(&xfer->transfer_list, &message->transfers))
+                               break;
+                       xfer->cs_change = 1;
+               }
+       }
        /* Half-duplex links include original MicroWire, and ones with
         * only one data pin like SPI_3WIRE (switches direction) or where
         * either MOSI or MISO is missing.  They can also be caused by
diff --combined include/linux/pci.h
index 6925828f9f250fae21e19ef8338d46694621e2a2,d2f14eb23ea4c11eccf23e1e27f777a9738b2e66..2c47550324752edab8faaa5dedbd99f94918ccf9
@@@ -1235,9 -1235,6 +1235,9 @@@ void pci_bus_remove_resources(struct pc
  int devm_request_pci_bus_resources(struct device *dev,
                                   struct list_head *resources);
  
 +/* Temporary until new and working PCI SBR API in place */
 +int pci_bridge_secondary_bus_reset(struct pci_dev *dev);
 +
  #define pci_bus_for_each_resource(bus, res, i)                                \
        for (i = 0;                                                     \
            (res = pci_bus_resource_n(bus, i)) || i < PCI_BRIDGE_RESOURCE_NUM; \
@@@ -1705,6 -1702,10 +1705,10 @@@ static inline int pci_irqd_intx_xlate(s
                                      unsigned long *out_hwirq,
                                      unsigned int *out_type)
  { return -EINVAL; }
+ static inline const struct pci_device_id *pci_match_id(const struct pci_device_id *ids,
+                                                        struct pci_dev *dev)
+ { return NULL; }
  #endif /* CONFIG_PCI */
  
  /* Include architecture-dependent settings and functions */
This page took 0.092479 seconds and 4 git commands to generate.