[U-Boot] [PATCH] 0/12 Multiadapter/multibus I2C

ksi at koi8.net ksi at koi8.net
Thu Feb 12 23:09:39 CET 2009


Here is the second attempt for initial portion of multibus/multiadapter
I2C support.

This includes a set of common files, all drivers in drivers/i2c and all
boards affected by these changes (config files, board files, and lib_xx
files.)

There is an illustrative example of multiadapter multibus I2C config in
MPC8548CDS.h config file (#if 0'd.) Definitions in that example are
bogus so please don't expect it to work. It will compile though...

This set also includes big rework for soft_i2c.c that makes it template
version that allows up to 4 bitbanged adapters. This number can be
reduced/increased; 4 is arbitrary chosen value. I'm not a CPP guru so I
did not find a way to make a version without a limit. Sure I could add
additional configuration variable for this limit but it is one more
variable and resulting soft_i2c.c would be much uglier.

The general rule for multi-adapter controllers (fsl_i2c, mxc_i2c, etc.)
is that all defines for the first controller do not have any number in
their names, the second one has "2" and so on. That allows for
compatibility with existing code. All existing defaults are kept.

I did test-compile all ARM and PPC boards. Unfortunately I have never
worked with m68k, mips, blackfin so I don't have toolchains for those
to do test builds.

The only board that failed to compile was SIMPC8313.h that fails to
link NAND bootstrap with "NAND bootstrap too big" but it has nothing to
do with new I2C code; it also fails without my patches.

All patches are against today's u-boot-i2c.git.

---
******************************************************************
*  KSI at home    KOI8 Net  < >  The impossible we do immediately.  *
*  Las Vegas   NV, USA   < >  Miracles require 24-hour notice.   *
******************************************************************


More information about the U-Boot mailing list