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

Commit a5df602b authored by Alexandre Belloni's avatar Alexandre Belloni
Browse files

clk: at91: pmc: merge at91_pmc_init in atmel_pmc_probe



at91_pmc_init() doesn't do much anymore, merge it in atmel_pmc_probe().

Signed-off-by: default avatarAlexandre Belloni <alexandre.belloni@free-electrons.com>
Acked-by: default avatarBoris Brezillon <boris.brezillon@free-electrons.com>
Acked-by: default avatarStephen Boyd <sboyd@codeaurora.org>
parent 99a81706
Loading
Loading
Loading
Loading
+9 −25
Original line number Diff line number Diff line
@@ -110,44 +110,28 @@ static const struct at91_pmc_caps sama5d3_caps = {
			  AT91_PMC_CFDEV,
};

static struct at91_pmc *__init at91_pmc_init(struct device_node *np,
					     struct regmap *regmap,
					     void __iomem *regbase,
static void __init of_at91_pmc_setup(struct device_node *np,
				     const struct at91_pmc_caps *caps)
{
	struct at91_pmc *pmc;

	if (!regbase || !caps)
		return NULL;
	void __iomem *regbase = of_iomap(np, 0);
	struct regmap *regmap;

	at91_pmc_base = regbase;

	regmap = syscon_node_to_regmap(np);
	if (IS_ERR(regmap))
		panic("Could not retrieve syscon regmap");

	pmc = kzalloc(sizeof(*pmc), GFP_KERNEL);
	if (!pmc)
		return NULL;
		return;

	pmc->regmap = regmap;
	pmc->caps = caps;

	regmap_write(pmc->regmap, AT91_PMC_IDR, 0xffffffff);

	return pmc;
}

static void __init of_at91_pmc_setup(struct device_node *np,
				     const struct at91_pmc_caps *caps)
{
	struct at91_pmc *pmc;
	void __iomem *regbase = of_iomap(np, 0);
	struct regmap *regmap;

	regmap = syscon_node_to_regmap(np);
	if (IS_ERR(regmap))
		panic("Could not retrieve syscon regmap");

	pmc = at91_pmc_init(np, regmap, regbase, caps);
	if (!pmc)
		return;
}

static void __init of_at91rm9200_pmc_setup(struct device_node *np)