Thread (3 messages) 3 messages, 2 authors, 2016-01-15

[PATCH] clk: xgene: Add SoC and PMD PLL clocks with v2 hardware

From: Stephen Boyd <hidden>
Date: 2016-01-15 23:46:47
Also in: linux-clk

On 12/16, Loc Ho wrote:
quoted hunk ↗ jump to hunk
@@ -41,6 +44,14 @@
 
 static DEFINE_SPINLOCK(clk_lock);
 
+static int xgene_clk_version(void)
+{
+	#define MIDR_EL1_VARIANT_MASK	0x00f00000
+	u32 val = read_cpuid_id();
+
+	return (val & MIDR_EL1_VARIANT_MASK) == 0 ? 1 : 2;
+}
This is very odd. It means that this file can't be test compiled
on non-arm64 platforms. It would be better to express the v1 vs.
v2 difference through DT compatible strings so that the driver
doesn't rely on reading the midr.

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help