summaryrefslogtreecommitdiff
path: root/arch/arm/cpu/arm926ejs/armada100
diff options
context:
space:
mode:
authorLei Wen <[leiwen@marvell.com]>2011-04-13 23:48:44 +0530
committerAlbert ARIBAUD <albert.u.boot@aribaud.net>2011-04-27 19:38:08 +0200
commit81a9ab21ca4f1af85efd37de7baaad131f0e7edc (patch)
tree5f38c429f730b8986e90621e45f97ffd46fe47e7 /arch/arm/cpu/arm926ejs/armada100
parentadb00bb6a05be8b1a64820becdc052513888b280 (diff)
downloadu-boot-imx-81a9ab21ca4f1af85efd37de7baaad131f0e7edc.zip
u-boot-imx-81a9ab21ca4f1af85efd37de7baaad131f0e7edc.tar.gz
u-boot-imx-81a9ab21ca4f1af85efd37de7baaad131f0e7edc.tar.bz2
I2C: add i2c support for Armada100 platform
Add i2c support to aspenite board with Armada100 soc. Acked-by: Heiko Schocher <hs@denx.de> Acked-by: Prafulla Wadaskar <prafulla@marvell.com> Signed-off-by: Lei Wen <leiwen@marvell.com>
Diffstat (limited to 'arch/arm/cpu/arm926ejs/armada100')
-rw-r--r--arch/arm/cpu/arm926ejs/armada100/cpu.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/arch/arm/cpu/arm926ejs/armada100/cpu.c b/arch/arm/cpu/arm926ejs/armada100/cpu.c
index 62aa175..c21938e 100644
--- a/arch/arm/cpu/arm926ejs/armada100/cpu.c
+++ b/arch/arm/cpu/arm926ejs/armada100/cpu.c
@@ -62,6 +62,16 @@ int arch_cpu_init(void)
/* Enable GPIO clock */
writel(APBC_APBCLK, &apb1clkres->gpio);
+#ifdef CONFIG_I2C_MV
+ /* Enable general I2C clock */
+ writel(APBC_RST | APBC_FNCLK | APBC_APBCLK, &apb1clkres->twsi0);
+ writel(APBC_FNCLK | APBC_APBCLK, &apb1clkres->twsi0);
+
+ /* Enable power I2C clock */
+ writel(APBC_RST | APBC_FNCLK | APBC_APBCLK, &apb1clkres->twsi1);
+ writel(APBC_FNCLK | APBC_APBCLK, &apb1clkres->twsi1);
+#endif
+
/*
* Enable Functional and APB clock at 14.7456MHz
* for configured UART console
@@ -90,3 +100,9 @@ int print_cpuinfo(void)
return 0;
}
#endif
+
+#ifdef CONFIG_I2C_MV
+void i2c_clk_enable(void)
+{
+}
+#endif