[U-Boot] [PATCH] 8/12 Multiadapter/multibus I2C, configs part 1
ksi at koi8.net
ksi at koi8.net
Tue Feb 17 21:12:17 CET 2009
On Mon, 16 Feb 2009, Wolfgang Denk wrote:
> Dear ksi at koi8.net,
>
> In message <Pine.LNX.4.64ksi.0902121425220.21067 at home-gw.koi8.net> you wrote:
> >
> > -#define CONFIG_HARD_I2C /* I2C with hardware support*/
> > -#undef CONFIG_SOFT_I2C /* I2C bit-banged */
> > -#define CONFIG_SYS_I2C_SPEED 400000 /* I2C speed and slave address */
> > -#define CONFIG_SYS_I2C_EEPROM_ADDR 0x57
> > -#define CONFIG_SYS_I2C_SLAVE 0x7F
> > -#define CONFIG_SYS_I2C_NOPROBES {0x69} /* Don't probe these addrs */
> > -#define CONFIG_SYS_I2C_OFFSET 0x3000
> > +#define CONFIG_NEW_I2C /* New I2C code */
> > +#define CONFIG_FSL_I2C /* Use FSL common I2C driver */
> > +#define CONFIG_SYS_FSL_I2C_SPEED 400000 /* I2C speed and slave address */
> > +#define CONFIG_SYS_FSL_I2C_EEPROM_ADDR 0x57
> > +#define CONFIG_SYS_FSL_I2C_SLAVE 0x7F
> > +#define CONFIG_SYS_I2C_NOPROBES {0x69} /* Don't probe these addrs */
> > +#define CONFIG_SYS_FSL_I2C_OFFSET 0x3000
> > +#define CONFIG_SYS_I2C_ADAPTERS {&fsl_i2c_adap[0]}
>
> Do we really need sucheven more unreadable names?
>
> Why do you have to add the FSL_, SOFT_, ... everywhere?
>
> I think this should be redundant. Omit it.
Because you can have several DIFFERENT adapters in the system. Each of those
adapters should have its own set of configuration parameters. That's why
adapter-specific prefixes are used. There are no prefixes on options common
to the entire I2C sybsystem, e.g. CONFIG_SYS_I2C_ADAPTERS.
Once more - one can have both hardware adapter able to run at 400 kHz and a
bitbanged one only capable of 20 kHz. If we used a generic
CONFIG_SYS_I2C_SPEED, what should we put there? 20000? But why that slow
bitbanged interface be a handicap on a fast hardware one? 400000? But
bitbanged one can not run at that speed... The same is true for slaveaddr.
CONFIG_SYS_FSL_I2C_EEPROM_ADDR is an error, it should NOT have FSL_ prefix.
That's a typo I will fix.
---
******************************************************************
* 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