diff options
author | Simon Glass <sjg@chromium.org> | 2012-12-13 20:48:49 +0000 |
---|---|---|
committer | Tom Rini <trini@ti.com> | 2013-02-04 09:05:42 -0500 |
commit | 609e6ec3f623f3c3aa2a056654fbc5886e092897 (patch) | |
tree | e96d7d41daca9156d94c3a289f3312b46ac74412 /drivers/i2c/fsl_i2c.c | |
parent | 67ac13b1b9b6ca00893714fbc8cbf556bab6fd59 (diff) | |
download | u-boot-imx-609e6ec3f623f3c3aa2a056654fbc5886e092897.zip u-boot-imx-609e6ec3f623f3c3aa2a056654fbc5886e092897.tar.gz u-boot-imx-609e6ec3f623f3c3aa2a056654fbc5886e092897.tar.bz2 |
ppc: m68k: Move i2c1_clk, i2c2_clk to arch_global_data
Move these fields into arch_global_data and tidy up. This is needed for
both ppc and m68k since they share the i2c driver.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers/i2c/fsl_i2c.c')
-rw-r--r-- | drivers/i2c/fsl_i2c.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/i2c/fsl_i2c.c b/drivers/i2c/fsl_i2c.c index 3cb232f..1c7265d 100644 --- a/drivers/i2c/fsl_i2c.c +++ b/drivers/i2c/fsl_i2c.c @@ -217,9 +217,9 @@ static unsigned int set_i2c_bus_speed(const struct fsl_i2c *dev, static unsigned int get_i2c_clock(int bus) { if (bus) - return gd->i2c2_clk; /* I2C2 clock */ + return gd->arch.i2c2_clk; /* I2C2 clock */ else - return gd->i2c1_clk; /* I2C1 clock */ + return gd->arch.i2c1_clk; /* I2C1 clock */ } void @@ -468,7 +468,8 @@ int i2c_set_bus_num(unsigned int bus) int i2c_set_bus_speed(unsigned int speed) { - unsigned int i2c_clk = (i2c_bus_num == 1) ? gd->i2c2_clk : gd->i2c1_clk; + unsigned int i2c_clk = (i2c_bus_num == 1) + ? gd->arch.i2c2_clk : gd->arch.i2c1_clk; writeb(0, &i2c_dev[i2c_bus_num]->cr); /* stop controller */ i2c_bus_speed[i2c_bus_num] = |