diff options
| author | Bjorn Helgaas <bhelgaas@google.com> | 2013-10-09 11:12:37 -0400 |
|---|---|---|
| committer | Bjorn Helgaas <bhelgaas@google.com> | 2013-10-09 11:12:37 -0400 |
| commit | 73e408508bf6c76d8dc06f044f0e4703a1e27f14 (patch) | |
| tree | 52fcad5e3bfd7fb1c646c511896ee5d483858416 | |
| parent | 18edf4512cfa3e3662bdbdfc5f11c2eb20721734 (diff) | |
PCI: designware: Make dw_pcie_rd_own_conf(), etc., static
The following variables and functions are used only in pcie-designware.c,
so make them static:
global_io_offset
dw_pcie_rd_own_conf()
dw_pcie_wr_own_conf()
dw_pcie_setup()
dw_pcie_scan_bus()
dw_pcie_map_irq()
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Jingoo Han <jg1.han@samsung.com>
| -rw-r--r-- | drivers/pci/host/pcie-designware.c | 16 | ||||
| -rw-r--r-- | drivers/pci/host/pcie-designware.h | 7 |
2 files changed, 8 insertions, 15 deletions
diff --git a/drivers/pci/host/pcie-designware.c b/drivers/pci/host/pcie-designware.c index 896301788e9d..a2e69afabe6f 100644 --- a/drivers/pci/host/pcie-designware.c +++ b/drivers/pci/host/pcie-designware.c | |||
| @@ -67,7 +67,7 @@ | |||
| 67 | 67 | ||
| 68 | static struct hw_pci dw_pci; | 68 | static struct hw_pci dw_pci; |
| 69 | 69 | ||
| 70 | unsigned long global_io_offset; | 70 | static unsigned long global_io_offset; |
| 71 | 71 | ||
| 72 | static inline struct pcie_port *sys_to_pcie(struct pci_sys_data *sys) | 72 | static inline struct pcie_port *sys_to_pcie(struct pci_sys_data *sys) |
| 73 | { | 73 | { |
| @@ -118,8 +118,8 @@ static inline void dw_pcie_writel_rc(struct pcie_port *pp, u32 val, u32 reg) | |||
| 118 | writel(val, pp->dbi_base + reg); | 118 | writel(val, pp->dbi_base + reg); |
| 119 | } | 119 | } |
| 120 | 120 | ||
| 121 | int dw_pcie_rd_own_conf(struct pcie_port *pp, int where, int size, | 121 | static int dw_pcie_rd_own_conf(struct pcie_port *pp, int where, int size, |
| 122 | u32 *val) | 122 | u32 *val) |
| 123 | { | 123 | { |
| 124 | int ret; | 124 | int ret; |
| 125 | 125 | ||
| @@ -131,8 +131,8 @@ int dw_pcie_rd_own_conf(struct pcie_port *pp, int where, int size, | |||
| 131 | return ret; | 131 | return ret; |
| 132 | } | 132 | } |
| 133 | 133 | ||
| 134 | int dw_pcie_wr_own_conf(struct pcie_port *pp, int where, int size, | 134 | static int dw_pcie_wr_own_conf(struct pcie_port *pp, int where, int size, |
| 135 | u32 val) | 135 | u32 val) |
| 136 | { | 136 | { |
| 137 | int ret; | 137 | int ret; |
| 138 | 138 | ||
| @@ -667,7 +667,7 @@ static struct pci_ops dw_pcie_ops = { | |||
| 667 | .write = dw_pcie_wr_conf, | 667 | .write = dw_pcie_wr_conf, |
| 668 | }; | 668 | }; |
| 669 | 669 | ||
| 670 | int dw_pcie_setup(int nr, struct pci_sys_data *sys) | 670 | static int dw_pcie_setup(int nr, struct pci_sys_data *sys) |
| 671 | { | 671 | { |
| 672 | struct pcie_port *pp; | 672 | struct pcie_port *pp; |
| 673 | 673 | ||
| @@ -690,7 +690,7 @@ int dw_pcie_setup(int nr, struct pci_sys_data *sys) | |||
| 690 | return 1; | 690 | return 1; |
| 691 | } | 691 | } |
| 692 | 692 | ||
| 693 | struct pci_bus *dw_pcie_scan_bus(int nr, struct pci_sys_data *sys) | 693 | static struct pci_bus *dw_pcie_scan_bus(int nr, struct pci_sys_data *sys) |
| 694 | { | 694 | { |
| 695 | struct pci_bus *bus; | 695 | struct pci_bus *bus; |
| 696 | struct pcie_port *pp = sys_to_pcie(sys); | 696 | struct pcie_port *pp = sys_to_pcie(sys); |
| @@ -707,7 +707,7 @@ struct pci_bus *dw_pcie_scan_bus(int nr, struct pci_sys_data *sys) | |||
| 707 | return bus; | 707 | return bus; |
| 708 | } | 708 | } |
| 709 | 709 | ||
| 710 | int dw_pcie_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) | 710 | static int dw_pcie_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) |
| 711 | { | 711 | { |
| 712 | struct pcie_port *pp = sys_to_pcie(dev->bus->sysdata); | 712 | struct pcie_port *pp = sys_to_pcie(dev->bus->sysdata); |
| 713 | 713 | ||
diff --git a/drivers/pci/host/pcie-designware.h b/drivers/pci/host/pcie-designware.h index d87fbaeffe70..890c2ced1abd 100644 --- a/drivers/pci/host/pcie-designware.h +++ b/drivers/pci/host/pcie-designware.h | |||
| @@ -66,19 +66,12 @@ struct pcie_host_ops { | |||
| 66 | void (*host_init)(struct pcie_port *pp); | 66 | void (*host_init)(struct pcie_port *pp); |
| 67 | }; | 67 | }; |
| 68 | 68 | ||
| 69 | extern unsigned long global_io_offset; | ||
| 70 | |||
| 71 | int cfg_read(void __iomem *addr, int where, int size, u32 *val); | 69 | int cfg_read(void __iomem *addr, int where, int size, u32 *val); |
| 72 | int cfg_write(void __iomem *addr, int where, int size, u32 val); | 70 | int cfg_write(void __iomem *addr, int where, int size, u32 val); |
| 73 | int dw_pcie_wr_own_conf(struct pcie_port *pp, int where, int size, u32 val); | ||
| 74 | int dw_pcie_rd_own_conf(struct pcie_port *pp, int where, int size, u32 *val); | ||
| 75 | void dw_handle_msi_irq(struct pcie_port *pp); | 71 | void dw_handle_msi_irq(struct pcie_port *pp); |
| 76 | void dw_pcie_msi_init(struct pcie_port *pp); | 72 | void dw_pcie_msi_init(struct pcie_port *pp); |
| 77 | int dw_pcie_link_up(struct pcie_port *pp); | 73 | int dw_pcie_link_up(struct pcie_port *pp); |
| 78 | void dw_pcie_setup_rc(struct pcie_port *pp); | 74 | void dw_pcie_setup_rc(struct pcie_port *pp); |
| 79 | int dw_pcie_host_init(struct pcie_port *pp); | 75 | int dw_pcie_host_init(struct pcie_port *pp); |
| 80 | int dw_pcie_setup(int nr, struct pci_sys_data *sys); | ||
| 81 | struct pci_bus *dw_pcie_scan_bus(int nr, struct pci_sys_data *sys); | ||
| 82 | int dw_pcie_map_irq(const struct pci_dev *dev, u8 slot, u8 pin); | ||
| 83 | 76 | ||
| 84 | #endif /* _PCIE_DESIGNWARE_H */ | 77 | #endif /* _PCIE_DESIGNWARE_H */ |
