summaryrefslogtreecommitdiff
path: root/board/tqc
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2017-05-13 03:09:49 (GMT)
committerHeiko Schocher <hs@denx.de>2017-05-15 04:17:09 (GMT)
commiteb5ba3aefdf0f6cbd61684eeb61428f11fa7613c (patch)
tree89887dacbe56dc1b3cef048ce08c2ec3ef8f955b /board/tqc
parent22f3368e71321db1e0e15dfbf54b052367890ec7 (diff)
downloadu-boot-eb5ba3aefdf0f6cbd61684eeb61428f11fa7613c.tar.xz
i2c: Drop use of CONFIG_I2C_HARD
This option is pretty old. It predates CONFIG_SYS_I2C which is itself deprecated in favour of driver model. Disable it for all boards. Also drop I2C options which depend on this. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'board/tqc')
-rw-r--r--board/tqc/tqm5200/tqm5200.c18
1 files changed, 4 insertions, 14 deletions
diff --git a/board/tqc/tqm5200/tqm5200.c b/board/tqc/tqm5200/tqm5200.c
index 92db093..c48ab11 100644
--- a/board/tqc/tqm5200/tqm5200.c
+++ b/board/tqc/tqm5200/tqm5200.c
@@ -486,20 +486,14 @@ int board_early_init_f (void)
static int tfp410_read_reg(int reg, uchar *buf)
{
- if (i2c_read(CONFIG_SYS_TFP410_ADDR, reg, 1, buf, 1) != 0) {
- puts ("Error reading the chip.\n");
- return 1;
- }
- return 0;
+ puts("Error reading the chip.\n");
+ return -ENOSYS;
}
static int tfp410_write_reg(int reg, uchar buf)
{
- if (i2c_write(CONFIG_SYS_TFP410_ADDR, reg, 1, &buf, 1) != 0) {
- puts ("Error writing the chip.\n");
- return 1;
- }
- return 0;
+ puts("Error writing the chip.\n");
+ return -ENOSYS;
}
typedef struct _tfp410_config {
@@ -525,12 +519,9 @@ static int charon_last_stage_init(void)
{
volatile struct mpc5xxx_lpb *lpb =
(struct mpc5xxx_lpb *) MPC5XXX_LPB;
- int oldbus = i2c_get_bus_num();
uchar buf;
int i = 0;
- i2c_set_bus_num(CONFIG_SYS_TFP410_BUS);
-
/* check version */
if (tfp410_read_reg(TFP410_REG_DEV_ID_H, &buf) != 0)
return -1;
@@ -551,7 +542,6 @@ static int charon_last_stage_init(void)
i++;
}
printf("TFP410 initialized.\n");
- i2c_set_bus_num(oldbus);
/* set deadcycle for cs3 to 0 */
setbits_be32(&lpb->cs_deadcycle, 0xffffcfff);