clk: tegra: reset UARTS from clock controller
The console devices are the only ones that can't use the reset controller properly, as they get registered from platform code. Reset those devices from the clock controller. Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
parent
77d45d43c2
commit
ee493a6152
|
@ -348,6 +348,7 @@ static int tegra20_car_probe(struct device_d *dev)
|
||||||
&clk_data);
|
&clk_data);
|
||||||
|
|
||||||
tegra_clk_init_rst_controller(car_base, dev->device_node, 3 * 32);
|
tegra_clk_init_rst_controller(car_base, dev->device_node, 3 * 32);
|
||||||
|
tegra_clk_reset_uarts();
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -342,6 +342,7 @@ static int tegra30_car_probe(struct device_d *dev)
|
||||||
&clk_data);
|
&clk_data);
|
||||||
|
|
||||||
tegra_clk_init_rst_controller(car_base, dev->device_node, 6 * 32);
|
tegra_clk_init_rst_controller(car_base, dev->device_node, 6 * 32);
|
||||||
|
tegra_clk_reset_uarts();
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -187,3 +187,14 @@ void tegra_clk_init_rst_controller(void __iomem *base, struct device_node *np,
|
||||||
rst_ctlr.nr_resets = num;
|
rst_ctlr.nr_resets = num;
|
||||||
reset_controller_register(&rst_ctlr);
|
reset_controller_register(&rst_ctlr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void tegra_clk_reset_uarts(void) {
|
||||||
|
int i;
|
||||||
|
int console_device_ids[] = {6, 7, 55, 65, 66};
|
||||||
|
|
||||||
|
for (i = 0; i < ARRAY_SIZE(console_device_ids); i++) {
|
||||||
|
rst_ops.assert(&rst_ctlr, console_device_ids[i]);
|
||||||
|
udelay(2);
|
||||||
|
rst_ops.deassert(&rst_ctlr, console_device_ids[i]);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
|
@ -160,3 +160,5 @@ struct tegra_clk_periph_regs {
|
||||||
|
|
||||||
void tegra_clk_init_rst_controller(void __iomem *base, struct device_node *np,
|
void tegra_clk_init_rst_controller(void __iomem *base, struct device_node *np,
|
||||||
unsigned int num);
|
unsigned int num);
|
||||||
|
|
||||||
|
void tegra_clk_reset_uarts(void);
|
||||||
|
|
Loading…
Reference in New Issue