From 3ded9c10e32eb780070ca8412fb57818b73d3b50 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Mon, 3 Oct 2011 13:10:33 -0700 Subject: tegra3: i2c: Add low level functions for T30 We need these functions to set up the power chip during low-level init. BUG=chromium-os:21033 TEST=build and boot on Seaboard Change-Id: I69b9d3c12581e0a71db39b031b9ea2ef4ec184bf Reviewed-on: http://gerrit.chromium.org/gerrit/8696 Reviewed-by: Che-Liang Chiou Tested-by: Simon Glass --- arch/arm/include/asm/arch-tegra/i2c.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'arch/arm/include/asm/arch-tegra') diff --git a/arch/arm/include/asm/arch-tegra/i2c.h b/arch/arm/include/asm/arch-tegra/i2c.h index 25fb21d3fc8..458cd5ef60b 100644 --- a/arch/arm/include/asm/arch-tegra/i2c.h +++ b/arch/arm/include/asm/arch-tegra/i2c.h @@ -168,4 +168,28 @@ struct i2c_ctlr { #define I2C_INT_NO_ACK_RANGE 3 : 3 #define I2C_INT_ARBITRATION_LOST_RANGE 2 : 2 +/** + * Low level, hopefully temporary, functions to write values to the + * Tegra DVC I2C controller. These are used by T30 init, when running + * on the AVP CPU, before the Cortex-A9s are up. It is not easy to + * have the i2c infrastructure up that early, but we still want to put + * this code in the driver + */ + +/** + * Write an address (with config) to the DVC I2C + * + * @param addr Address to write + * @param config Config to write + */ +void tegra_i2c_ll_write_addr(uint addr, uint config); + +/** + * Write a data word (with config) to the DVC I2C + * + * @param data Data to write + * @param config Config to write + */ +void tegra_i2c_ll_write_data(uint data, uint config); + #endif -- cgit v1.2.3