From: Sylvain Munaut <tnt@246tNt•com>
To: Eric Nuckols <jrocnuck@hotmail•com>
Cc: linuxppc-embedded@ozlabs•org
Subject: Re: mem=XXXM ioremap DMA
Date: Mon, 29 Jan 2007 18:13:44 +0100 [thread overview]
Message-ID: <45BE2B48.9070708@246tNt.com> (raw)
In-Reply-To: <BAY117-F356D4E37F804FF68E26CB2C8A70@phx.gbl>
Eric Nuckols wrote:
>
>> Eric Nuckols wrote:
>>
>>> in my driver, I'm calling
>>> my_virt_address = ioremap( 0x1F800000, 0x800000 );
>>> my_bus_address = virt_to_bus( my_virt_address );
>>>
>>>
>> You can't use virt_to_bus on address returned by ioremap AFAIK.
>>
>> I think you could do
>> my_bus_address = virt_to_bus(phys_to_virt(0x1f800000));
>>
>> Altough it slightly misuse the functions ... but that should work.
>>
>>
>> Sylvain
>>
>>
>
> If I use this approach in a driver, won't I still need to use the ioremap
> function to make sure the kernel does not reassign the virtual addresses to
> some other physical memory locations?
mmh, I wasn't clear :
You must do :
my_virt_address = ioremap( 0x1F800000, 0x800000 );
my_bus_address = virt_to_bus(phys_to_virt(0x1f800000));
The virtual address returned by phys_to_virt won't be really valid ... but it
will be good enough for virt_to_bus. In the end, it will just do
PCI_DRAM_OFFSET + 0x1f800000;
Sylvain
next prev parent reply other threads:[~2007-01-29 17:14 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-01-26 6:07 8360 UCC_GETH INIT_WORK compile error Russell McGuire
2007-01-26 6:18 ` Li Yang-r58472
2007-01-26 7:40 ` Kumar Gala
2007-01-27 8:48 ` mem=XXXM ioremap DMA Eric Nuckols
2007-01-29 8:06 ` Sylvain Munaut
2007-01-29 15:33 ` Eric Nuckols
2007-01-29 17:13 ` Sylvain Munaut [this message]
2007-01-31 2:07 ` reprogramming boot flash from live kernel Eric Nuckols
2007-01-31 7:38 ` DI BACCO ANTONIO - technolabs
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=45BE2B48.9070708@246tNt.com \
--to=tnt@246tnt$(echo .)com \
--cc=jrocnuck@hotmail$(echo .)com \
--cc=linuxppc-embedded@ozlabs$(echo .)org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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