Skip to content

Commit

Permalink
PCI: generic: Move structure definitions to separate header file
Browse files Browse the repository at this point in the history
Move definitions for generic PCI host controller driver structures to a
separate header file so we can share them with other drivers.  No
functional change intended.

[bhelgaas: split into separate patch, changelog]
Signed-off-by: David Daney <[email protected]>
Signed-off-by: Bjorn Helgaas <[email protected]>
Acked-by: Arnd Bergmann <[email protected]>
Acked-by: Will Deacon <[email protected]>
  • Loading branch information
daviddaney authored and bjorn-helgaas committed Mar 11, 2016
1 parent 92e963f commit 7149b9f
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 18 deletions.
44 changes: 44 additions & 0 deletions drivers/pci/host/pci-host-common.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
/*
* 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.
*
* 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.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* Copyright (C) 2014 ARM Limited
*
* Author: Will Deacon <[email protected]>
*/

#ifndef _PCI_HOST_COMMON_H
#define _PCI_HOST_COMMON_H

#include <linux/kernel.h>
#include <linux/platform_device.h>

struct gen_pci_cfg_bus_ops {
u32 bus_shift;
struct pci_ops ops;
};

struct gen_pci_cfg_windows {
struct resource res;
struct resource *bus_range;
void __iomem **win;

struct gen_pci_cfg_bus_ops *ops;
};

struct gen_pci {
struct pci_host_bridge host;
struct gen_pci_cfg_windows cfg;
struct list_head resources;
};

#endif /* _PCI_HOST_COMMON_H */
19 changes: 1 addition & 18 deletions drivers/pci/host/pci-host-generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,24 +25,7 @@
#include <linux/of_pci.h>
#include <linux/platform_device.h>

struct gen_pci_cfg_bus_ops {
u32 bus_shift;
struct pci_ops ops;
};

struct gen_pci_cfg_windows {
struct resource res;
struct resource *bus_range;
void __iomem **win;

struct gen_pci_cfg_bus_ops *ops;
};

struct gen_pci {
struct pci_host_bridge host;
struct gen_pci_cfg_windows cfg;
struct list_head resources;
};
#include "pci-host-common.h"

static void __iomem *gen_pci_map_cfg_bus_cam(struct pci_bus *bus,
unsigned int devfn,
Expand Down

0 comments on commit 7149b9f

Please sign in to comment.