diff options
author | Wolfgang Grandegger <wg@grandegger.com> | 2009-04-07 10:20:55 +0200 |
---|---|---|
committer | Ben Dooks <ben-linux@fluff.org> | 2009-04-07 10:18:47 +0100 |
commit | f2bd5efe723814916ece92ccfa0bffb085c94b94 (patch) | |
tree | 111f6224df4c31983809d06c1e03c531fb52ebcb /kernel/sys.c | |
parent | 54377cd059061637b627e236a459c58e274f35c6 (diff) |
i2c: i2c-mpc: make I2C bus speed configurable
This patch makes the I2C bus speed configurable by using the I2C node
property "clock-frequency". If the property is not defined, the old
fixed clock settings will be used for backward comptibility.
The generic I2C clock properties, especially the CPU-specific source
clock pre-scaler are defined via the OF match table:
static const struct of_device_id mpc_i2c_of_match[] = {
...
{.compatible = "fsl,mpc8543-i2c",
.data = &(struct fsl_i2c_match_data) {
.setclock = mpc_i2c_setclock_8xxx,
.prescaler = 2,
},
},
The "data" field defines the relevant I2C setclock function and the
relevant pre-scaler for the I2C source clock frequency.
It uses arch-specific tables and functions to determine resonable
Freqency Divider Register (fdr) values for MPC83xx, MPC85xx, MPC86xx,
MPC5200 and MPC5200B.
The i2c->flags field and the corresponding FSL_I2C_DEV_* definitions
have been removed as they are obsolete.
Signed-off-by: Wolfgang Grandegger <wg@grandegger.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Diffstat (limited to 'kernel/sys.c')
0 files changed, 0 insertions, 0 deletions