Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 346828
b: refs/heads/master
c: a393d89
h: refs/heads/master
v: v3
  • Loading branch information
Jia Hongtao authored and Kumar Gala committed Nov 25, 2012
1 parent c569c33 commit a1e5f33
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b567d1c74ecfe4c321bdba251506a95e4c837c86
refs/heads/master: a393d8977acd834520357f951bb28ef46ee7db0a
37 changes: 35 additions & 2 deletions trunk/arch/powerpc/sysdev/fsl_pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ static int fsl_pci_dma_set_mask(struct device *dev, u64 dma_mask)
return 0;
}

static int __init setup_one_atmu(struct ccsr_pci __iomem *pci,
static int setup_one_atmu(struct ccsr_pci __iomem *pci,
unsigned int index, const struct resource *res,
resource_size_t offset)
{
Expand Down Expand Up @@ -126,7 +126,7 @@ static int __init setup_one_atmu(struct ccsr_pci __iomem *pci,
}

/* atmu setup for fsl pci/pcie controller */
static void __init setup_pci_atmu(struct pci_controller *hose,
static void setup_pci_atmu(struct pci_controller *hose,
struct resource *rsrc)
{
struct ccsr_pci __iomem *pci;
Expand Down Expand Up @@ -902,9 +902,42 @@ static int __devinit fsl_pci_probe(struct platform_device *pdev)
return 0;
}

#ifdef CONFIG_PM
static int fsl_pci_resume(struct device *dev)
{
struct pci_controller *hose;
struct resource pci_rsrc;

hose = pci_find_hose_for_OF_device(dev->of_node);
if (!hose)
return -ENODEV;

if (of_address_to_resource(dev->of_node, 0, &pci_rsrc)) {
dev_err(dev, "Get pci register base failed.");
return -ENODEV;
}

setup_pci_atmu(hose, &pci_rsrc);

return 0;
}

static const struct dev_pm_ops pci_pm_ops = {
.resume = fsl_pci_resume,
};

#define PCI_PM_OPS (&pci_pm_ops)

#else

#define PCI_PM_OPS NULL

#endif

static struct platform_driver fsl_pci_driver = {
.driver = {
.name = "fsl-pci",
.pm = PCI_PM_OPS,
.of_match_table = pci_ids,
},
.probe = fsl_pci_probe,
Expand Down

0 comments on commit a1e5f33

Please sign in to comment.