On 07/31/2016 07:02 PM, Simon Glass wrote:
Hi Stephen,
On 27 July 2016 at 15:48, Stephen Warren <swar...@wwwdotorg.org> wrote:
From: Bryan Wu <pe...@nvidia.com>
clk/reset API was tested on T186 platform and previous chip like
T210/T124 will still use the old APIs.
diff --git a/drivers/i2c/tegra_i2c.c b/drivers/i2c/tegra_i2c.c
@@ -30,7 +35,12 @@ enum i2c_type {
/* Information about i2c controller */
struct i2c_bus {
int id;
+#ifdef CONFIG_TEGRA186
+ struct reset_ctl reset_ctl;
+ struct clk clk;
+#else
enum periph_id periph_id;
+#endif
This doesn't seem right - the drivers should be SoC-independent at compile-time.
Same comment as before; there's not yet a common clock/reset API
implementation except on the latest SoC.
@@ -370,7 +437,12 @@ static int tegra_i2c_probe(struct udevice *dev)
i2c_init_controller(i2c_bus);
debug("%s: controller bus %d at %p, periph_id %d, speed %d: ",
is_dvc ? "dvc" : "i2c", dev->seq, i2c_bus->regs,
- i2c_bus->periph_id, i2c_bus->speed);
+#ifndef CONFIG_TEGRA186
+ i2c_bus->periph_id,
Probably the concept of periph_id can go away now? Perhaps this driver
needs a clean-up?
It's still needed for the legacy APIs on older SoCs.
_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot