Re: request_region in the kernel

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Mar 21, 2002 at 09:20:31AM +0100, TAJTHY Tam?s wrote:
> I would like to use the request_region function in the kernel. I if use in 
> a module there is no problem, but if I put it into the kernel, it hangs 
> during the boot. Can anyone help me how to use it? It is a 2.4.7 kernel 
> for a PPC platform.  
> 
> I added the following lines to the arch/ppc/kernel/m8xx_setup.c in the
> m8xx_get_rtc_time function :
> 
> if(!rtc_vm_base)
>       if (request_region(IO_ADR_RTC, IO_LEN_RTC, "k14_rtc"))
>               rtc_vm_base = ioremap(IO_ADR_RTC, IO_LEN_RTC);
>       else
>               printk("Can't request IO ports\n");
> 
> If I don't use request_region it works nicely, but I'd like to 
> allocate this IO region not to allow other modules to modify the chip
> settings. How can I do that?

I'm not a PPC expert, but because you're doing this in setup code, it
is very well posible that the memory management isn't initialised yet.


Erik

-- 
J.A.K. (Erik) Mouw, Information and Communication Theory Group, Faculty
of Information Technology and Systems, Delft University of Technology,
PO BOX 5031, 2600 GA Delft, The Netherlands  Phone: +31-15-2783635
Fax: +31-15-2781843  Email: J.A.K.Mouw@its.tudelft.nl
WWW: http://www-ict.its.tudelft.nl/~erik/
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux