diff options
author | Cory Maccarrone <darkstar6262@gmail.com> | 2009-12-11 19:16:34 -0500 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2009-12-11 19:16:34 -0500 |
commit | bf92a40762fb10a394281941a46f529463c49ffc (patch) | |
tree | f1c9e124e77c3ccdaebb89c644f9d8275fe5759f /arch/arm/mach-omap1 | |
parent | 106997c1a4aa3a34d8e04fa0138ba332f7ceafef (diff) |
omap1: I2C mux and clocks for omap7xx
This change adds MUX pin configuration and clocks for I2C support
to OMAP 730 and 850-based devices.
Signed-off-by: Cory Maccarrone <darkstar6262@gmail.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/mach-omap1')
-rw-r--r-- | arch/arm/mach-omap1/clock_data.c | 4 | ||||
-rw-r--r-- | arch/arm/mach-omap1/i2c.c | 10 | ||||
-rw-r--r-- | arch/arm/mach-omap1/mux.c | 4 |
3 files changed, 14 insertions, 4 deletions
diff --git a/arch/arm/mach-omap1/clock_data.c b/arch/arm/mach-omap1/clock_data.c index cf5f017b392c..ab995a9c606c 100644 --- a/arch/arm/mach-omap1/clock_data.c +++ b/arch/arm/mach-omap1/clock_data.c | |||
@@ -655,9 +655,9 @@ static struct omap_clk omap_clks[] = { | |||
655 | CLK("mmci-omap.1", "ick", &armper_ck.clk, CK_16XX), | 655 | CLK("mmci-omap.1", "ick", &armper_ck.clk, CK_16XX), |
656 | /* Virtual clocks */ | 656 | /* Virtual clocks */ |
657 | CLK(NULL, "mpu", &virtual_ck_mpu, CK_16XX | CK_1510 | CK_310), | 657 | CLK(NULL, "mpu", &virtual_ck_mpu, CK_16XX | CK_1510 | CK_310), |
658 | CLK("i2c_omap.1", "fck", &i2c_fck, CK_16XX | CK_1510 | CK_310), | 658 | CLK("i2c_omap.1", "fck", &i2c_fck, CK_16XX | CK_1510 | CK_310 | CK_7XX), |
659 | CLK("i2c_omap.1", "ick", &i2c_ick, CK_16XX), | 659 | CLK("i2c_omap.1", "ick", &i2c_ick, CK_16XX), |
660 | CLK("i2c_omap.1", "ick", &dummy_ck, CK_1510 | CK_310), | 660 | CLK("i2c_omap.1", "ick", &dummy_ck, CK_1510 | CK_310 | CK_7XX), |
661 | CLK("omap_uwire", "fck", &armxor_ck.clk, CK_16XX | CK_1510 | CK_310), | 661 | CLK("omap_uwire", "fck", &armxor_ck.clk, CK_16XX | CK_1510 | CK_310), |
662 | CLK("omap-mcbsp.1", "ick", &dspper_ck, CK_16XX), | 662 | CLK("omap-mcbsp.1", "ick", &dspper_ck, CK_16XX), |
663 | CLK("omap-mcbsp.1", "ick", &dummy_ck, CK_1510 | CK_310), | 663 | CLK("omap-mcbsp.1", "ick", &dummy_ck, CK_1510 | CK_310), |
diff --git a/arch/arm/mach-omap1/i2c.c b/arch/arm/mach-omap1/i2c.c index bc9d12bc1c61..1bf4735e27a6 100644 --- a/arch/arm/mach-omap1/i2c.c +++ b/arch/arm/mach-omap1/i2c.c | |||
@@ -21,13 +21,19 @@ | |||
21 | 21 | ||
22 | #include <plat/i2c.h> | 22 | #include <plat/i2c.h> |
23 | #include <plat/mux.h> | 23 | #include <plat/mux.h> |
24 | #include <plat/cpu.h> | ||
24 | 25 | ||
25 | int __init omap_register_i2c_bus(int bus_id, u32 clkrate, | 26 | int __init omap_register_i2c_bus(int bus_id, u32 clkrate, |
26 | struct i2c_board_info const *info, | 27 | struct i2c_board_info const *info, |
27 | unsigned len) | 28 | unsigned len) |
28 | { | 29 | { |
29 | omap_cfg_reg(I2C_SDA); | 30 | if (cpu_is_omap7xx()) { |
30 | omap_cfg_reg(I2C_SCL); | 31 | omap_cfg_reg(I2C_7XX_SDA); |
32 | omap_cfg_reg(I2C_7XX_SCL); | ||
33 | } else { | ||
34 | omap_cfg_reg(I2C_SDA); | ||
35 | omap_cfg_reg(I2C_SCL); | ||
36 | } | ||
31 | 37 | ||
32 | return omap_plat_register_i2c_bus(bus_id, clkrate, info, len); | 38 | return omap_plat_register_i2c_bus(bus_id, clkrate, info, len); |
33 | } | 39 | } |
diff --git a/arch/arm/mach-omap1/mux.c b/arch/arm/mach-omap1/mux.c index 5e183cd7611a..07212cc621ae 100644 --- a/arch/arm/mach-omap1/mux.c +++ b/arch/arm/mach-omap1/mux.c | |||
@@ -58,6 +58,10 @@ MUX_CFG_7XX("W19_7XX_USB_DCRST", 3, 7, 1, 6, 0, 0) | |||
58 | MUX_CFG_7XX("MMC_7XX_CMD", 2, 9, 0, 8, 1, 0) | 58 | MUX_CFG_7XX("MMC_7XX_CMD", 2, 9, 0, 8, 1, 0) |
59 | MUX_CFG_7XX("MMC_7XX_CLK", 2, 13, 0, 12, 1, 0) | 59 | MUX_CFG_7XX("MMC_7XX_CLK", 2, 13, 0, 12, 1, 0) |
60 | MUX_CFG_7XX("MMC_7XX_DAT0", 2, 17, 0, 16, 1, 0) | 60 | MUX_CFG_7XX("MMC_7XX_DAT0", 2, 17, 0, 16, 1, 0) |
61 | |||
62 | /* I2C interface */ | ||
63 | MUX_CFG_7XX("I2C_7XX_SCL", 5, 1, 0, 0, 1, 0) | ||
64 | MUX_CFG_7XX("I2C_7XX_SDA", 5, 5, 0, 0, 1, 0) | ||
61 | }; | 65 | }; |
62 | #define OMAP7XX_PINS_SZ ARRAY_SIZE(omap7xx_pins) | 66 | #define OMAP7XX_PINS_SZ ARRAY_SIZE(omap7xx_pins) |
63 | #else | 67 | #else |