Thread (24 messages) 24 messages, 4 authors, 2013-02-26

[PATCH 1/4] ARM: tegra: pmc: convert PMC driver to support DT only

From: Stephen Warren <hidden>
Date: 2013-02-22 18:32:40
Also in: linux-tegra

On 02/21/2013 11:44 PM, Joseph Lo wrote:
The Tegra kernel only support boot from DT now. Clean up the PMC driver
to support DT only, that includes:

* remove the ifdef of CONFIG_OF
* replace the static mapping of PMC addr to map from DT
quoted hunk ↗ jump to hunk
diff --git a/arch/arm/mach-tegra/pmc.c b/arch/arm/mach-tegra/pmc.c
 static inline u32 tegra_pmc_readl(u32 reg)
 {
-	return readl(IO_ADDRESS(TEGRA_PMC_BASE + reg));
+	return readl_relaxed(tegra_pmc_base + reg);
The change from readl to readl_relaxed is definitely unrelated to
cleaning up DT support. It needs to be a separate patch, and needs to be
mentioned in the commit description.
+static void tegra_pmc_parse_dt(void)
+{
+	struct device_node *np;
+
+	np = of_find_matching_node(NULL, matches);
+	if (np) {
Here, if (!np) BUG(); would be simpler, and allow the rest of the
function not to be indented.
 void __init tegra_pmc_init(void)
 {
...
+	if (!of_have_populated_dt())
+		return;
That won't ever be true.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help