request_mem_region

Hi,

I'm trying to write a simple driver using some registers of my hardware.

Is a call to request_mem_region() advisory ("recommended") or
compulsory before I ioremap the memory?

In other words, if I don't use request_mem_region() before I start
using the memory; is my driver BOUND to fail, or it MAY fail?

Thanks,

Rick
--
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo [at] vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
Rick Brown [ Di, 20 Oktober 2009 18:25 ] [ ID #2019625 ]

Re: request_mem_region

Hi,
On Tue, Oct 20, 2009 at 7:25 PM, Rick Brown <rick.brown.3 [at] gmail.com> wrote:
> Hi,
>
> I'm trying to write a simple driver using some registers of my hardware.
>
> Is a call to request_mem_region() advisory ("recommended") or
> compulsory before I ioremap the memory?

I think it is "compulsory" recommened.

>
> In other words, if I don't use request_mem_region() before I start
> using the memory; is my driver BOUND to fail, or it MAY fail?

You need to call request_mem_region in order to verify that no other
device is using the same address resource.

So your driver might FAIL if the address is already reserved for another device.

thanks,
Daniel.
--
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo [at] vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
Daniel Baluta [ Di, 20 Oktober 2009 19:00 ] [ ID #2019626 ]
Linux » gmane.linux.newbie » request_mem_region

Vorheriges Thema: Write and Submit Your First Kernel Patch
Nächstes Thema: preempt_disable() as synchronization tool