All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sergei Shtylyov <sshtylyov@mvista.com>
To: John Crispin <blogic@openwrt.org>
Cc: Ralf Baechle <ralf@linux-mips.org>,
	"linux-mips@linux-mips.org" <linux-mips@linux-mips.org>
Subject: Re: [PATCH V2 02/14] MIPS: pci: parse memory ranges from devicetree
Date: Wed, 02 May 2012 22:12:53 +0400	[thread overview]
Message-ID: <4FA17925.6080707@mvista.com> (raw)
In-Reply-To: <1335961659-21358-2-git-send-email-blogic@openwrt.org>

Hello.

On 05/02/2012 04:27 PM, John Crispin wrote:

> Implement pci_load_of_ranges on MIPS. Due to lack of test hardware only 32bit
> bus width is supported. This function is based on the implementation found on
> powerpc.

> Signed-off-by: John Crispin<blogic@openwrt.org>

> ---
> Changes in V2
> * remove some #ifdefs
> * rename to pci_load_of_ranges

>   arch/mips/include/asm/pci.h |    6 ++++
>   arch/mips/pci/pci.c         |   55 +++++++++++++++++++++++++++++++++++++++++++
>   2 files changed, 61 insertions(+), 0 deletions(-)

[...]
> diff --git a/arch/mips/pci/pci.c b/arch/mips/pci/pci.c
> index 0514866..4d8a1b6 100644
> --- a/arch/mips/pci/pci.c
> +++ b/arch/mips/pci/pci.c
[...]
> @@ -114,9 +115,63 @@ static void __devinit pcibios_scanbus(struct pci_controller *hose)
[...]
> +#ifdef CONFIG_OF
> +void __devinit pci_load_of_ranges(struct pci_controller *hose,
> +				struct device_node *node)
> +{
> +	const __be32 *ranges;
> +	int rlen;
> +	int pna = of_n_addr_cells(node);
> +	int np = pna + 5;
> +
> +	pr_info("PCI host bridge %s ranges:\n", node->full_name);
> +	ranges = of_get_property(node, "ranges",&rlen);
> +	if (ranges == NULL)
> +		return;
> +	hose->of_node = node;
> +
> +	while ((rlen -= np * 4)>= 0) {
> +		u32 pci_space;
> +		struct resource *res = 0;

    s/0/NULL/ to avoid the warning (from sparse?).

WBR, Sergei

  reply	other threads:[~2012-05-02 18:14 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-02 12:27 [PATCH V2 01/14] MIPS: make oprofile use cp0_perfcount_irq if it is set John Crispin
2012-05-02 12:27 ` [PATCH V2 02/14] MIPS: pci: parse memory ranges from devicetree John Crispin
2012-05-02 18:12   ` Sergei Shtylyov [this message]
2012-05-02 12:27 ` [PATCH V2 04/14] MIPS: Add helper function to allow platforms to point at a DTB John Crispin
2012-05-02 12:27 ` [PATCH V2 05/14] MIPS: parse chosen node on boot John Crispin
2012-05-02 12:27 ` [PATCH V2 08/14] MIPS: lantiq: clear all irqs properly " John Crispin
2012-05-02 12:27 ` [PATCH V2 09/14] MIPS: lantiq: enable oprofile support on lantiq targets John Crispin
2012-05-02 12:27 ` [PATCH V2 11/14] MIPS: lantiq: fix early printk John Crispin
2012-05-02 12:27 ` [PATCH V2 12/14] MIPS: lantiq: fix cmdline parsing John Crispin

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=4FA17925.6080707@mvista.com \
    --to=sshtylyov@mvista.com \
    --cc=blogic@openwrt.org \
    --cc=linux-mips@linux-mips.org \
    --cc=ralf@linux-mips.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.