Skip to contentSkip to conversation

clk/realview: stop using machine headers

PATCH New Arnd Bergmann 2 participants 2 messages Feb 26, 2015 – Feb 27, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 3/10 clk/realview: stop using machine headers

In order to move realview into multiplatform, we have to prevent device drivers from accessing the machine header files.

In case of the clk driver, this is very simple, we just copy the small set of register definitions into the driver that needs them.

---
 drivers/clk/versatile/clk-realview.c | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)
drivers/clk/versatile/clk-realview.c +7 -3
index c8b523117fb7..276411f3c437 100644
@@ -12,11 +12,15 @@
 #include <linux/io.h>
 #include <linux/clk-provider.h>
 
-#include <mach/hardware.h>
-#include <mach/platform.h>
-
 #include "clk-icst.h"
 
+#define REALVIEW_SYS_OSC0_OFFSET             0x0C
+#define REALVIEW_SYS_OSC1_OFFSET             0x10
+#define REALVIEW_SYS_OSC2_OFFSET             0x14
+#define REALVIEW_SYS_OSC3_OFFSET             0x18
+#define REALVIEW_SYS_OSC4_OFFSET             0x1C	/* OSC1 for RealView/AB */
+#define REALVIEW_SYS_LOCK_OFFSET             0x20
+
 /*
  * Implementation of the ARM RealView clock trees.
  */
Signature · 1 line
2.1.0.rc2
#1 lore raw

PATCH 3/10 clk/realview: stop using machine headers

Quoted 7 lines · Arnd Bergmann

In order to move realview into multiplatform, we have to prevent device drivers from accessing the machine header files.

In case of the clk driver, this is very simple, we just copy the small set of register definitions into the driver that needs them.

Sweet. We should move this to using syscon to access the registers I guess but in the meantime this is still nice modularization.

Yours,
Linus Walleij