From: Scott Wood <scottwood@freescale.com>
To: Jia Hongtao <B38951@freescale.com>
Cc: B07421@freescale.com, linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH V4 3/3] powerpc/fsl-pci: Unify pci/pcie initialization code
Date: Thu, 2 Aug 2012 15:18:42 -0500 [thread overview]
Message-ID: <501AE0A2.4010809@freescale.com> (raw)
In-Reply-To: <1343907741-20589-4-git-send-email-B38951@freescale.com>
On 08/02/2012 06:42 AM, Jia Hongtao wrote:
> We unified the Freescale pci/pcie initialization by changing the fsl_pci
> to a platform driver. In previous PCI code architecture the initialization
> routine is called at board_setup_arch stage. Now the initialization is done
> in probe function which is architectural better. Also It's convenient for
> adding PM support for PCI controller in later patch.
>
> Now we registered pci controllers as platform devices. So we combine two
> initialization code as one platform driver.
>
> Signed-off-by: Jia Hongtao <B38951@freescale.com>
> Signed-off-by: Li Yang <leoli@freescale.com>
> Signed-off-by: Chunhe Lan <Chunhe.Lan@freescale.com>
> ---
> arch/powerpc/platforms/85xx/mpc85xx_ds.c | 32 ++--------
> arch/powerpc/sysdev/fsl_pci.c | 102 ++++++++++++++++++-----------
> arch/powerpc/sysdev/fsl_pci.h | 6 +-
> drivers/edac/mpc85xx_edac.c | 43 ++++---------
> 4 files changed, 83 insertions(+), 100 deletions(-)
>
> diff --git a/arch/powerpc/platforms/85xx/mpc85xx_ds.c b/arch/powerpc/platforms/85xx/mpc85xx_ds.c
> index 56f8c8f..f2c7b1c 100644
> --- a/arch/powerpc/platforms/85xx/mpc85xx_ds.c
> +++ b/arch/powerpc/platforms/85xx/mpc85xx_ds.c
> @@ -20,7 +20,6 @@
> #include <linux/seq_file.h>
> #include <linux/interrupt.h>
> #include <linux/of_platform.h>
> -#include <linux/memblock.h>
>
> #include <asm/time.h>
> #include <asm/machdep.h>
> @@ -117,40 +116,16 @@ void __init mpc85xx_ds_pic_init(void)
> extern int uli_exclude_device(struct pci_controller *hose,
> u_char bus, u_char devfn);
>
> -static struct device_node *pci_with_uli;
> -
> static int mpc85xx_exclude_device(struct pci_controller *hose,
> u_char bus, u_char devfn)
> {
> - if (hose->dn == pci_with_uli)
> + if (hose->dn == fsl_pci_primary)
> return uli_exclude_device(hose, bus, devfn);
>
> return PCIBIOS_SUCCESSFUL;
> }
> #endif /* CONFIG_PCI */
>
> -static void __init mpc85xx_ds_pci_init(void)
> -{
> -#ifdef CONFIG_PCI
> - struct device_node *node;
> -
> - fsl_pci_init();
> -
> - /* See if we have a ULI under the primary */
> -
> - node = of_find_node_by_name(NULL, "uli1575");
> - while ((pci_with_uli = of_get_parent(node))) {
> - of_node_put(node);
> - node = pci_with_uli;
> -
> - if (pci_with_uli == fsl_pci_primary) {
> - ppc_md.pci_exclude_device = mpc85xx_exclude_device;
> - break;
> - }
> - }
> -#endif
> -}
> -
> /*
> * Setup the architecture
> */
> @@ -159,8 +134,11 @@ static void __init mpc85xx_ds_setup_arch(void)
> if (ppc_md.progress)
> ppc_md.progress("mpc85xx_ds_setup_arch()", 0);
>
> +#ifdef CONFIG_PCI
> + ppc_md.pci_exclude_device = mpc85xx_exclude_device;
> +#endif
Why are you eliminating the uli lookup? We don't want to call
uli_exclude_device on boards that don't have a uli.
-Scott
next prev parent reply other threads:[~2012-08-02 20:18 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-02 11:42 [PATCH V4 0/3] PCI patch set description Jia Hongtao
2012-08-02 11:42 ` [PATCH V4 1/3] powerpc/fsl-pci: Only scan PCI bus if configured as a host Jia Hongtao
2012-08-02 11:42 ` [PATCH V4 2/3] powerpc/swiotlb: Enable at early stage and disable if not necessary Jia Hongtao
2012-08-02 12:54 ` Kumar Gala
2012-08-03 2:21 ` Jia Hongtao-B38951
2012-08-03 12:38 ` Kumar Gala
2012-08-03 14:42 ` Li Yang
2012-08-03 16:15 ` Kumar Gala
2012-08-02 11:42 ` [PATCH V4 3/3] powerpc/fsl-pci: Unify pci/pcie initialization code Jia Hongtao
2012-08-02 12:23 ` Kumar Gala
2012-08-02 15:59 ` Scott Wood
2012-08-03 3:39 ` Jia Hongtao-B38951
2012-08-03 16:03 ` Scott Wood
2012-08-06 2:39 ` Jia Hongtao-B38951
2012-08-06 15:15 ` Scott Wood
2012-08-07 6:23 ` Jia Hongtao-B38951
2012-08-07 15:19 ` Scott Wood
2012-08-08 3:57 ` Jia Hongtao-B38951
2012-08-08 15:53 ` Scott Wood
2012-08-09 3:52 ` Jia Hongtao-B38951
2012-08-10 22:59 ` Scott Wood
2012-08-02 20:18 ` Scott Wood [this message]
2012-08-03 2:20 ` Jia Hongtao-B38951
2012-08-03 16:09 ` Scott Wood
2012-08-06 4:11 ` Tabi Timur-B04825
2012-08-06 14:03 ` 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=501AE0A2.4010809@freescale.com \
--to=scottwood@freescale.com \
--cc=B07421@freescale.com \
--cc=B38951@freescale.com \
--cc=linuxppc-dev@lists.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).