Re: Runtime decide module to load

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

 



On Fri, 9 Jan 2009 18:03:23 +0530 "Vivek Kumar Gupta"
<gkvivek@xxxxxxxxx> wrote:
> I am using Linux kernel 2.6.26.3 on ARM. 
> 
> I have two Ethernet modules. Based on the hardware (run time) I have to
> run specific driver. Checking hardware is easy, On run time I can read
> the registers and will know which Ethernet Chip is present.
> 
>  
> 
> Individually both Ethernet driver works fine on their respective
> hardware.
> 
>  
> 
> Now problem, I have put both the drivers code in same (one) kernel and
> dynamically shift between drivers depending of the hardware.
> 
>  how to run the driver dynamically. Both Ethernet drivers I have used
> are statically compiled into the kernel.

You already answered your own question:

> On run time I can read the registers and will know which Ethernet Chip
> is present

So test for the register in the driver probe or init function and you
will automatically get the right driver.


Erik

-- 
Erik Mouw -- mouw@xxxxxxxxxxxx
GPG key fingerprint: D6AC 7F15 A26E C5C4 62E0  4A58 FCF9 551C 9B48 B68D

Attachment: signature.asc
Description: PGP signature


[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