[U-Boot-Users] I2C scanning

Ben Warren bwarren at qstreams.com
Mon Oct 22 17:30:43 CEST 2007


Yasothabalan Ramaswamy-TLS,Chennai wrote:
> I am able to switch between both the buses, by CONFIG_I2C_MODULE to 1 or
> 2.
>
> #if (CFG_I2C_MODULE == 2)
> #define I2C_BASE    MPC5XXX_I2C2
> #elif (CFG_I2C_MODULE == 1)
> #define I2C_BASE    MPC5XXX_I2C1
> #else
> #error CFG_I2C_MODULE is not properly configured
> #endif
>
> But my problem is I have to scan both the buses dynamically in the run
> time.
>
>   
I understand. Please re-read my earlier response, and do some research 
into your I2C controller. The other I2C controller (fsl_i2c.c), supports 
run-time switching between buses, and may or not be applicable to your 
CPU. If it's not, here's an opportunity for you to update the 5xxx driver.

regards,
Ben




More information about the U-Boot mailing list