MIPS: Reorganize Cavium OCTEON PCI support.

Move the cavium PCI files to the arch/mips/pci directory. Also cleanup
comment formatting and code layout. Code from pci-common.c, was moved
into other files.

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

authored by David Daney and committed by Ralf Baechle 01a6221a ada8e951

+197 -221
-4
arch/mips/cavium-octeon/Makefile
··· 14 14 obj-y += octeon-memcpy.o 15 15 16 16 obj-$(CONFIG_SMP) += smp.o 17 - obj-$(CONFIG_PCI) += pci-common.o 18 - obj-$(CONFIG_PCI) += pci.o 19 - obj-$(CONFIG_PCI) += pcie.o 20 - obj-$(CONFIG_PCI_MSI) += msi.o 21 17 22 18 EXTRA_CFLAGS += -Werror
+1 -1
arch/mips/cavium-octeon/dma-octeon.c
··· 29 29 #include <dma-coherence.h> 30 30 31 31 #ifdef CONFIG_PCI 32 - #include "pci-common.h" 32 + #include <asm/octeon/pci-octeon.h> 33 33 #endif 34 34 35 35 #define BAR2_PCI_ADDRESS 0x8000000000ul
+28 -28
arch/mips/cavium-octeon/msi.c arch/mips/pci/msi-octeon.c
··· 3 3 * License. See the file "COPYING" in the main directory of this archive 4 4 * for more details. 5 5 * 6 - * Copyright (C) 2005-2007 Cavium Networks 6 + * Copyright (C) 2005-2009 Cavium Networks 7 7 */ 8 8 #include <linux/kernel.h> 9 9 #include <linux/init.h> ··· 16 16 #include <asm/octeon/cvmx-pci-defs.h> 17 17 #include <asm/octeon/cvmx-npei-defs.h> 18 18 #include <asm/octeon/cvmx-pexp-defs.h> 19 - 20 - #include "pci-common.h" 19 + #include <asm/octeon/pci-octeon.h> 21 20 22 21 /* 23 22 * Each bit in msi_free_irq_bitmask represents a MSI interrupt that is ··· 46 47 * programming the MSI control bits [6:4] before calling 47 48 * pci_enable_msi(). 48 49 * 49 - * @param dev Device requesting MSI interrupts 50 - * @param desc MSI descriptor 50 + * @dev: Device requesting MSI interrupts 51 + * @desc: MSI descriptor 51 52 * 52 53 * Returns 0 on success. 53 54 */ ··· 212 213 } 213 214 214 215 215 - /** 216 + /* 216 217 * Called by the interrupt handling code when an MSI interrupt 217 218 * occurs. 218 - * 219 - * @param cpl 220 - * @param dev_id 221 - * 222 - * @return 223 219 */ 224 220 static irqreturn_t octeon_msi_interrupt(int cpl, void *dev_id) 225 221 { ··· 250 256 } 251 257 252 258 253 - /** 259 + /* 254 260 * Initializes the MSI interrupt handling code 255 - * 256 - * @return 257 261 */ 258 262 int octeon_msi_initialize(void) 259 263 { 260 - int r; 261 264 if (octeon_has_feature(OCTEON_FEATURE_PCIE)) { 262 - r = request_irq(OCTEON_IRQ_PCI_MSI0, octeon_msi_interrupt, 265 + if (request_irq(OCTEON_IRQ_PCI_MSI0, octeon_msi_interrupt, 263 266 IRQF_SHARED, 264 - "MSI[0:63]", octeon_msi_interrupt); 267 + "MSI[0:63]", octeon_msi_interrupt)) 268 + panic("request_irq(OCTEON_IRQ_PCI_MSI0) failed"); 265 269 } else if (octeon_is_pci_host()) { 266 - r = request_irq(OCTEON_IRQ_PCI_MSI0, octeon_msi_interrupt, 270 + if (request_irq(OCTEON_IRQ_PCI_MSI0, octeon_msi_interrupt, 267 271 IRQF_SHARED, 268 - "MSI[0:15]", octeon_msi_interrupt); 269 - r += request_irq(OCTEON_IRQ_PCI_MSI1, octeon_msi_interrupt, 270 - IRQF_SHARED, 271 - "MSI[16:31]", octeon_msi_interrupt); 272 - r += request_irq(OCTEON_IRQ_PCI_MSI2, octeon_msi_interrupt, 273 - IRQF_SHARED, 274 - "MSI[32:47]", octeon_msi_interrupt); 275 - r += request_irq(OCTEON_IRQ_PCI_MSI3, octeon_msi_interrupt, 276 - IRQF_SHARED, 277 - "MSI[48:63]", octeon_msi_interrupt); 272 + "MSI[0:15]", octeon_msi_interrupt)) 273 + panic("request_irq(OCTEON_IRQ_PCI_MSI0) failed"); 274 + 275 + if (request_irq(OCTEON_IRQ_PCI_MSI1, octeon_msi_interrupt, 276 + IRQF_SHARED, 277 + "MSI[16:31]", octeon_msi_interrupt)) 278 + panic("request_irq(OCTEON_IRQ_PCI_MSI1) failed"); 279 + 280 + if (request_irq(OCTEON_IRQ_PCI_MSI2, octeon_msi_interrupt, 281 + IRQF_SHARED, 282 + "MSI[32:47]", octeon_msi_interrupt)) 283 + panic("request_irq(OCTEON_IRQ_PCI_MSI2) failed"); 284 + 285 + if (request_irq(OCTEON_IRQ_PCI_MSI3, octeon_msi_interrupt, 286 + IRQF_SHARED, 287 + "MSI[48:63]", octeon_msi_interrupt)) 288 + panic("request_irq(OCTEON_IRQ_PCI_MSI3) failed"); 289 + 278 290 } 279 291 return 0; 280 292 }
-137
arch/mips/cavium-octeon/pci-common.c
··· 1 - /* 2 - * This file is subject to the terms and conditions of the GNU General Public 3 - * License. See the file "COPYING" in the main directory of this archive 4 - * for more details. 5 - * 6 - * Copyright (C) 2005-2007 Cavium Networks 7 - */ 8 - #include <linux/kernel.h> 9 - #include <linux/init.h> 10 - #include <linux/pci.h> 11 - #include <linux/interrupt.h> 12 - #include <linux/time.h> 13 - #include <linux/delay.h> 14 - #include "pci-common.h" 15 - 16 - typeof(pcibios_map_irq) *octeon_pcibios_map_irq; 17 - enum octeon_dma_bar_type octeon_dma_bar_type = OCTEON_DMA_BAR_TYPE_INVALID; 18 - 19 - /** 20 - * Map a PCI device to the appropriate interrupt line 21 - * 22 - * @param dev The Linux PCI device structure for the device to map 23 - * @param slot The slot number for this device on __BUS 0__. Linux 24 - * enumerates through all the bridges and figures out the 25 - * slot on Bus 0 where this device eventually hooks to. 26 - * @param pin The PCI interrupt pin read from the device, then swizzled 27 - * as it goes through each bridge. 28 - * @return Interrupt number for the device 29 - */ 30 - int __init pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) 31 - { 32 - if (octeon_pcibios_map_irq) 33 - return octeon_pcibios_map_irq(dev, slot, pin); 34 - else 35 - panic("octeon_pcibios_map_irq doesn't point to a " 36 - "pcibios_map_irq() function"); 37 - } 38 - 39 - 40 - /** 41 - * Called to perform platform specific PCI setup 42 - * 43 - * @param dev 44 - * @return 45 - */ 46 - int pcibios_plat_dev_init(struct pci_dev *dev) 47 - { 48 - uint16_t config; 49 - uint32_t dconfig; 50 - int pos; 51 - /* 52 - * Force the Cache line setting to 64 bytes. The standard 53 - * Linux bus scan doesn't seem to set it. Octeon really has 54 - * 128 byte lines, but Intel bridges get really upset if you 55 - * try and set values above 64 bytes. Value is specified in 56 - * 32bit words. 57 - */ 58 - pci_write_config_byte(dev, PCI_CACHE_LINE_SIZE, 64 / 4); 59 - /* Set latency timers for all devices */ 60 - pci_write_config_byte(dev, PCI_LATENCY_TIMER, 48); 61 - 62 - /* Enable reporting System errors and parity errors on all devices */ 63 - /* Enable parity checking and error reporting */ 64 - pci_read_config_word(dev, PCI_COMMAND, &config); 65 - config |= PCI_COMMAND_PARITY | PCI_COMMAND_SERR; 66 - pci_write_config_word(dev, PCI_COMMAND, config); 67 - 68 - if (dev->subordinate) { 69 - /* Set latency timers on sub bridges */ 70 - pci_write_config_byte(dev, PCI_SEC_LATENCY_TIMER, 48); 71 - /* More bridge error detection */ 72 - pci_read_config_word(dev, PCI_BRIDGE_CONTROL, &config); 73 - config |= PCI_BRIDGE_CTL_PARITY | PCI_BRIDGE_CTL_SERR; 74 - pci_write_config_word(dev, PCI_BRIDGE_CONTROL, config); 75 - } 76 - 77 - /* Enable the PCIe normal error reporting */ 78 - pos = pci_find_capability(dev, PCI_CAP_ID_EXP); 79 - if (pos) { 80 - /* Update Device Control */ 81 - pci_read_config_word(dev, pos + PCI_EXP_DEVCTL, &config); 82 - /* Correctable Error Reporting */ 83 - config |= PCI_EXP_DEVCTL_CERE; 84 - /* Non-Fatal Error Reporting */ 85 - config |= PCI_EXP_DEVCTL_NFERE; 86 - /* Fatal Error Reporting */ 87 - config |= PCI_EXP_DEVCTL_FERE; 88 - /* Unsupported Request */ 89 - config |= PCI_EXP_DEVCTL_URRE; 90 - pci_write_config_word(dev, pos + PCI_EXP_DEVCTL, config); 91 - } 92 - 93 - /* Find the Advanced Error Reporting capability */ 94 - pos = pci_find_ext_capability(dev, PCI_EXT_CAP_ID_ERR); 95 - if (pos) { 96 - /* Clear Uncorrectable Error Status */ 97 - pci_read_config_dword(dev, pos + PCI_ERR_UNCOR_STATUS, 98 - &dconfig); 99 - pci_write_config_dword(dev, pos + PCI_ERR_UNCOR_STATUS, 100 - dconfig); 101 - /* Enable reporting of all uncorrectable errors */ 102 - /* Uncorrectable Error Mask - turned on bits disable errors */ 103 - pci_write_config_dword(dev, pos + PCI_ERR_UNCOR_MASK, 0); 104 - /* 105 - * Leave severity at HW default. This only controls if 106 - * errors are reported as uncorrectable or 107 - * correctable, not if the error is reported. 108 - */ 109 - /* PCI_ERR_UNCOR_SEVER - Uncorrectable Error Severity */ 110 - /* Clear Correctable Error Status */ 111 - pci_read_config_dword(dev, pos + PCI_ERR_COR_STATUS, &dconfig); 112 - pci_write_config_dword(dev, pos + PCI_ERR_COR_STATUS, dconfig); 113 - /* Enable reporting of all correctable errors */ 114 - /* Correctable Error Mask - turned on bits disable errors */ 115 - pci_write_config_dword(dev, pos + PCI_ERR_COR_MASK, 0); 116 - /* Advanced Error Capabilities */ 117 - pci_read_config_dword(dev, pos + PCI_ERR_CAP, &dconfig); 118 - /* ECRC Generation Enable */ 119 - if (config & PCI_ERR_CAP_ECRC_GENC) 120 - config |= PCI_ERR_CAP_ECRC_GENE; 121 - /* ECRC Check Enable */ 122 - if (config & PCI_ERR_CAP_ECRC_CHKC) 123 - config |= PCI_ERR_CAP_ECRC_CHKE; 124 - pci_write_config_dword(dev, pos + PCI_ERR_CAP, dconfig); 125 - /* PCI_ERR_HEADER_LOG - Header Log Register (16 bytes) */ 126 - /* Report all errors to the root complex */ 127 - pci_write_config_dword(dev, pos + PCI_ERR_ROOT_COMMAND, 128 - PCI_ERR_ROOT_CMD_COR_EN | 129 - PCI_ERR_ROOT_CMD_NONFATAL_EN | 130 - PCI_ERR_ROOT_CMD_FATAL_EN); 131 - /* Clear the Root status register */ 132 - pci_read_config_dword(dev, pos + PCI_ERR_ROOT_STATUS, &dconfig); 133 - pci_write_config_dword(dev, pos + PCI_ERR_ROOT_STATUS, dconfig); 134 - } 135 - 136 - return 0; 137 - }
+18 -12
arch/mips/cavium-octeon/pci-common.h arch/mips/include/asm/octeon/pci-octeon.h
··· 3 3 * License. See the file "COPYING" in the main directory of this archive 4 4 * for more details. 5 5 * 6 - * Copyright (C) 2005-2007 Cavium Networks 6 + * Copyright (C) 2005-2009 Cavium Networks 7 7 */ 8 - #ifndef __OCTEON_PCI_COMMON_H__ 9 - #define __OCTEON_PCI_COMMON_H__ 8 + 9 + #ifndef __PCI_OCTEON_H__ 10 + #define __PCI_OCTEON_H__ 10 11 11 12 #include <linux/pci.h> 12 13 13 14 /* Some PCI cards require delays when accessing config space. */ 14 15 #define PCI_CONFIG_SPACE_DELAY 10000 15 16 16 - /* pcibios_map_irq() is defined inside pci-common.c. All it does is call the 17 - Octeon specific version pointed to by this variable. This function needs to 18 - change for PCI or PCIe based hosts */ 19 - extern typeof(pcibios_map_irq) *octeon_pcibios_map_irq; 17 + /* 18 + * pcibios_map_irq() is defined inside pci-octeon.c. All it does is 19 + * call the Octeon specific version pointed to by this variable. This 20 + * function needs to change for PCI or PCIe based hosts. 21 + */ 22 + extern int (*octeon_pcibios_map_irq)(const struct pci_dev *dev, 23 + u8 slot, u8 pin); 20 24 21 - /* The following defines are only used when octeon_dma_bar_type = 22 - OCTEON_DMA_BAR_TYPE_BIG */ 25 + /* 26 + * The following defines are used when octeon_dma_bar_type = 27 + * OCTEON_DMA_BAR_TYPE_BIG 28 + */ 23 29 #define OCTEON_PCI_BAR1_HOLE_BITS 5 24 30 #define OCTEON_PCI_BAR1_HOLE_SIZE (1ul<<(OCTEON_PCI_BAR1_HOLE_BITS+3)) 25 31 ··· 36 30 OCTEON_DMA_BAR_TYPE_PCIE 37 31 }; 38 32 39 - /** 40 - * This is a variable to tell the DMA mapping system in dma-octeon.c 41 - * how to map PCI DMA addresses. 33 + /* 34 + * This tells the DMA mapping system in dma-octeon.c how to map PCI 35 + * DMA addresses. 42 36 */ 43 37 extern enum octeon_dma_bar_type octeon_dma_bar_type; 44 38
+127 -20
arch/mips/cavium-octeon/pci.c arch/mips/pci/pci-octeon.c
··· 3 3 * License. See the file "COPYING" in the main directory of this archive 4 4 * for more details. 5 5 * 6 - * Copyright (C) 2005-2007 Cavium Networks 6 + * Copyright (C) 2005-2009 Cavium Networks 7 7 */ 8 8 #include <linux/kernel.h> 9 9 #include <linux/init.h> ··· 17 17 #include <asm/octeon/octeon.h> 18 18 #include <asm/octeon/cvmx-npi-defs.h> 19 19 #include <asm/octeon/cvmx-pci-defs.h> 20 - 21 - #include "pci-common.h" 20 + #include <asm/octeon/pci-octeon.h> 22 21 23 22 #define USE_OCTEON_INTERNAL_ARBITER 24 23 ··· 52 53 uint64_t reg:8; 53 54 } s; 54 55 }; 56 + 57 + int __initdata (*octeon_pcibios_map_irq)(const struct pci_dev *dev, 58 + u8 slot, u8 pin); 59 + enum octeon_dma_bar_type octeon_dma_bar_type = OCTEON_DMA_BAR_TYPE_INVALID; 60 + 61 + /** 62 + * Map a PCI device to the appropriate interrupt line 63 + * 64 + * @dev: The Linux PCI device structure for the device to map 65 + * @slot: The slot number for this device on __BUS 0__. Linux 66 + * enumerates through all the bridges and figures out the 67 + * slot on Bus 0 where this device eventually hooks to. 68 + * @pin: The PCI interrupt pin read from the device, then swizzled 69 + * as it goes through each bridge. 70 + * Returns Interrupt number for the device 71 + */ 72 + int __init pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) 73 + { 74 + if (octeon_pcibios_map_irq) 75 + return octeon_pcibios_map_irq(dev, slot, pin); 76 + else 77 + panic("octeon_pcibios_map_irq not set."); 78 + } 79 + 80 + 81 + /* 82 + * Called to perform platform specific PCI setup 83 + */ 84 + int pcibios_plat_dev_init(struct pci_dev *dev) 85 + { 86 + uint16_t config; 87 + uint32_t dconfig; 88 + int pos; 89 + /* 90 + * Force the Cache line setting to 64 bytes. The standard 91 + * Linux bus scan doesn't seem to set it. Octeon really has 92 + * 128 byte lines, but Intel bridges get really upset if you 93 + * try and set values above 64 bytes. Value is specified in 94 + * 32bit words. 95 + */ 96 + pci_write_config_byte(dev, PCI_CACHE_LINE_SIZE, 64 / 4); 97 + /* Set latency timers for all devices */ 98 + pci_write_config_byte(dev, PCI_LATENCY_TIMER, 48); 99 + 100 + /* Enable reporting System errors and parity errors on all devices */ 101 + /* Enable parity checking and error reporting */ 102 + pci_read_config_word(dev, PCI_COMMAND, &config); 103 + config |= PCI_COMMAND_PARITY | PCI_COMMAND_SERR; 104 + pci_write_config_word(dev, PCI_COMMAND, config); 105 + 106 + if (dev->subordinate) { 107 + /* Set latency timers on sub bridges */ 108 + pci_write_config_byte(dev, PCI_SEC_LATENCY_TIMER, 48); 109 + /* More bridge error detection */ 110 + pci_read_config_word(dev, PCI_BRIDGE_CONTROL, &config); 111 + config |= PCI_BRIDGE_CTL_PARITY | PCI_BRIDGE_CTL_SERR; 112 + pci_write_config_word(dev, PCI_BRIDGE_CONTROL, config); 113 + } 114 + 115 + /* Enable the PCIe normal error reporting */ 116 + pos = pci_find_capability(dev, PCI_CAP_ID_EXP); 117 + if (pos) { 118 + /* Update Device Control */ 119 + pci_read_config_word(dev, pos + PCI_EXP_DEVCTL, &config); 120 + /* Correctable Error Reporting */ 121 + config |= PCI_EXP_DEVCTL_CERE; 122 + /* Non-Fatal Error Reporting */ 123 + config |= PCI_EXP_DEVCTL_NFERE; 124 + /* Fatal Error Reporting */ 125 + config |= PCI_EXP_DEVCTL_FERE; 126 + /* Unsupported Request */ 127 + config |= PCI_EXP_DEVCTL_URRE; 128 + pci_write_config_word(dev, pos + PCI_EXP_DEVCTL, config); 129 + } 130 + 131 + /* Find the Advanced Error Reporting capability */ 132 + pos = pci_find_ext_capability(dev, PCI_EXT_CAP_ID_ERR); 133 + if (pos) { 134 + /* Clear Uncorrectable Error Status */ 135 + pci_read_config_dword(dev, pos + PCI_ERR_UNCOR_STATUS, 136 + &dconfig); 137 + pci_write_config_dword(dev, pos + PCI_ERR_UNCOR_STATUS, 138 + dconfig); 139 + /* Enable reporting of all uncorrectable errors */ 140 + /* Uncorrectable Error Mask - turned on bits disable errors */ 141 + pci_write_config_dword(dev, pos + PCI_ERR_UNCOR_MASK, 0); 142 + /* 143 + * Leave severity at HW default. This only controls if 144 + * errors are reported as uncorrectable or 145 + * correctable, not if the error is reported. 146 + */ 147 + /* PCI_ERR_UNCOR_SEVER - Uncorrectable Error Severity */ 148 + /* Clear Correctable Error Status */ 149 + pci_read_config_dword(dev, pos + PCI_ERR_COR_STATUS, &dconfig); 150 + pci_write_config_dword(dev, pos + PCI_ERR_COR_STATUS, dconfig); 151 + /* Enable reporting of all correctable errors */ 152 + /* Correctable Error Mask - turned on bits disable errors */ 153 + pci_write_config_dword(dev, pos + PCI_ERR_COR_MASK, 0); 154 + /* Advanced Error Capabilities */ 155 + pci_read_config_dword(dev, pos + PCI_ERR_CAP, &dconfig); 156 + /* ECRC Generation Enable */ 157 + if (config & PCI_ERR_CAP_ECRC_GENC) 158 + config |= PCI_ERR_CAP_ECRC_GENE; 159 + /* ECRC Check Enable */ 160 + if (config & PCI_ERR_CAP_ECRC_CHKC) 161 + config |= PCI_ERR_CAP_ECRC_CHKE; 162 + pci_write_config_dword(dev, pos + PCI_ERR_CAP, dconfig); 163 + /* PCI_ERR_HEADER_LOG - Header Log Register (16 bytes) */ 164 + /* Report all errors to the root complex */ 165 + pci_write_config_dword(dev, pos + PCI_ERR_ROOT_COMMAND, 166 + PCI_ERR_ROOT_CMD_COR_EN | 167 + PCI_ERR_ROOT_CMD_NONFATAL_EN | 168 + PCI_ERR_ROOT_CMD_FATAL_EN); 169 + /* Clear the Root status register */ 170 + pci_read_config_dword(dev, pos + PCI_ERR_ROOT_STATUS, &dconfig); 171 + pci_write_config_dword(dev, pos + PCI_ERR_ROOT_STATUS, dconfig); 172 + } 173 + 174 + return 0; 175 + } 55 176 56 177 /** 57 178 * Return the mapping of PCI device number to IRQ line. Each ··· 255 136 } 256 137 257 138 258 - /** 139 + /* 259 140 * Read a value from configuration space 260 - * 261 141 */ 262 142 static int octeon_read_config(struct pci_bus *bus, unsigned int devfn, 263 143 int reg, int size, u32 *val) ··· 292 174 } 293 175 294 176 295 - /** 177 + /* 296 178 * Write a value to PCI configuration space 297 - * 298 - * @bus: 299 - * @devfn: 300 - * @reg: 301 - * @size: 302 - * @val: 303 - * Returns 304 179 */ 305 180 static int octeon_write_config(struct pci_bus *bus, unsigned int devfn, 306 181 int reg, int size, u32 val) ··· 362 251 }; 363 252 364 253 365 - /** 254 + /* 366 255 * Low level initialize the Octeon PCI controller 367 - * 368 - * Returns 369 256 */ 370 257 static void octeon_pci_initialize(void) 371 258 { ··· 507 398 pci_int_arb_cfg.s.en = 1; /* Internal arbiter enable */ 508 399 cvmx_write_csr(CVMX_NPI_PCI_INT_ARB_CFG, pci_int_arb_cfg.u64); 509 400 } 510 - #endif /* USE_OCTEON_INTERNAL_ARBITER */ 401 + #endif /* USE_OCTEON_INTERNAL_ARBITER */ 511 402 512 403 /* 513 404 * Preferrably written to 1 to set MLTD. [RDSATI,TRTAE, ··· 566 457 } 567 458 568 459 569 - /** 460 + /* 570 461 * Initialize the Octeon PCI controller 571 - * 572 - * Returns 573 462 */ 574 463 static int __init octeon_pci_setup(void) 575 464 {
+18 -19
arch/mips/cavium-octeon/pcie.c arch/mips/pci/pcie-octeon.c
··· 18 18 #include <asm/octeon/cvmx-pescx-defs.h> 19 19 #include <asm/octeon/cvmx-pexp-defs.h> 20 20 #include <asm/octeon/cvmx-helper-errata.h> 21 - 22 - #include "pci-common.h" 21 + #include <asm/octeon/pci-octeon.h> 23 22 24 23 union cvmx_pcie_address { 25 24 uint64_t u64; ··· 975 976 /** 976 977 * Map a PCI device to the appropriate interrupt line 977 978 * 978 - * @param dev The Linux PCI device structure for the device to map 979 - * @param slot The slot number for this device on __BUS 0__. Linux 979 + * @dev: The Linux PCI device structure for the device to map 980 + * @slot: The slot number for this device on __BUS 0__. Linux 980 981 * enumerates through all the bridges and figures out the 981 982 * slot on Bus 0 where this device eventually hooks to. 982 - * @param pin The PCI interrupt pin read from the device, then swizzled 983 + * @pin: The PCI interrupt pin read from the device, then swizzled 983 984 * as it goes through each bridge. 984 - * @return Interrupt number for the device 985 + * Returns Interrupt number for the device 985 986 */ 986 987 int __init octeon_pcie_pcibios_map_irq(const struct pci_dev *dev, 987 988 u8 slot, u8 pin) ··· 1024 1025 /** 1025 1026 * Read a value from configuration space 1026 1027 * 1027 - * @param bus 1028 - * @param devfn 1029 - * @param reg 1030 - * @param size 1031 - * @param val 1032 - * @return 1028 + * @bus: 1029 + * @devfn: 1030 + * @reg: 1031 + * @size: 1032 + * @val: 1033 + * Returns 1033 1034 */ 1034 1035 static inline int octeon_pcie_read_config(int pcie_port, struct pci_bus *bus, 1035 1036 unsigned int devfn, int reg, int size, ··· 1155 1156 /** 1156 1157 * Write a value to PCI configuration space 1157 1158 * 1158 - * @param bus 1159 - * @param devfn 1160 - * @param reg 1161 - * @param size 1162 - * @param val 1163 - * @return 1159 + * @bus: 1160 + * @devfn: 1161 + * @reg: 1162 + * @size: 1163 + * @val: 1164 + * Returns 1164 1165 */ 1165 1166 static inline int octeon_pcie_write_config(int pcie_port, struct pci_bus *bus, 1166 1167 unsigned int devfn, int reg, ··· 1253 1254 /** 1254 1255 * Initialize the Octeon PCIe controllers 1255 1256 * 1256 - * @return 1257 + * Returns 1257 1258 */ 1258 1259 static int __init octeon_pcie_setup(void) 1259 1260 {
+5
arch/mips/pci/Makefile
··· 52 52 obj-$(CONFIG_ZAO_CAPCELLA) += fixup-capcella.o 53 53 obj-$(CONFIG_WR_PPMC) += fixup-wrppmc.o 54 54 obj-$(CONFIG_MIKROTIK_RB532) += pci-rc32434.o ops-rc32434.o fixup-rc32434.o 55 + obj-$(CONFIG_CPU_CAVIUM_OCTEON) += pci-octeon.o pcie-octeon.o 56 + 57 + ifdef CONFIG_PCI_MSI 58 + obj-$(CONFIG_CPU_CAVIUM_OCTEON) += msi-octeon.o 59 + endif