summaryrefslogtreecommitdiff
path: root/src/cpu/samsung
diff options
context:
space:
mode:
authorDavid Hendricks <dhendrix@chromium.org>2013-04-05 13:42:39 -0700
committerRonald G. Minnich <rminnich@gmail.com>2013-04-09 23:59:34 +0200
commitcfb73607be05e57237592c5c94a98589aba04833 (patch)
treebf41bd18ae077595a1c3e8adf3236103c22dfb89 /src/cpu/samsung
parent4026b034f1d4b8b6e7628c66b4bb8e7ba15082e7 (diff)
replace device/i2c.h with simpler version
The existing header was imported along with the Exynos code and left mostly unchanged. This is the first patch in a series intended to replace the imported u-boot I2C API with a much simpler and cleaner interface: - We only need to expose i2c_read() and i2c_write() in our public API. Everything else is board/chip-dependent and should remain hidden away. - i2c_read and i2c_write functions will take bus number as an arg and we'll eliminate i2c_get_bus and i2c_set_bus. Those are prone to error and end up cluttering the code since the user needs to save the old bus number, set the new one, do the read/write, and restore the old value (3 added steps to do a simple transaction). - Stop setting default values for board-specific things like SPD and RTC bus numbers (as if we always have an SPD or RTC on I2C). - Death to all the trivial inline wrappers. And in case there was any doubt, we really don't care about the MPC8xx. Though if we did then we would not pollute the public API with its idiosyncrasies. Change-Id: I4410a3c82ed5a6b2e80e3d8c0163464a9ca7c3b0 Signed-off-by: David Hendricks <dhendrix@chromium.org> Reviewed-on: http://review.coreboot.org/3043 Tested-by: build bot (Jenkins) Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
Diffstat (limited to 'src/cpu/samsung')
-rw-r--r--src/cpu/samsung/exynos5-common/exynos-fb.c2
-rw-r--r--src/cpu/samsung/exynos5-common/i2c.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/cpu/samsung/exynos5-common/exynos-fb.c b/src/cpu/samsung/exynos5-common/exynos-fb.c
index 30d0767923..d3710a3a6d 100644
--- a/src/cpu/samsung/exynos5-common/exynos-fb.c
+++ b/src/cpu/samsung/exynos5-common/exynos-fb.c
@@ -33,7 +33,7 @@
#include <cpu/samsung/exynos5250/sysreg.h>
#include <drivers/maxim/max77686/max77686.h>
-#include "device/i2c.h"
+#include "device/i2c-old.h"
#include "cpu/samsung/exynos5-common/i2c.h"
#include "cpu/samsung/exynos5250/dsim.h"
#include "cpu/samsung/exynos5250/fimd.h"
diff --git a/src/cpu/samsung/exynos5-common/i2c.c b/src/cpu/samsung/exynos5-common/i2c.c
index 7384b506df..c5315304b8 100644
--- a/src/cpu/samsung/exynos5-common/i2c.c
+++ b/src/cpu/samsung/exynos5-common/i2c.c
@@ -36,7 +36,7 @@
#include "cpu/samsung/exynos5250/pinmux.h"
//#include <fdtdec.h>
-#include "device/i2c.h"
+#include "device/i2c-old.h"
#include "i2c.h"
#define I2C_WRITE 0