diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2015-02-27 17:11:06 +0800 |
---|---|---|
committer | Stewart Smith <stewart@linux.vnet.ibm.com> | 2015-03-04 13:06:11 +1100 |
commit | ac672e8717026b00ed4cdfc396c263c49e5364f6 (patch) | |
tree | a239a4735d81fa21451aa4691ef38b0720fd0f6c /hw/p8-i2c.c | |
parent | 7693f2c7b1bbd5dd63ffe9570bb6bc57d94a8482 (diff) | |
download | skiboot-ac672e8717026b00ed4cdfc396c263c49e5364f6.zip skiboot-ac672e8717026b00ed4cdfc396c263c49e5364f6.tar.gz skiboot-ac672e8717026b00ed4cdfc396c263c49e5364f6.tar.bz2 |
i2c: Workaround bad clock-frequency property from HostBoot
The cell clock is 50Mhz on P8, not 600Mhz ! Remove this when HB has
been fixed.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'hw/p8-i2c.c')
-rw-r--r-- | hw/p8-i2c.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/hw/p8-i2c.c b/hw/p8-i2c.c index 061bdaf..52b9489 100644 --- a/hw/p8-i2c.c +++ b/hw/p8-i2c.c @@ -1173,6 +1173,12 @@ static void p8_i2c_init_one(struct dt_node *i2cm, enum p8_i2c_master_type type) /* Local bus speed in Hz */ lb_freq = dt_prop_get_u32(i2cm, "clock-frequency"); + /* XXX HACK for bad HB value */ + if (lb_freq == 600000000) { + prlog(PR_ERR, "I2C: Fixing up HB bad clock freq !\n"); + lb_freq = 50000000; + } + /* Initialise the i2c master structure */ master->state = state_idle; master->chip_id = dt_get_chip_id(i2cm); |