@@ -43,6 +43,7 @@
#include <asm/hardware/cache-l2x0.h>
#include "common.h"
+#include "slcr.h"
#include "smp.h"
#define ZYNQ_DEVCFG_MCTRL 0x80
@@ -17,15 +17,6 @@
#ifndef __MACH_ZYNQ_COMMON_H__
#define __MACH_ZYNQ_COMMON_H__
-extern int zynq_slcr_init(void);
-extern int zynq_early_slcr_init(void);
-extern void zynq_slcr_system_reset(void);
-extern void zynq_slcr_cpu_stop(int cpu);
-extern void zynq_slcr_cpu_start(int cpu);
-extern bool zynq_slcr_cpu_state_read(int cpu);
-extern void zynq_slcr_cpu_state_write(int cpu, bool die);
-extern u32 zynq_slcr_get_device_id(void);
-
extern void __iomem *zynq_scu_base;
void zynq_pm_late_init(void);
@@ -26,6 +26,7 @@
#include <asm/smp_scu.h>
#include <linux/irqchip/arm-gic.h>
#include "common.h"
+#include "slcr.h"
#include "smp.h"
/*
@@ -20,6 +20,7 @@
#include <linux/regmap.h>
#include <linux/clk/zynq.h>
#include "common.h"
+#include "slcr.h"
/* register offsets */
#define SLCR_UNLOCK_OFFSET 0x8 /* SCLR unlock register */
new file mode 100644
@@ -0,0 +1,29 @@
+/*
+ * This file contains common function prototypes to avoid externs
+ * in the c files.
+ *
+ * Copyright (C) 2014 Xilinx
+ *
+ * This software is licensed under the terms of the GNU General Public
+ * License version 2, as published by the Free Software Foundation, and
+ * may be copied, distributed, and modified under those terms.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
+#ifndef __MACH_ZYNQ_SLCR_H__
+#define __MACH_ZYNQ_SLCR_H__
+
+extern int zynq_slcr_init(void);
+extern int zynq_early_slcr_init(void);
+extern void zynq_slcr_system_reset(void);
+extern void zynq_slcr_cpu_stop(int cpu);
+extern void zynq_slcr_cpu_start(int cpu);
+extern bool zynq_slcr_cpu_state_read(int cpu);
+extern void zynq_slcr_cpu_state_write(int cpu, bool die);
+extern u32 zynq_slcr_get_device_id(void);
+
+#endif
Create topic headers not to share all functions. Signed-off-by: Michal Simek <michal.simek@xilinx.com> --- Changes in v4: - New patch in this series Changes in v3: None Changes in v2: None arch/arm/mach-zynq/common.c | 1 + arch/arm/mach-zynq/common.h | 9 --------- arch/arm/mach-zynq/platsmp.c | 1 + arch/arm/mach-zynq/slcr.c | 1 + arch/arm/mach-zynq/slcr.h | 29 +++++++++++++++++++++++++++++ 5 files changed, 32 insertions(+), 9 deletions(-) create mode 100644 arch/arm/mach-zynq/slcr.h -- 1.8.2.3