From: Mark Brown <broonie@sirena.org.uk>
To: linuxppc-embedded@ozlabs.org
Subject: Re: Platform devices on MPC8245
Date: Wed, 7 Sep 2005 17:34:28 +0100 [thread overview]
Message-ID: <20050907163428.GA8522@projectcolo.org.uk> (raw)
In-Reply-To: <20050831122556.GA474@projectcolo.org.uk>
On Wed, Aug 31, 2005 at 01:26:00PM +0100, Mark Brown wrote:
> I'm having some trouble using the platform device support for the
> MPC8245 using memory map B, set up using mpc10x_bridge_init(). When
> that function registers the host bridge it registers addresses
> 0x80000000-0xfebfffff for the bridge but by default (with EUMB mapped to
> MPC10X_MAPB_EUMB_BASE) the platform devices on the chip are also within
> this address range. The problem I'm seeing is that when
> platform_device_register() comes to call request_resource() on the
> devices that call fails because the addresses have already been
> allocated to the PCI host bridge.
Does anyone have any suggestions as to what I'm doing wrong with this?
Using kernel 2.6.13 I am currently working around the issue by making
the platform bus use insert_resource() rather than request_resource() as
in the patch below but this really seems like the wrong solution.
--- linux-2.6.13/drivers/base/platform.c 2005-08-29 00:41:01.000000000 +0100
+++ linux/drivers/base/platform.c 2005-09-07 17:26:10.459969600 +0100
@@ -149,7 +149,7 @@
p = &ioport_resource;
}
- if (p && request_resource(p, r)) {
+ if (p && insert_resource(p, r)) {
printk(KERN_ERR
"%s: failed to claim resource %d\n",
pdev->dev.bus_id, i);
--
"You grabbed my hand and we fell into it, like a daydream - or a fever."
next prev parent reply other threads:[~2005-09-07 16:34 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-08-31 12:26 Platform devices on MPC8245 Mark Brown
2005-09-07 16:34 ` Mark Brown [this message]
2005-09-07 16:42 ` Vitaly Bordug
2005-09-07 16:58 ` Mark Brown
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=20050907163428.GA8522@projectcolo.org.uk \
--to=broonie@sirena.org.uk \
--cc=linuxppc-embedded@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).