1. 18 9月, 2019 2 次提交
  2. 10 7月, 2019 1 次提交
    • Y
      PCI: dwc: pci-dra7xx: Fix compilation when !CONFIG_GPIOLIB · 381ed79c
      YueHaibing 提交于
      If CONFIG_GPIOLIB is not selected the compilation results in the
      following build errors:
      
      drivers/pci/controller/dwc/pci-dra7xx.c:
       In function dra7xx_pcie_probe:
      drivers/pci/controller/dwc/pci-dra7xx.c:777:10:
       error: implicit declaration of function devm_gpiod_get_optional;
       did you mean devm_regulator_get_optional? [-Werror=implicit-function-declaration]
      
        reset = devm_gpiod_get_optional(dev, NULL, GPIOD_OUT_HIGH);
      
      drivers/pci/controller/dwc/pci-dra7xx.c:778:45: error: ‘GPIOD_OUT_HIGH’
      undeclared (first use in this function); did you mean ‘GPIOF_INIT_HIGH’?
        reset = devm_gpiod_get_optional(dev, NULL, GPIOD_OUT_HIGH);
                                                   ^~~~~~~~~~~~~~
                                                   GPIOF_INIT_HIGH
      
      Fix them by including the appropriate header file.
      Reported-by: NHulk Robot <hulkci@huawei.com>
      Signed-off-by: NYueHaibing <yuehaibing@huawei.com>
      [lorenzo.pieralisi@arm.com: commit log]
      Signed-off-by: NLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
      Acked-by: NKishon Vijay Abraham I <kishon@ti.com>
      381ed79c
  3. 09 7月, 2019 1 次提交
  4. 08 7月, 2019 26 次提交
  5. 05 7月, 2019 5 次提交
  6. 27 6月, 2019 3 次提交
  7. 26 6月, 2019 1 次提交
    • B
      PCI: xilinx-nwl: Fix Multi MSI data programming · 181fa434
      Bharat Kumar Gogada 提交于
      According to the PCI Local Bus specification Revision 3.0,
      section 6.8.1.3 (Message Control for MSI), endpoints that
      are Multiple Message Capable as defined by bits [3:1] in
      the Message Control for MSI can request a number of vectors
      that is power of two aligned.
      
      As specified in section 6.8.1.6 "Message data for MSI", the Multiple
      Message Enable field (bits [6:4] of the Message Control register)
      defines the number of low order message data bits the function is
      permitted to modify to generate its system software allocated
      vectors.
      
      The MSI controller in the Xilinx NWL PCIe controller supports a number
      of MSI vectors specified through a bitmap and the hwirq number for an
      MSI, that is the value written in the MSI data TLP is determined by
      the bitmap allocation.
      
      For instance, in a situation where two endpoints sitting on
      the PCI bus request the following MSI configuration, with
      the current PCI Xilinx bitmap allocation code (that does not
      align MSI vector allocation on a power of two boundary):
      
      Endpoint #1: Requesting 1 MSI vector - allocated bitmap bits 0
      Endpoint #2: Requesting 2 MSI vectors - allocated bitmap bits [1,2]
      
      The bitmap value(s) corresponds to the hwirq number that is programmed
      into the Message Data for MSI field in the endpoint MSI capability
      and is detected by the root complex to fire the corresponding
      MSI irqs. The value written in Message Data for MSI field corresponds
      to the first bit allocated in the bitmap for Multi MSI vectors.
      
      The current Xilinx NWL MSI allocation code allows a bitmap allocation
      that is not a power of two boundaries, so endpoint #2, is allowed to
      toggle Message Data bit[0] to differentiate between its two vectors
      (meaning that the MSI data will be respectively 0x0 and 0x1 for the two
      vectors allocated to endpoint #2).
      
      This clearly aliases with the Endpoint #1 vector allocation, resulting
      in a broken Multi MSI implementation.
      
      Update the code to allocate MSI bitmap ranges with a power of two
      alignment, fixing the bug.
      
      Fixes: ab597d35 ("PCI: xilinx-nwl: Add support for Xilinx NWL PCIe Host Controller")
      Suggested-by: NMarc Zyngier <marc.zyngier@arm.com>
      Signed-off-by: NBharat Kumar Gogada <bharat.kumar.gogada@xilinx.com>
      [lorenzo.pieralisi@arm.com: updated commit log]
      Signed-off-by: NLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
      Acked-by: NMarc Zyngier <marc.zyngier@arm.com>
      181fa434
  8. 21 6月, 2019 1 次提交