request_region or request_mem_region, that's the question here.

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

 



Hi, newbies & guru's.

We have written a quite simple CAN SJA1000 module, that is currently loaded 
into Linux kernels on various embedded machines (all of them based on Geode 
CPU's), and those boards - their IO - vary a little bit:
some of them have paged the chip into memory, and so the SJA has to be 
accessed using readb/writeb after having reserved the IO range with 
request_mem_region, in the device open call.
But, on other boards you must pull/push your bytes trough inb/outb, and open 
must be done with request_region.
If one executes the first method on an architecture that requires method 2, 
the kernel oops'es with a page request fault. Not sooo good.

LDD2 says, check_region has been obsoleted in 2.4, and it brings a code 
example for check_mem_region, that tells, if a certain region is already in 
use - that's not what I'm interested in.

Now, my question: is there a possibility to do a plug-n-play game, at load 
time, in order to determine the necessary IO method ?
Is it possible to 'catch' the oops, at load time also, and to  ?

Thx for any hints
Michael
--
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