You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
Merge tag 'pci-v3.16-changes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci
Pull more PCI updates from Bjorn Helgaas:
"Here are some more things I'd like to see in v3.16-rc1:
- DMA alias iterator, part of some work to fix IOMMU issues
- MVEBU, Tegra, DesignWare changes that I forgot to include before
- Some whitespace code cleanup
Details:
IOMMU
- Add DMA alias iterator (Alex Williamson)
- Add DMA alias quirks for ASMedia, ITE, Tundra bridges (Alex Williamson)
- Add DMA alias quirks for Marvell, Ricoh devices (Alex Williamson)
- Add DMA alias quirk for HighPoint devices (Jérôme Carretero)
MSI
- Fix leak in free_msi_irqs() (Alexei Starovoitov)
Marvell MVEBU
- Remove unnecessary use of 'conf_lock' spinlock (Andrew Murray)
- Avoid setting an undefined window size (Jason Gunthorpe)
- Allow several windows with the same target/attribute (Thomas Petazzoni)
- Split PCIe BARs into multiple MBus windows when needed (Thomas Petazzoni)
- Fix off-by-one in the computed size of the mbus windows (Willy Tarreau)
NVIDIA Tegra
- Use new OF interrupt mapping when possible (Lucas Stach)
Synopsys DesignWare
- Remove unnecessary use of 'conf_lock' spinlock (Andrew Murray)
- Use new OF interrupt mapping when possible (Lucas Stach)
- Split Exynos and i.MX bindings (Lucas Stach)
- Fix comment for setting number of lanes (Mohit Kumar)
- Fix iATU programming for cfg1, io and mem viewport (Mohit Kumar)
Miscellaneous
- EXPORT_SYMBOL cleanup (Ryan Desfosses)
- Whitespace cleanup (Ryan Desfosses)
- Merge multi-line quoted strings (Ryan Desfosses)"
* tag 'pci-v3.16-changes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: (21 commits)
PCI: Add function 1 DMA alias quirk for HighPoint RocketRaid 642L
PCI/MSI: Fix memory leak in free_msi_irqs()
PCI: Merge multi-line quoted strings
PCI: Whitespace cleanup
PCI: Move EXPORT_SYMBOL so it immediately follows function/variable
PCI: Add bridge DMA alias quirk for ITE bridge
PCI: designware: Split Exynos and i.MX bindings
PCI: Add bridge DMA alias quirk for ASMedia and Tundra bridges
PCI: Add support for PCIe-to-PCI bridge DMA alias quirks
PCI: Add function 1 DMA alias quirk for Marvell devices
PCI: Add function 0 DMA alias quirk for Ricoh devices
PCI: Add support for DMA alias quirks
PCI: Convert pci_dev_flags definitions to bit shifts
PCI: Add DMA alias iterator
PCI: mvebu: Use '%pa' for printing 'phys_addr_t' type
PCI: mvebu: Remove unnecessary use of 'conf_lock' spinlock
PCI: designware: Remove unnecessary use of 'conf_lock' spinlock
PCI: designware: Use new OF interrupt mapping when possible
PCI: designware: Fix iATU programming for cfg1, io and mem viewport
PCI: designware: Fix comment for setting number of lanes
...
This commit is contained in:
@@ -1,15 +1,7 @@
|
||||
* Synopsys Designware PCIe interface
|
||||
|
||||
Required properties:
|
||||
- compatible: should contain "snps,dw-pcie" to identify the
|
||||
core, plus an identifier for the specific instance, such
|
||||
as "samsung,exynos5440-pcie" or "fsl,imx6q-pcie".
|
||||
- reg: base addresses and lengths of the pcie controller,
|
||||
the phy controller, additional register for the phy controller.
|
||||
- interrupts: interrupt values for level interrupt,
|
||||
pulse interrupt, special interrupt.
|
||||
- clocks: from common clock binding: handle to pci clock.
|
||||
- clock-names: from common clock binding: should be "pcie" and "pcie_bus".
|
||||
- compatible: should contain "snps,dw-pcie" to identify the core.
|
||||
- #address-cells: set to <3>
|
||||
- #size-cells: set to <2>
|
||||
- device_type: set to "pci"
|
||||
@@ -19,65 +11,11 @@ Required properties:
|
||||
to define the mapping of the PCIe interface to interrupt
|
||||
numbers.
|
||||
- num-lanes: number of lanes to use
|
||||
- clocks: Must contain an entry for each entry in clock-names.
|
||||
See ../clocks/clock-bindings.txt for details.
|
||||
- clock-names: Must include the following entries:
|
||||
- "pcie"
|
||||
- "pcie_bus"
|
||||
|
||||
Optional properties:
|
||||
- reset-gpio: gpio pin number of power good signal
|
||||
|
||||
Optional properties for fsl,imx6q-pcie
|
||||
- power-on-gpio: gpio pin number of power-enable signal
|
||||
- wake-up-gpio: gpio pin number of incoming wakeup signal
|
||||
- disable-gpio: gpio pin number of outgoing rfkill/endpoint disable signal
|
||||
|
||||
Example:
|
||||
|
||||
SoC specific DT Entry:
|
||||
|
||||
pcie@290000 {
|
||||
compatible = "samsung,exynos5440-pcie", "snps,dw-pcie";
|
||||
reg = <0x290000 0x1000
|
||||
0x270000 0x1000
|
||||
0x271000 0x40>;
|
||||
interrupts = <0 20 0>, <0 21 0>, <0 22 0>;
|
||||
clocks = <&clock 28>, <&clock 27>;
|
||||
clock-names = "pcie", "pcie_bus";
|
||||
#address-cells = <3>;
|
||||
#size-cells = <2>;
|
||||
device_type = "pci";
|
||||
ranges = <0x00000800 0 0x40000000 0x40000000 0 0x00001000 /* configuration space */
|
||||
0x81000000 0 0 0x40001000 0 0x00010000 /* downstream I/O */
|
||||
0x82000000 0 0x40011000 0x40011000 0 0x1ffef000>; /* non-prefetchable memory */
|
||||
#interrupt-cells = <1>;
|
||||
interrupt-map-mask = <0 0 0 0>;
|
||||
interrupt-map = <0x0 0 &gic 53>;
|
||||
num-lanes = <4>;
|
||||
};
|
||||
|
||||
pcie@2a0000 {
|
||||
compatible = "samsung,exynos5440-pcie", "snps,dw-pcie";
|
||||
reg = <0x2a0000 0x1000
|
||||
0x272000 0x1000
|
||||
0x271040 0x40>;
|
||||
interrupts = <0 23 0>, <0 24 0>, <0 25 0>;
|
||||
clocks = <&clock 29>, <&clock 27>;
|
||||
clock-names = "pcie", "pcie_bus";
|
||||
#address-cells = <3>;
|
||||
#size-cells = <2>;
|
||||
device_type = "pci";
|
||||
ranges = <0x00000800 0 0x60000000 0x60000000 0 0x00001000 /* configuration space */
|
||||
0x81000000 0 0 0x60001000 0 0x00010000 /* downstream I/O */
|
||||
0x82000000 0 0x60011000 0x60011000 0 0x1ffef000>; /* non-prefetchable memory */
|
||||
#interrupt-cells = <1>;
|
||||
interrupt-map-mask = <0 0 0 0>;
|
||||
interrupt-map = <0x0 0 &gic 56>;
|
||||
num-lanes = <4>;
|
||||
};
|
||||
|
||||
Board specific DT Entry:
|
||||
|
||||
pcie@290000 {
|
||||
reset-gpio = <&pin_ctrl 5 0>;
|
||||
};
|
||||
|
||||
pcie@2a0000 {
|
||||
reset-gpio = <&pin_ctrl 22 0>;
|
||||
};
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
* Freescale i.MX6 PCIe interface
|
||||
|
||||
This PCIe host controller is based on the Synopsis Designware PCIe IP
|
||||
and thus inherits all the common properties defined in designware-pcie.txt.
|
||||
|
||||
Required properties:
|
||||
- compatible: "fsl,imx6q-pcie"
|
||||
- reg: base addresse and length of the pcie controller
|
||||
- interrupts: A list of interrupt outputs of the controller. Must contain an
|
||||
entry for each entry in the interrupt-names property.
|
||||
- interrupt-names: Must include the following entries:
|
||||
- "msi": The interrupt that is asserted when an MSI is received
|
||||
- clock-names: Must include the following additional entries:
|
||||
- "pcie_phy"
|
||||
|
||||
Example:
|
||||
|
||||
pcie@0x01000000 {
|
||||
compatible = "fsl,imx6q-pcie", "snps,dw-pcie";
|
||||
reg = <0x01ffc000 0x4000>;
|
||||
#address-cells = <3>;
|
||||
#size-cells = <2>;
|
||||
device_type = "pci";
|
||||
ranges = <0x00000800 0 0x01f00000 0x01f00000 0 0x00080000
|
||||
0x81000000 0 0 0x01f80000 0 0x00010000
|
||||
0x82000000 0 0x01000000 0x01000000 0 0x00f00000>;
|
||||
num-lanes = <1>;
|
||||
interrupts = <GIC_SPI 120 IRQ_TYPE_LEVEL_HIGH>;
|
||||
interrupt-names = "msi";
|
||||
#interrupt-cells = <1>;
|
||||
interrupt-map-mask = <0 0 0 0x7>;
|
||||
interrupt-map = <0 0 0 1 &intc GIC_SPI 123 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<0 0 0 2 &intc GIC_SPI 122 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<0 0 0 3 &intc GIC_SPI 121 IRQ_TYPE_LEVEL_HIGH>,
|
||||
<0 0 0 4 &intc GIC_SPI 120 IRQ_TYPE_LEVEL_HIGH>;
|
||||
clocks = <&clks 144>, <&clks 206>, <&clks 189>;
|
||||
clock-names = "pcie", "pcie_bus", "pcie_phy";
|
||||
};
|
||||
@@ -0,0 +1,65 @@
|
||||
* Samsung Exynos 5440 PCIe interface
|
||||
|
||||
This PCIe host controller is based on the Synopsis Designware PCIe IP
|
||||
and thus inherits all the common properties defined in designware-pcie.txt.
|
||||
|
||||
Required properties:
|
||||
- compatible: "samsung,exynos5440-pcie"
|
||||
- reg: base addresses and lengths of the pcie controller,
|
||||
the phy controller, additional register for the phy controller.
|
||||
- interrupts: A list of interrupt outputs for level interrupt,
|
||||
pulse interrupt, special interrupt.
|
||||
|
||||
Example:
|
||||
|
||||
SoC specific DT Entry:
|
||||
|
||||
pcie@290000 {
|
||||
compatible = "samsung,exynos5440-pcie", "snps,dw-pcie";
|
||||
reg = <0x290000 0x1000
|
||||
0x270000 0x1000
|
||||
0x271000 0x40>;
|
||||
interrupts = <0 20 0>, <0 21 0>, <0 22 0>;
|
||||
clocks = <&clock 28>, <&clock 27>;
|
||||
clock-names = "pcie", "pcie_bus";
|
||||
#address-cells = <3>;
|
||||
#size-cells = <2>;
|
||||
device_type = "pci";
|
||||
ranges = <0x00000800 0 0x40000000 0x40000000 0 0x00001000 /* configuration space */
|
||||
0x81000000 0 0 0x40001000 0 0x00010000 /* downstream I/O */
|
||||
0x82000000 0 0x40011000 0x40011000 0 0x1ffef000>; /* non-prefetchable memory */
|
||||
#interrupt-cells = <1>;
|
||||
interrupt-map-mask = <0 0 0 0>;
|
||||
interrupt-map = <0 0 0 0 &gic GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH>;
|
||||
num-lanes = <4>;
|
||||
};
|
||||
|
||||
pcie@2a0000 {
|
||||
compatible = "samsung,exynos5440-pcie", "snps,dw-pcie";
|
||||
reg = <0x2a0000 0x1000
|
||||
0x272000 0x1000
|
||||
0x271040 0x40>;
|
||||
interrupts = <0 23 0>, <0 24 0>, <0 25 0>;
|
||||
clocks = <&clock 29>, <&clock 27>;
|
||||
clock-names = "pcie", "pcie_bus";
|
||||
#address-cells = <3>;
|
||||
#size-cells = <2>;
|
||||
device_type = "pci";
|
||||
ranges = <0x00000800 0 0x60000000 0x60000000 0 0x00001000 /* configuration space */
|
||||
0x81000000 0 0 0x60001000 0 0x00010000 /* downstream I/O */
|
||||
0x82000000 0 0x60011000 0x60011000 0 0x1ffef000>; /* non-prefetchable memory */
|
||||
#interrupt-cells = <1>;
|
||||
interrupt-map-mask = <0 0 0 0>;
|
||||
interrupt-map = <0 0 0 0 &gic GIC_SPI 24 IRQ_TYPE_LEVEL_HIGH>;
|
||||
num-lanes = <4>;
|
||||
};
|
||||
|
||||
Board specific DT Entry:
|
||||
|
||||
pcie@290000 {
|
||||
reset-gpio = <&pin_ctrl 5 0>;
|
||||
};
|
||||
|
||||
pcie@2a0000 {
|
||||
reset-gpio = <&pin_ctrl 22 0>;
|
||||
};
|
||||
@@ -231,10 +231,7 @@ static int pci_vpd_pci22_wait(struct pci_dev *dev)
|
||||
}
|
||||
|
||||
if (time_after(jiffies, timeout)) {
|
||||
dev_printk(KERN_DEBUG, &dev->dev,
|
||||
"vpd r/w failed. This is likely a firmware "
|
||||
"bug on this device. Contact the card "
|
||||
"vendor for a firmware update.");
|
||||
dev_printk(KERN_DEBUG, &dev->dev, "vpd r/w failed. This is likely a firmware bug on this device. Contact the card vendor for a firmware update\n");
|
||||
return -ETIMEDOUT;
|
||||
}
|
||||
if (fatal_signal_pending(current))
|
||||
|
||||
+3
-3
@@ -226,6 +226,7 @@ int pci_bus_alloc_resource(struct pci_bus *bus, struct resource *res,
|
||||
type_mask, alignf, alignf_data,
|
||||
&pci_32_bit);
|
||||
}
|
||||
EXPORT_SYMBOL(pci_bus_alloc_resource);
|
||||
|
||||
void __weak pcibios_resource_survey_bus(struct pci_bus *bus) { }
|
||||
|
||||
@@ -253,6 +254,7 @@ void pci_bus_add_device(struct pci_dev *dev)
|
||||
|
||||
dev->is_added = 1;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(pci_bus_add_device);
|
||||
|
||||
/**
|
||||
* pci_bus_add_devices - start driver for PCI devices
|
||||
@@ -279,6 +281,7 @@ void pci_bus_add_devices(const struct pci_bus *bus)
|
||||
pci_bus_add_devices(child);
|
||||
}
|
||||
}
|
||||
EXPORT_SYMBOL(pci_bus_add_devices);
|
||||
|
||||
/** pci_walk_bus - walk devices on/under bus, calling callback.
|
||||
* @top bus whose devices should be walked
|
||||
@@ -344,6 +347,3 @@ void pci_bus_put(struct pci_bus *bus)
|
||||
}
|
||||
EXPORT_SYMBOL(pci_bus_put);
|
||||
|
||||
EXPORT_SYMBOL(pci_bus_alloc_resource);
|
||||
EXPORT_SYMBOL_GPL(pci_bus_add_device);
|
||||
EXPORT_SYMBOL(pci_bus_add_devices);
|
||||
|
||||
@@ -545,7 +545,6 @@ static int __init add_pcie_port(struct pcie_port *pp,
|
||||
pp->root_bus_nr = -1;
|
||||
pp->ops = &exynos_pcie_host_ops;
|
||||
|
||||
spin_lock_init(&pp->conf_lock);
|
||||
ret = dw_pcie_host_init(pp);
|
||||
if (ret) {
|
||||
dev_err(&pdev->dev, "failed to initialize host\n");
|
||||
|
||||
@@ -507,7 +507,6 @@ static int __init imx6_add_pcie_port(struct pcie_port *pp,
|
||||
pp->root_bus_nr = -1;
|
||||
pp->ops = &imx6_pcie_host_ops;
|
||||
|
||||
spin_lock_init(&pp->conf_lock);
|
||||
ret = dw_pcie_host_init(pp);
|
||||
if (ret) {
|
||||
dev_err(&pdev->dev, "failed to initialize host\n");
|
||||
|
||||
@@ -113,7 +113,6 @@ struct mvebu_pcie {
|
||||
struct mvebu_pcie_port {
|
||||
char *name;
|
||||
void __iomem *base;
|
||||
spinlock_t conf_lock;
|
||||
u32 port;
|
||||
u32 lane;
|
||||
int devfn;
|
||||
@@ -329,9 +328,11 @@ static void mvebu_pcie_add_windows(struct mvebu_pcie_port *port,
|
||||
ret = mvebu_mbus_add_window_remap_by_id(target, attribute, base,
|
||||
sz, remap);
|
||||
if (ret) {
|
||||
phys_addr_t end = base + sz - 1;
|
||||
|
||||
dev_err(&port->pcie->pdev->dev,
|
||||
"Could not create MBus window at 0x%x, size 0x%x: %d\n",
|
||||
base, sz, ret);
|
||||
"Could not create MBus window at [mem %pa-%pa]: %d\n",
|
||||
&base, &end, ret);
|
||||
mvebu_pcie_del_windows(port, base - size_mapped,
|
||||
size_mapped);
|
||||
return;
|
||||
@@ -613,9 +614,9 @@ static inline struct mvebu_pcie *sys_to_pcie(struct pci_sys_data *sys)
|
||||
return sys->private_data;
|
||||
}
|
||||
|
||||
static struct mvebu_pcie_port *
|
||||
mvebu_pcie_find_port(struct mvebu_pcie *pcie, struct pci_bus *bus,
|
||||
int devfn)
|
||||
static struct mvebu_pcie_port *mvebu_pcie_find_port(struct mvebu_pcie *pcie,
|
||||
struct pci_bus *bus,
|
||||
int devfn)
|
||||
{
|
||||
int i;
|
||||
|
||||
@@ -638,7 +639,6 @@ static int mvebu_pcie_wr_conf(struct pci_bus *bus, u32 devfn,
|
||||
{
|
||||
struct mvebu_pcie *pcie = sys_to_pcie(bus->sysdata);
|
||||
struct mvebu_pcie_port *port;
|
||||
unsigned long flags;
|
||||
int ret;
|
||||
|
||||
port = mvebu_pcie_find_port(pcie, bus, devfn);
|
||||
@@ -664,10 +664,8 @@ static int mvebu_pcie_wr_conf(struct pci_bus *bus, u32 devfn,
|
||||
return PCIBIOS_DEVICE_NOT_FOUND;
|
||||
|
||||
/* Access the real PCIe interface */
|
||||
spin_lock_irqsave(&port->conf_lock, flags);
|
||||
ret = mvebu_pcie_hw_wr_conf(port, bus, devfn,
|
||||
where, size, val);
|
||||
spin_unlock_irqrestore(&port->conf_lock, flags);
|
||||
|
||||
return ret;
|
||||
}
|
||||
@@ -678,7 +676,6 @@ static int mvebu_pcie_rd_conf(struct pci_bus *bus, u32 devfn, int where,
|
||||
{
|
||||
struct mvebu_pcie *pcie = sys_to_pcie(bus->sysdata);
|
||||
struct mvebu_pcie_port *port;
|
||||
unsigned long flags;
|
||||
int ret;
|
||||
|
||||
port = mvebu_pcie_find_port(pcie, bus, devfn);
|
||||
@@ -710,10 +707,8 @@ static int mvebu_pcie_rd_conf(struct pci_bus *bus, u32 devfn, int where,
|
||||
}
|
||||
|
||||
/* Access the real PCIe interface */
|
||||
spin_lock_irqsave(&port->conf_lock, flags);
|
||||
ret = mvebu_pcie_hw_rd_conf(port, bus, devfn,
|
||||
where, size, val);
|
||||
spin_unlock_irqrestore(&port->conf_lock, flags);
|
||||
|
||||
return ret;
|
||||
}
|
||||
@@ -786,10 +781,10 @@ static void mvebu_pcie_add_bus(struct pci_bus *bus)
|
||||
}
|
||||
|
||||
static resource_size_t mvebu_pcie_align_resource(struct pci_dev *dev,
|
||||
const struct resource *res,
|
||||
resource_size_t start,
|
||||
resource_size_t size,
|
||||
resource_size_t align)
|
||||
const struct resource *res,
|
||||
resource_size_t start,
|
||||
resource_size_t size,
|
||||
resource_size_t align)
|
||||
{
|
||||
if (dev->bus->number != 0)
|
||||
return start;
|
||||
@@ -839,7 +834,8 @@ static void mvebu_pcie_enable(struct mvebu_pcie *pcie)
|
||||
* found, maps it.
|
||||
*/
|
||||
static void __iomem *mvebu_pcie_map_registers(struct platform_device *pdev,
|
||||
struct device_node *np, struct mvebu_pcie_port *port)
|
||||
struct device_node *np,
|
||||
struct mvebu_pcie_port *port)
|
||||
{
|
||||
struct resource regs;
|
||||
int ret = 0;
|
||||
@@ -1060,7 +1056,6 @@ static int mvebu_pcie_probe(struct platform_device *pdev)
|
||||
mvebu_pcie_set_local_dev_nr(port, 1);
|
||||
|
||||
port->dn = child;
|
||||
spin_lock_init(&port->conf_lock);
|
||||
mvebu_sw_pci_bridge_init(port);
|
||||
i++;
|
||||
}
|
||||
|
||||
@@ -643,7 +643,6 @@ static int dw_pcie_rd_conf(struct pci_bus *bus, u32 devfn, int where,
|
||||
int size, u32 *val)
|
||||
{
|
||||
struct pcie_port *pp = sys_to_pcie(bus->sysdata);
|
||||
unsigned long flags;
|
||||
int ret;
|
||||
|
||||
if (!pp) {
|
||||
@@ -656,13 +655,11 @@ static int dw_pcie_rd_conf(struct pci_bus *bus, u32 devfn, int where,
|
||||
return PCIBIOS_DEVICE_NOT_FOUND;
|
||||
}
|
||||
|
||||
spin_lock_irqsave(&pp->conf_lock, flags);
|
||||
if (bus->number != pp->root_bus_nr)
|
||||
ret = dw_pcie_rd_other_conf(pp, bus, devfn,
|
||||
where, size, val);
|
||||
else
|
||||
ret = dw_pcie_rd_own_conf(pp, where, size, val);
|
||||
spin_unlock_irqrestore(&pp->conf_lock, flags);
|
||||
|
||||
return ret;
|
||||
}
|
||||
@@ -671,7 +668,6 @@ static int dw_pcie_wr_conf(struct pci_bus *bus, u32 devfn,
|
||||
int where, int size, u32 val)
|
||||
{
|
||||
struct pcie_port *pp = sys_to_pcie(bus->sysdata);
|
||||
unsigned long flags;
|
||||
int ret;
|
||||
|
||||
if (!pp) {
|
||||
@@ -682,13 +678,11 @@ static int dw_pcie_wr_conf(struct pci_bus *bus, u32 devfn,
|
||||
if (dw_pcie_valid_config(pp, bus, PCI_SLOT(devfn)) == 0)
|
||||
return PCIBIOS_DEVICE_NOT_FOUND;
|
||||
|
||||
spin_lock_irqsave(&pp->conf_lock, flags);
|
||||
if (bus->number != pp->root_bus_nr)
|
||||
ret = dw_pcie_wr_other_conf(pp, bus, devfn,
|
||||
where, size, val);
|
||||
else
|
||||
ret = dw_pcie_wr_own_conf(pp, where, size, val);
|
||||
spin_unlock_irqrestore(&pp->conf_lock, flags);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -41,7 +41,6 @@ struct pcie_port {
|
||||
void __iomem *va_cfg1_base;
|
||||
u64 io_base;
|
||||
u64 mem_base;
|
||||
spinlock_t conf_lock;
|
||||
struct resource cfg;
|
||||
struct resource io;
|
||||
struct resource mem;
|
||||
|
||||
@@ -277,9 +277,8 @@ static int rcar_pcie_read_conf(struct pci_bus *bus, unsigned int devfn,
|
||||
else if (size == 2)
|
||||
*val = (*val >> (8 * (where & 2))) & 0xffff;
|
||||
|
||||
dev_dbg(&bus->dev, "pcie-config-read: bus=%3d devfn=0x%04x "
|
||||
"where=0x%04x size=%d val=0x%08lx\n", bus->number,
|
||||
devfn, where, size, (unsigned long)*val);
|
||||
dev_dbg(&bus->dev, "pcie-config-read: bus=%3d devfn=0x%04x where=0x%04x size=%d val=0x%08lx\n",
|
||||
bus->number, devfn, where, size, (unsigned long)*val);
|
||||
|
||||
return ret;
|
||||
}
|
||||
@@ -302,9 +301,8 @@ static int rcar_pcie_write_conf(struct pci_bus *bus, unsigned int devfn,
|
||||
if (ret != PCIBIOS_SUCCESSFUL)
|
||||
return ret;
|
||||
|
||||
dev_dbg(&bus->dev, "pcie-config-write: bus=%3d devfn=0x%04x "
|
||||
"where=0x%04x size=%d val=0x%08lx\n", bus->number,
|
||||
devfn, where, size, (unsigned long)val);
|
||||
dev_dbg(&bus->dev, "pcie-config-write: bus=%3d devfn=0x%04x where=0x%04x size=%d val=0x%08lx\n",
|
||||
bus->number, devfn, where, size, (unsigned long)val);
|
||||
|
||||
if (size == 1) {
|
||||
shift = 8 * (where & 3);
|
||||
|
||||
@@ -63,10 +63,6 @@ MODULE_LICENSE("GPL");
|
||||
MODULE_PARM_DESC(disable, "disable acpiphp driver");
|
||||
module_param_named(disable, acpiphp_disabled, bool, 0444);
|
||||
|
||||
/* export the attention callback registration methods */
|
||||
EXPORT_SYMBOL_GPL(acpiphp_register_attention);
|
||||
EXPORT_SYMBOL_GPL(acpiphp_unregister_attention);
|
||||
|
||||
static int enable_slot (struct hotplug_slot *slot);
|
||||
static int disable_slot (struct hotplug_slot *slot);
|
||||
static int set_attention_status (struct hotplug_slot *slot, u8 value);
|
||||
@@ -104,6 +100,7 @@ int acpiphp_register_attention(struct acpiphp_attention_info *info)
|
||||
}
|
||||
return retval;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(acpiphp_register_attention);
|
||||
|
||||
|
||||
/**
|
||||
@@ -124,6 +121,7 @@ int acpiphp_unregister_attention(struct acpiphp_attention_info *info)
|
||||
}
|
||||
return retval;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(acpiphp_unregister_attention);
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -351,11 +351,9 @@ static acpi_status acpiphp_add_context(acpi_handle handle, u32 lvl, void *data,
|
||||
slot->slot = NULL;
|
||||
bridge->nr_slots--;
|
||||
if (retval == -EBUSY)
|
||||
pr_warn("Slot %llu already registered by another "
|
||||
"hotplug driver\n", sun);
|
||||
pr_warn("Slot %llu already registered by another hotplug driver\n", sun);
|
||||
else
|
||||
pr_warn("acpiphp_register_hotplug_slot failed "
|
||||
"(err code = 0x%x)\n", retval);
|
||||
pr_warn("acpiphp_register_hotplug_slot failed (err code = 0x%x)\n", retval);
|
||||
}
|
||||
/* Even if the slot registration fails, we can still use it. */
|
||||
}
|
||||
|
||||
@@ -56,9 +56,9 @@ struct cpci_hp_controller_ops {
|
||||
int (*enable_irq) (void);
|
||||
int (*disable_irq) (void);
|
||||
int (*check_irq) (void *dev_id);
|
||||
int (*hardware_test) (struct slot* slot, u32 value);
|
||||
u8 (*get_power) (struct slot* slot);
|
||||
int (*set_power) (struct slot* slot, int value);
|
||||
int (*hardware_test) (struct slot *slot, u32 value);
|
||||
u8 (*get_power) (struct slot *slot);
|
||||
int (*set_power) (struct slot *slot, int value);
|
||||
};
|
||||
|
||||
struct cpci_hp_controller {
|
||||
@@ -89,13 +89,13 @@ int cpci_hp_stop(void);
|
||||
u8 cpci_get_attention_status(struct slot *slot);
|
||||
u8 cpci_get_latch_status(struct slot *slot);
|
||||
u8 cpci_get_adapter_status(struct slot *slot);
|
||||
u16 cpci_get_hs_csr(struct slot * slot);
|
||||
u16 cpci_get_hs_csr(struct slot *slot);
|
||||
int cpci_set_attention_status(struct slot *slot, int status);
|
||||
int cpci_check_and_clear_ins(struct slot * slot);
|
||||
int cpci_check_ext(struct slot * slot);
|
||||
int cpci_clear_ext(struct slot * slot);
|
||||
int cpci_led_on(struct slot * slot);
|
||||
int cpci_led_off(struct slot * slot);
|
||||
int cpci_check_and_clear_ins(struct slot *slot);
|
||||
int cpci_check_ext(struct slot *slot);
|
||||
int cpci_clear_ext(struct slot *slot);
|
||||
int cpci_led_on(struct slot *slot);
|
||||
int cpci_led_off(struct slot *slot);
|
||||
int cpci_configure_slot(struct slot *slot);
|
||||
int cpci_unconfigure_slot(struct slot *slot);
|
||||
|
||||
|
||||
@@ -65,10 +65,10 @@ static int thread_finished;
|
||||
static int enable_slot(struct hotplug_slot *slot);
|
||||
static int disable_slot(struct hotplug_slot *slot);
|
||||
static int set_attention_status(struct hotplug_slot *slot, u8 value);
|
||||
static int get_power_status(struct hotplug_slot *slot, u8 * value);
|
||||
static int get_attention_status(struct hotplug_slot *slot, u8 * value);
|
||||
static int get_adapter_status(struct hotplug_slot *slot, u8 * value);
|
||||
static int get_latch_status(struct hotplug_slot *slot, u8 * value);
|
||||
static int get_power_status(struct hotplug_slot *slot, u8 *value);
|
||||
static int get_attention_status(struct hotplug_slot *slot, u8 *value);
|
||||
static int get_adapter_status(struct hotplug_slot *slot, u8 *value);
|
||||
static int get_latch_status(struct hotplug_slot *slot, u8 *value);
|
||||
|
||||
static struct hotplug_slot_ops cpci_hotplug_slot_ops = {
|
||||
.enable_slot = enable_slot,
|
||||
@@ -168,7 +168,7 @@ cpci_get_power_status(struct slot *slot)
|
||||
}
|
||||
|
||||
static int
|
||||
get_power_status(struct hotplug_slot *hotplug_slot, u8 * value)
|
||||
get_power_status(struct hotplug_slot *hotplug_slot, u8 *value)
|
||||
{
|
||||
struct slot *slot = hotplug_slot->private;
|
||||
|
||||
@@ -177,7 +177,7 @@ get_power_status(struct hotplug_slot *hotplug_slot, u8 * value)
|
||||
}
|
||||
|
||||
static int
|
||||
get_attention_status(struct hotplug_slot *hotplug_slot, u8 * value)
|
||||
get_attention_status(struct hotplug_slot *hotplug_slot, u8 *value)
|
||||
{
|
||||
struct slot *slot = hotplug_slot->private;
|
||||
|
||||
@@ -192,14 +192,14 @@ set_attention_status(struct hotplug_slot *hotplug_slot, u8 status)
|
||||
}
|
||||
|
||||
static int
|
||||
get_adapter_status(struct hotplug_slot *hotplug_slot, u8 * value)
|
||||
get_adapter_status(struct hotplug_slot *hotplug_slot, u8 *value)
|
||||
{
|
||||
*value = hotplug_slot->info->adapter_status;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
get_latch_status(struct hotplug_slot *hotplug_slot, u8 * value)
|
||||
get_latch_status(struct hotplug_slot *hotplug_slot, u8 *value)
|
||||
{
|
||||
*value = hotplug_slot->info->latch_status;
|
||||
return 0;
|
||||
@@ -299,6 +299,7 @@ error_slot:
|
||||
error:
|
||||
return status;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(cpci_hp_register_bus);
|
||||
|
||||
int
|
||||
cpci_hp_unregister_bus(struct pci_bus *bus)
|
||||
@@ -329,6 +330,7 @@ cpci_hp_unregister_bus(struct pci_bus *bus)
|
||||
up_write(&list_rwsem);
|
||||
return status;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(cpci_hp_unregister_bus);
|
||||
|
||||
/* This is the interrupt mode interrupt handler */
|
||||
static irqreturn_t
|
||||
@@ -360,7 +362,7 @@ static int
|
||||
init_slots(int clear_ins)
|
||||
{
|
||||
struct slot *slot;
|
||||
struct pci_dev* dev;
|
||||
struct pci_dev *dev;
|
||||
|
||||
dbg("%s - enter", __func__);
|
||||
down_read(&list_rwsem);
|
||||
@@ -614,6 +616,7 @@ cpci_hp_register_controller(struct cpci_hp_controller *new_controller)
|
||||
controller = new_controller;
|
||||
return status;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(cpci_hp_register_controller);
|
||||
|
||||
static void
|
||||
cleanup_slots(void)
|
||||
@@ -653,6 +656,7 @@ cpci_hp_unregister_controller(struct cpci_hp_controller *old_controller)
|
||||
status = -ENODEV;
|
||||
return status;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(cpci_hp_unregister_controller);
|
||||
|
||||
int
|
||||
cpci_hp_start(void)
|
||||
@@ -690,6 +694,7 @@ cpci_hp_start(void)
|
||||
dbg("%s - exit", __func__);
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(cpci_hp_start);
|
||||
|
||||
int
|
||||
cpci_hp_stop(void)
|
||||
@@ -704,6 +709,7 @@ cpci_hp_stop(void)
|
||||
cpci_stop_thread();
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(cpci_hp_stop);
|
||||
|
||||
int __init
|
||||
cpci_hotplug_init(int debug)
|
||||
@@ -721,10 +727,3 @@ cpci_hotplug_exit(void)
|
||||
cpci_hp_stop();
|
||||
cpci_hp_unregister_controller(controller);
|
||||
}
|
||||
|
||||
EXPORT_SYMBOL_GPL(cpci_hp_register_controller);
|
||||
EXPORT_SYMBOL_GPL(cpci_hp_unregister_controller);
|
||||
EXPORT_SYMBOL_GPL(cpci_hp_register_bus);
|
||||
EXPORT_SYMBOL_GPL(cpci_hp_unregister_bus);
|
||||
EXPORT_SYMBOL_GPL(cpci_hp_start);
|
||||
EXPORT_SYMBOL_GPL(cpci_hp_stop);
|
||||
|
||||
@@ -46,7 +46,7 @@ extern int cpci_debug;
|
||||
#define warn(format, arg...) printk(KERN_WARNING "%s: " format "\n", MY_NAME , ## arg)
|
||||
|
||||
|
||||
u8 cpci_get_attention_status(struct slot* slot)
|
||||
u8 cpci_get_attention_status(struct slot *slot)
|
||||
{
|
||||
int hs_cap;
|
||||
u16 hs_csr;
|
||||
@@ -66,7 +66,7 @@ u8 cpci_get_attention_status(struct slot* slot)
|
||||
return hs_csr & 0x0008 ? 1 : 0;
|
||||
}
|
||||
|
||||
int cpci_set_attention_status(struct slot* slot, int status)
|
||||
int cpci_set_attention_status(struct slot *slot, int status)
|
||||
{
|
||||
int hs_cap;
|
||||
u16 hs_csr;
|
||||
@@ -93,7 +93,7 @@ int cpci_set_attention_status(struct slot* slot, int status)
|
||||
return 1;
|
||||
}
|
||||
|
||||
u16 cpci_get_hs_csr(struct slot* slot)
|
||||
u16 cpci_get_hs_csr(struct slot *slot)
|
||||
{
|
||||
int hs_cap;
|
||||
u16 hs_csr;
|
||||
@@ -111,7 +111,7 @@ u16 cpci_get_hs_csr(struct slot* slot)
|
||||
return hs_csr;
|
||||
}
|
||||
|
||||
int cpci_check_and_clear_ins(struct slot* slot)
|
||||
int cpci_check_and_clear_ins(struct slot *slot)
|
||||
{
|
||||
int hs_cap;
|
||||
u16 hs_csr;
|
||||
@@ -140,7 +140,7 @@ int cpci_check_and_clear_ins(struct slot* slot)
|
||||
return ins;
|
||||
}
|
||||
|
||||
int cpci_check_ext(struct slot* slot)
|
||||
int cpci_check_ext(struct slot *slot)
|
||||
{
|
||||
int hs_cap;
|
||||
u16 hs_csr;
|
||||
@@ -161,7 +161,7 @@ int cpci_check_ext(struct slot* slot)
|
||||
return ext;
|
||||
}
|
||||
|
||||
int cpci_clear_ext(struct slot* slot)
|
||||
int cpci_clear_ext(struct slot *slot)
|
||||
{
|
||||
int hs_cap;
|
||||
u16 hs_csr;
|
||||
@@ -187,7 +187,7 @@ int cpci_clear_ext(struct slot* slot)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int cpci_led_on(struct slot* slot)
|
||||
int cpci_led_on(struct slot *slot)
|
||||
{
|
||||
int hs_cap;
|
||||
u16 hs_csr;
|
||||
@@ -216,7 +216,7 @@ int cpci_led_on(struct slot* slot)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int cpci_led_off(struct slot* slot)
|
||||
int cpci_led_off(struct slot *slot)
|
||||
{
|
||||
int hs_cap;
|
||||
u16 hs_csr;
|
||||
@@ -303,7 +303,7 @@ int cpci_configure_slot(struct slot *slot)
|
||||
return ret;
|
||||
}
|
||||
|
||||
int cpci_unconfigure_slot(struct slot* slot)
|
||||
int cpci_unconfigure_slot(struct slot *slot)
|
||||
{
|
||||
struct pci_dev *dev, *temp;
|
||||
|
||||
|
||||
@@ -78,8 +78,8 @@ static struct cpci_hp_controller generic_hpc;
|
||||
|
||||
static int __init validate_parameters(void)
|
||||
{
|
||||
char* str;
|
||||
char* p;
|
||||
char *str;
|
||||
char *p;
|
||||
unsigned long tmp;
|
||||
|
||||
if(!bridge) {
|
||||
@@ -142,8 +142,8 @@ static int query_enum(void)
|
||||
static int __init cpcihp_generic_init(void)
|
||||
{
|
||||
int status;
|
||||
struct resource* r;
|
||||
struct pci_dev* dev;
|
||||
struct resource *r;
|
||||
struct pci_dev *dev;
|
||||
|
||||
info(DRIVER_DESC " version: " DRIVER_VERSION);
|
||||
status = validate_parameters();
|
||||
|
||||
@@ -295,7 +295,7 @@ static struct pci_driver zt5550_hc_driver = {
|
||||
|
||||
static int __init zt5550_init(void)
|
||||
{
|
||||
struct resource* r;
|
||||
struct resource *r;
|
||||
int rc;
|
||||
|
||||
info(DRIVER_DESC " version: " DRIVER_VERSION);
|
||||
|
||||
@@ -255,7 +255,7 @@ struct pci_func {
|
||||
struct pci_resource *io_head;
|
||||
struct pci_resource *bus_head;
|
||||
struct timer_list *p_task_event;
|
||||
struct pci_dev* pci_dev;
|
||||
struct pci_dev *pci_dev;
|
||||
};
|
||||
|
||||
struct slot {
|
||||
@@ -278,7 +278,7 @@ struct slot {
|
||||
};
|
||||
|
||||
struct pci_resource {
|
||||
struct pci_resource * next;
|
||||
struct pci_resource *next;
|
||||
u32 base;
|
||||
u32 length;
|
||||
};
|
||||
|
||||
@@ -94,7 +94,7 @@ static inline int is_slot66mhz(struct slot *slot)
|
||||
*
|
||||
* Returns pointer to the head of the SMBIOS tables (or %NULL).
|
||||
*/
|
||||
static void __iomem * detect_SMBIOS_pointer(void __iomem *begin, void __iomem *end)
|
||||
static void __iomem *detect_SMBIOS_pointer(void __iomem *begin, void __iomem *end)
|
||||
{
|
||||
void __iomem *fp;
|
||||
void __iomem *endp;
|
||||
@@ -131,7 +131,7 @@ static void __iomem * detect_SMBIOS_pointer(void __iomem *begin, void __iomem *e
|
||||
*
|
||||
* For unexpected switch opens
|
||||
*/
|
||||
static int init_SERR(struct controller * ctrl)
|
||||
static int init_SERR(struct controller *ctrl)
|
||||
{
|
||||
u32 tempdword;
|
||||
u32 number_of_slots;
|
||||
@@ -291,7 +291,7 @@ static void release_slot(struct hotplug_slot *hotplug_slot)
|
||||
kfree(slot);
|
||||
}
|
||||
|
||||
static int ctrl_slot_cleanup (struct controller * ctrl)
|
||||
static int ctrl_slot_cleanup (struct controller *ctrl)
|
||||
{
|
||||
struct slot *old_slot, *next_slot;
|
||||
|
||||
@@ -706,8 +706,7 @@ static int ctrl_slot_setup(struct controller *ctrl,
|
||||
hotplug_slot_info->adapter_status =
|
||||
get_presence_status(ctrl, slot);
|
||||
|
||||
dbg("registering bus %d, dev %d, number %d, "
|
||||
"ctrl->slot_device_offset %d, slot %d\n",
|
||||
dbg("registering bus %d, dev %d, number %d, ctrl->slot_device_offset %d, slot %d\n",
|
||||
slot->bus, slot->device,
|
||||
slot->number, ctrl->slot_device_offset,
|
||||
slot_number);
|
||||
@@ -837,8 +836,7 @@ static int cpqhpc_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
|
||||
|
||||
bus = pdev->subordinate;
|
||||
if (!bus) {
|
||||
dev_notice(&pdev->dev, "the device is not a bridge, "
|
||||
"skipping\n");
|
||||
dev_notice(&pdev->dev, "the device is not a bridge, skipping\n");
|
||||
rc = -ENODEV;
|
||||
goto err_disable_device;
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user