Skip to contentSkip to conversation

at91rm9200: fix errors with CONFIG_CMD_I2C_TREE

PATCH New Jens Scharsig 1 participant 2 messages Sep 2, 2008 – Sep 3, 2008 Arm/Microchip (AT91) SoC support

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 at91rm9200: fix errors with CONFIG_CMD_I2C_TREE

This patch prevents linker error on AT91RM9200 boards, if CONFIG_CMD_I2_TREE is set.
It implements i2c_set_bus_speed and i2c_get_bus_speed as a dummy function.

---

cpu/arm920t/at91rm9200/i2c.c +0 -0
index 826cea8..48d3986 100644
@@ -203,4 +203,14 @@ void i2c_reg_write(uchar i2c_addr, uchar reg, uchar

val)
i2c_write(i2c_addr, reg, 1, &val, 1);
}

+int i2c_set_bus_speed(unsigned int speed)
+{
+ return -1;
+}
+
+unsigned int i2c_get_bus_speed(void)
+{
+ return 0;
+}
+
#endif /* CONFIG_HARD_I2C */

#1 lore raw

PATCH 1/1 at91rm9200: fix errors with CONFIG_CMD_I2C_TREE

It's the same like first, but i2c_get_bus_speed returns CFG_I2C_SPEED instead of 0. I think this is the better value.

This patch prevents linker error on AT91RM9200 boards, if CONFIG_CMD_I2_TREE is set.
It implements i2c_set_bus_speed and i2c_get_bus_speed as a dummy function.

---

cpu/arm920t/at91rm9200/i2c.c +0 -0
index 826cea8..48d3986 100644
@@ -203,4 +203,14 @@ void i2c_reg_write(uchar i2c_addr, uchar reg, uchar

val)
i2c_write(i2c_addr, reg, 1, &val, 1);
}

+int i2c_set_bus_speed(unsigned int speed)
+{
+ return -1;
+}
+
+unsigned int i2c_get_bus_speed(void)
+{
+ return CFG_I2C_SPEED;
+}
+
#endif /* CONFIG_HARD_I2C */