summaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
authorDirk Eibach <dirk.eibach@gdsys.cc>2014-07-03 09:28:16 +0200
committerTom Rini <trini@ti.com>2014-07-07 19:47:18 -0400
commit35ecf752305aadd2b048c5942f56bec813d12ad4 (patch)
tree5cf1c75b2f0ce86ba4e037736cf1f13cbb1913bd /board
parente9e374216f8718b14b075c9a8420a770ab23f5e1 (diff)
board: controlcenterd: Use new API for setting i2c bus
Signed-off-by: Dirk Eibach <dirk.eibach@gdsys.cc>
Diffstat (limited to 'board')
-rw-r--r--board/gdsys/p1022/controlcenterd-id.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/board/gdsys/p1022/controlcenterd-id.c b/board/gdsys/p1022/controlcenterd-id.c
index 7e13c9051c..70eff912aa 100644
--- a/board/gdsys/p1022/controlcenterd-id.c
+++ b/board/gdsys/p1022/controlcenterd-id.c
@@ -86,6 +86,11 @@ enum {
ESDHC_BOOT_IMAGE_ENTRY_OFS = 0x60,
};
+enum {
+ I2C_SOC_0 = 0,
+ I2C_SOC_1 = 1,
+};
+
struct key_program {
uint32_t magic;
uint32_t code_crc;
@@ -1156,7 +1161,7 @@ static void ccdm_hang(void)
int j;
#endif
- I2C_SET_BUS(0);
+ I2C_SET_BUS(I2C_SOC_0);
pca9698_direction_output(0x22, 0, 0); /* Finder */
pca9698_direction_output(0x22, 4, 0); /* Status */
@@ -1189,8 +1194,8 @@ int startup_ccdm_id_module(void)
int result = 0;
unsigned int orig_i2c_bus;
- orig_i2c_bus = I2C_GET_BUS();
- I2C_SET_BUS(1);
+ orig_i2c_bus = i2c_get_bus_num();
+ i2c_set_bus_num(I2C_SOC_1);
/* goto end; */
@@ -1216,7 +1221,7 @@ int startup_ccdm_id_module(void)
failure:
result = 1;
end:
- I2C_SET_BUS(orig_i2c_bus);
+ i2c_set_bus_num(orig_i2c_bus);
if (result)
ccdm_hang();