9
0
Fork 0

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:
Lucas Stach 2014-05-14 22:45:31 +02:00 committed by Sascha Hauer
parent 77d45d43c2
commit ee493a6152
4 changed files with 15 additions and 0 deletions

View File

@ -348,6 +348,7 @@ static int tegra20_car_probe(struct device_d *dev)
&clk_data);
tegra_clk_init_rst_controller(car_base, dev->device_node, 3 * 32);
tegra_clk_reset_uarts();
return 0;
}

View File

@ -342,6 +342,7 @@ static int tegra30_car_probe(struct device_d *dev)
&clk_data);
tegra_clk_init_rst_controller(car_base, dev->device_node, 6 * 32);
tegra_clk_reset_uarts();
return 0;
}

View File

@ -187,3 +187,14 @@ void tegra_clk_init_rst_controller(void __iomem *base, struct device_node *np,
rst_ctlr.nr_resets = num;
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]);
}
};

View File

@ -160,3 +160,5 @@ struct tegra_clk_periph_regs {
void tegra_clk_init_rst_controller(void __iomem *base, struct device_node *np,
unsigned int num);
void tegra_clk_reset_uarts(void);