Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fa6d459d authored by Anatolij Gustschin's avatar Anatolij Gustschin
Browse files

mpc5121: remove obsolete cell-index property from PSC clock code



Don't use cell-index from device tree, obtain the PSC number
from PSCx register offset.

Signed-off-by: default avatarAnatolij Gustschin <agust@denx.de>
parent 73e31235
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -680,13 +680,12 @@ static void psc_calc_rate(struct clk *clk, int pscnum, struct device_node *np)
static void psc_clks_init(void)
{
	struct device_node *np;
	const u32 *cell_index;
	struct platform_device *ofdev;
	u32 reg;

	for_each_compatible_node(np, NULL, "fsl,mpc5121-psc") {
		cell_index = of_get_property(np, "cell-index", NULL);
		if (cell_index) {
			int pscnum = *cell_index;
		if (!of_property_read_u32(np, "reg", &reg)) {
			int pscnum = (reg & 0xf00) >> 8;
			struct clk *clk = psc_dev_clk(pscnum);

			clk->flags = CLK_HAS_RATE | CLK_HAS_CTRL;