I am using an embedded Linux and in order to read the MAC address, I need to have the I2C driver loaded before the network driver.
How do you change the order in which the drivers are loaded?
Below you can see the I2C driver core driver is loaded first then the specific instance for each I2C adapter after eth0/eth1 are initialized.
From the screen:
i2c-core.o: i2c core module i2c-dev.o: i2c /dev entries driver module i2c-core.o: driver i2c-dev dummy driver registered. i2c-proc.o version 2.6.1 (20010825) pty: 256 Unix98 ptys configured Serial driver version 5.05c (2001-07-08) with MANY_PORTS SHARE_IRQ SERIAL_PCI enabled ttyS00 at 0xfdfeb200 (irq = 0) is a 16550A ttyS01 at 0xfdfea300 (irq = 1) is a 16550A eth0: Phy @ 0x7, type BCM5221 (0x004061e4) Reset ethernet interfaces eth1: Phy @ 0x17, type BCM5221 (0x004061e4) Reset ethernet interfaces IBM IIC driver i2c-dev.o: Registered 'IBM IIC adapter' as minor 0 i2c-core.o: adapter IBM IIC adapter registered as adapter 0. i2c-dev.o: Registered 'IBM IIC adapter' as minor 1 i2c-core.o: adapter IBM IIC adapter registered as adapter 1.
Thanks