From: David Gibson <david-xT8FGy+AXnRB3Ne2BGzF6laj5H9X9Tb+@public.gmane.org>
To: Stephen Neuendorffer
<stephen.neuendorffer-gjFFaj9aHVfQT0dZR+AlfA@public.gmane.org>
Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org
Subject: Re: [PATCH] of/fdt: Add unflatten_partial_device_tree
Date: Fri, 2 Jul 2010 14:18:10 +1000 [thread overview]
Message-ID: <20100702041810.GI8385@yookeroo> (raw)
In-Reply-To: <71b1d294-48d9-4408-941c-2400174954e1-+Ck8Kgl/v0/nHLUNXTEFU7jjLBE8jN/0@public.gmane.org>
On Thu, Jul 01, 2010 at 08:59:16AM -0700, Stephen Neuendorffer wrote:
[snip]
> Going down this path, I've taken an approach where the PCI driver reads
> the PCI BARs which are set earlier
> and stuffs the correct ranges=<> property into the device tree. I think
> this is necessary because (I believe)
> powerpc programs the BARs based on the flat device tree, whereas on X86,
> the BIOS enumerates the BARs and
Only on some powerpc subplatforms, I believe. Some platforms have
minimal firmwares that either don't configure the BARs at all, or get
them so hopelessly wrong that we have to reconfigure everything anyway.
> everyone else just deals with it. This should enable the device driver
> to use the existing address translation
> code in driver/of/address.c:of_address_to_resource(). The current
> status is that I get something like:
>
> OF: ** translation for device /plb@0/xps-hwicap@80030000 **
> OF: bus is default (na=1, ns=1) on /plb@0
> OF: translating address: 80030000
> OF: parent bus is default (na=1, ns=1) on /
> OF: walking ranges...
> OF: default map, cp=80000000, s=10000000, da=80030000
> OF: parent translation for: d0000000
> OF: with offset: 30000
> OF: one level translation: d0030000
> OF: reached root node
> of_icap d0030000.xps-hwicap: Xilinx icap port driver
> of_icap d0030000.xps-hwicap: Couldn't lock memory region at d0030000
> of_icap: probe of d0030000.xps-hwicap failed with error -16
>
> Apparently because the address region is already assigned to the PCI
> device. I think I need to figure out how
> PCI bridges declare their address range but don't lock it, so that the
> device in the FPGA (in this case the ICAP) can
> claim it later.
>
> Steve
>
>
>
>
> This email and any attachments are intended for the sole use of the named recipient(s) and contain(s) confidential information that may be proprietary, privileged or copyrighted under applicable law. If you are not the intended recipient, do not read, copy, or forward this email message or any attachments. Delete this email message and any attachments immediately.
>
>
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
next prev parent reply other threads:[~2010-07-02 4:18 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1277747279-9236-1-git-send-email-stephen.neuendorffer@xilinx.com>
[not found] ` <1277747279-9236-1-git-send-email-stephen.neuendorffer-gjFFaj9aHVfQT0dZR+AlfA@public.gmane.org>
2010-06-28 17:47 ` [PATCH] drivers/of: Make device tree code work on any arch Stephen Neuendorffer
[not found] ` <1277747279-9236-2-git-send-email-stephen.neuendorffer@xilinx.com>
[not found] ` <1277747279-9236-2-git-send-email-stephen.neuendorffer-gjFFaj9aHVfQT0dZR+AlfA@public.gmane.org>
2010-06-28 17:47 ` [PATCH] of/fdt: Add unflatten_partial_device_tree Stephen Neuendorffer
[not found] ` <aa5152a0-4931-479a-bc89-78ac4922c7f1-RaUQJvECHiv5op9OF0Koj7jjLBE8jN/0@public.gmane.org>
2010-06-28 23:18 ` Grant Likely
[not found] ` <AANLkTilXgArDaFjv0RiTMeQBdU3bma4sTtLLbwN8lI4O-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-06-29 1:22 ` David Gibson
2010-06-29 2:40 ` Grant Likely
[not found] ` <cf16ff7b-9208-4f47-8cea-ed8a8e52d30e-2ueSQiBKiTY7tOexoI0I+QC/G2K4zDHf@public.gmane.org>
2010-06-29 16:25 ` M. Warner Losh
[not found] ` <20100629.102503.835458634865560451.imp-uzTCJ5RojNnQT0dZR+AlfA@public.gmane.org>
2010-06-29 16:52 ` Stephen Neuendorffer
2010-06-29 20:42 ` Grant Likely
2010-06-29 4:50 ` Stephen Neuendorffer
[not found] ` <7d85d675-2028-4942-a819-c97d2295ea3b-RaUQJvECHitCYczPSvLbDrjjLBE8jN/0@public.gmane.org>
2010-07-01 15:59 ` Stephen Neuendorffer
[not found] ` <71b1d294-48d9-4408-941c-2400174954e1-+Ck8Kgl/v0/nHLUNXTEFU7jjLBE8jN/0@public.gmane.org>
2010-07-02 4:18 ` David Gibson [this message]
2010-07-06 22:57 ` Grant Likely
[not found] ` <1277747279-9236-3-git-send-email-stephen.neuendorffer@xilinx.com>
[not found] ` <1277747279-9236-3-git-send-email-stephen.neuendorffer-gjFFaj9aHVfQT0dZR+AlfA@public.gmane.org>
2010-06-28 17:47 ` [PATCH] arch/x86: Add support for device tree code Stephen Neuendorffer
[not found] ` <1277747279-9236-4-git-send-email-stephen.neuendorffer@xilinx.com>
[not found] ` <1277747279-9236-4-git-send-email-stephen.neuendorffer-gjFFaj9aHVfQT0dZR+AlfA@public.gmane.org>
2010-06-28 17:47 ` [PATCH] xilinx_pcipr: Added Xilinx reconfigurable PCI endpoint driver Stephen Neuendorffer
[not found] ` <eab0dbb2-2819-4d1e-b8fd-630fb0912b31-RaUQJvECHiv5op9OF0Koj7jjLBE8jN/0@public.gmane.org>
2010-06-28 22:23 ` Grant Likely
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=20100702041810.GI8385@yookeroo \
--to=david-xt8fgy+axnrb3ne2bgzf6laj5h9x9tb+@public.gmane.org \
--cc=devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org \
--cc=stephen.neuendorffer-gjFFaj9aHVfQT0dZR+AlfA@public.gmane.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