From: Scott Wood <scottwood-KZfg59tc24xl57MIdRCFDg@public.gmane.org>
To: Subodh Nijsure <sunijsur-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
Cc: devicetree-discuss-mnsaURCQ41sdnm+yROfE0A@public.gmane.org
Subject: Re: Where in dts file one should define IORESOURCES_(IO|MEM)?
Date: Mon, 13 Apr 2009 13:59:25 -0500 [thread overview]
Message-ID: <49E38B8D.8040105@freescale.com> (raw)
In-Reply-To: <003e01c9bc60$ab11c2c0$9e70150a-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
Subodh Nijsure wrote:
> in drivers/ide/legacy/ide_platform.c there is code that looks like this.
>
>
> res_base = platform_get_resource(pdev, IORESOURCE_IO, 0);
> res_alt = platform_get_resource(pdev, IORESOURCE_IO, 1);
>
> if (!res_base || !res_alt) {
> res_base = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> res_alt = platform_get_resource(pdev, IORESOURCE_MEM, 1);
> If I want to specify IORESOURCE_MEM (0) and IORESOURCE_MEM ( 1)
> addresses in my board specific what statements do I need to include in
> my dts file?
They would be the first and second "reg" resources of the relevant
device node.
For IDE, you probably want drivers/ata/pata_of_platform.c rather than
the above driver.
> I have tried including them in memory {} section of dts and that doesn't
> work.
No, that's for *memory*, not device registers.
-Scott
prev parent reply other threads:[~2009-04-13 18:59 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-13 17:52 Where in dts file one should define IORESOURCES_(IO|MEM)? Subodh Nijsure
[not found] ` <003e01c9bc60$ab11c2c0$9e70150a-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
2009-04-13 18:59 ` Scott Wood [this message]
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=49E38B8D.8040105@freescale.com \
--to=scottwood-kzfg59tc24xl57midrcfdg@public.gmane.org \
--cc=devicetree-discuss-mnsaURCQ41sdnm+yROfE0A@public.gmane.org \
--cc=sunijsur-FYB4Gu1CFyUAvxtiuMwx3w@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