linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Misbah khan <misbah_khan@engineer.com>
To: linuxppc-embedded@ozlabs.org
Subject: Ioremap related concern ...
Date: Wed, 17 Sep 2008 21:43:21 -0700 (PDT)	[thread overview]
Message-ID: <19545826.post@talk.nabble.com> (raw)


Hi all,

i am facing a problem regarding the usage of ioremap function which is
described as:-

1) I am remaping the SDRAM memory into three continews buffer as 
	ptr1 = (unsigned int *)ioremap(0x0001000,0x1000);
	ptr2 = (unsigned int *)ioremap(0x0002000,0x1000);
	ptr3 = (unsigned int *)ioremap(0x0003000,0x1000);

I am filling the data into the SDRAM buffer using these remap pointers 

2)  SDRAM is mmaped to user space into a buffer as 
	struct sdram_buf
	{
		unsigned int buf[4096];

	};
	struct sdram_buf sdram_buf_obj[3];

The mapping looks correct but it doesent work ... :(

	If is do the ioremap like this it works 
	
	ptr1 = (unsigned int *)ioremap(0x0001000,(0x1000 * 4));
	ptr2 = (unsigned int *)ioremap(0x0002000,(0x1000 * 4));
	ptr3 = (unsigned int *)ioremap(0x0003000,(0x1000 * 4));

	Doing this actually takes more space into the ram memory hence for mapping 
	1 M of Ram memeoy it actually takes 4 MB practically.

Can any one point out the mistake or suggest something ...
-- 
View this message in context: http://www.nabble.com/Ioremap-related-concern-...-tp19545826p19545826.html
Sent from the linuxppc-embedded mailing list archive at Nabble.com.

             reply	other threads:[~2008-09-18  4:43 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-18  4:43 Misbah khan [this message]
2008-09-18  6:12 ` Ioremap related concern 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=19545826.post@talk.nabble.com \
    --to=misbah_khan@engineer.com \
    --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).