From: Kumar Gala <galak@kernel.crashing.org>
To: linuxppc-dev@ozlabs.org
Subject: [PATCH 06/14] powerpc/85xx: Cleanup PCIe support on corenet_ds boards
Date: Fri, 20 May 2011 01:09:23 -0500 [thread overview]
Message-ID: <1305871771-16334-6-git-send-email-galak@kernel.crashing.org> (raw)
In-Reply-To: <1305871771-16334-5-git-send-email-galak@kernel.crashing.org>
Several changes on PCIe support on P3041DS/P4080DS/P5020DS boards:
* Add support for "fsl,qoriq-pcie-v2.2" needed by P3041 & P5020
* Removed support for setting primary_phb_addr as we have no ISA need
* Add PCI controller to of_platform_bus_probe (for EDAC)
* Cleanup building w/SWIOTLB off on P4080DS (not stricly PCIe related)
Signed-off-by: Kai.Jiang <Kai.Jiang@freescale.com>
Signed-off-by: Laurentiu TUDOR <Laurentiu.Tudor@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
---
arch/powerpc/platforms/85xx/corenet_ds.c | 29 ++++++++++++++---------------
arch/powerpc/platforms/85xx/p4080_ds.c | 18 +++---------------
2 files changed, 17 insertions(+), 30 deletions(-)
diff --git a/arch/powerpc/platforms/85xx/corenet_ds.c b/arch/powerpc/platforms/85xx/corenet_ds.c
index 2ab338c..10af3c7 100644
--- a/arch/powerpc/platforms/85xx/corenet_ds.c
+++ b/arch/powerpc/platforms/85xx/corenet_ds.c
@@ -3,7 +3,7 @@
*
* Maintained by Kumar Gala (see MAINTAINERS for contact information)
*
- * Copyright 2009 Freescale Semiconductor Inc.
+ * Copyright 2009-2011 Freescale Semiconductor Inc.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
@@ -61,10 +61,6 @@ void __init corenet_ds_pic_init(void)
mpic_init(mpic);
}
-#ifdef CONFIG_PCI
-static int primary_phb_addr;
-#endif
-
/*
* Setup the architecture
*/
@@ -85,17 +81,14 @@ void __init corenet_ds_setup_arch(void)
#endif
#ifdef CONFIG_PCI
- for_each_compatible_node(np, "pci", "fsl,p4080-pcie") {
- struct resource rsrc;
- of_address_to_resource(np, 0, &rsrc);
- if ((rsrc.start & 0xfffff) == primary_phb_addr)
- fsl_add_bridge(np, 1);
- else
+ for_each_node_by_type(np, "pci") {
+ if (of_device_is_compatible(np, "fsl,p4080-pcie") ||
+ of_device_is_compatible(np, "fsl,qoriq-pcie-v2.2")) {
fsl_add_bridge(np, 0);
-
- hose = pci_find_hose_for_OF_device(np);
- max = min(max, hose->dma_window_base_cur +
- hose->dma_window_size);
+ hose = pci_find_hose_for_OF_device(np);
+ max = min(max, hose->dma_window_base_cur +
+ hose->dma_window_size);
+ }
}
#endif
@@ -116,6 +109,12 @@ static const struct of_device_id of_device_ids[] __devinitconst = {
{
.compatible = "fsl,rapidio-delta",
},
+ {
+ .compatible = "fsl,p4080-pcie",
+ },
+ {
+ .compatible = "fsl,qoriq-pcie-v2.2",
+ },
{}
};
diff --git a/arch/powerpc/platforms/85xx/p4080_ds.c b/arch/powerpc/platforms/85xx/p4080_ds.c
index 8417046..ec8320c 100644
--- a/arch/powerpc/platforms/85xx/p4080_ds.c
+++ b/arch/powerpc/platforms/85xx/p4080_ds.c
@@ -32,10 +32,6 @@
#include "corenet_ds.h"
-#ifdef CONFIG_PCI
-static int primary_phb_addr;
-#endif
-
/*
* Called very early, device-tree isn't unflattened
*/
@@ -43,17 +39,7 @@ static int __init p4080_ds_probe(void)
{
unsigned long root = of_get_flat_dt_root();
- if (of_flat_dt_is_compatible(root, "fsl,P4080DS")) {
-#ifdef CONFIG_PCI
- /* treat PCIe1 as primary,
- * shouldn't matter as we have no ISA on the board
- */
- primary_phb_addr = 0x0000;
-#endif
- return 1;
- } else {
- return 0;
- }
+ return of_flat_dt_is_compatible(root, "fsl,P4080DS");
}
define_machine(p4080_ds) {
@@ -71,4 +57,6 @@ define_machine(p4080_ds) {
};
machine_device_initcall(p4080_ds, corenet_ds_publish_devices);
+#ifdef CONFIG_SWIOTLB
machine_arch_initcall(p4080_ds, swiotlb_setup_bus_notifier);
+#endif
--
1.7.3.4
next prev parent reply other threads:[~2011-05-20 6:09 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-20 6:09 [PATCH 01/14] powerpc: Rename e55xx_smp_defconfig to corenet64_smp_defconfig Kumar Gala
2011-05-20 6:09 ` [PATCH 02/14] powerpc: Add a defconfig for 'corenet' 32-bit platforms Kumar Gala
2011-05-20 6:09 ` [PATCH 03/14] powerpc/85xx: Add P5020DS device tree Kumar Gala
2011-05-20 6:09 ` [PATCH 04/14] powerpc/85xx: Add P3041DS " Kumar Gala
2011-05-20 6:09 ` [PATCH 05/14] powerpc/85xx: Updates to P4080DS " Kumar Gala
2011-05-20 6:09 ` Kumar Gala [this message]
2011-05-20 6:09 ` [PATCH 07/14] powerpc/fsl_pci: Simplify matching logic for PCI_FIXUP_HEADER Kumar Gala
2011-05-20 6:09 ` [PATCH 08/14] powerpc/85xx: Set up doorbells even with no mpic Kumar Gala
2011-05-20 6:09 ` [PATCH 09/14] powerpc/85xx: Save scratch registers to thread info instead of using SPRGs Kumar Gala
2011-05-20 6:09 ` [PATCH 10/14] powerpc/85xx: Add basic P1023RDS board support Kumar Gala
2011-05-20 6:09 ` [PATCH 11/14] powerpc/book3e: Clarify HW table walk enable/disable message Kumar Gala
2011-05-20 6:09 ` [PATCH 12/14] powerpc/pci: Move FSL fixup from 32-bit to common Kumar Gala
2011-05-20 6:09 ` [PATCH 13/14] powerpc/85xx: Add PCI support in 64-bit mode on P5020DS Kumar Gala
2011-05-20 6:09 ` [PATCH 14/14] powerpc/qe: Limit QE support to ppc32 Kumar Gala
2011-05-20 19:04 ` [PATCH 05/14] powerpc/85xx: Updates to P4080DS device tree Scott Wood
2011-05-20 19:09 ` Kumar Gala
2011-05-20 14:45 ` [PATCH 02/14] powerpc: Add a defconfig for 'corenet' 32-bit platforms Tabi Timur-B04825
2011-05-20 19:20 ` Kumar Gala
2011-05-20 19:25 ` Timur Tabi
2011-05-20 19:30 ` Scott Wood
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1305871771-16334-6-git-send-email-galak@kernel.crashing.org \
--to=galak@kernel.crashing.org \
--cc=linuxppc-dev@ozlabs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).