similarity index 99%
rename from include/linux/fsl/guts.h
rename to arch/powerpc/include/asm/fsl_guts.h
@@ -12,10 +12,9 @@
* option) any later version.
*/
-#ifndef __FSL_GUTS_H__
-#define __FSL_GUTS_H__
-
-#include <linux/types.h>
+#ifndef __ASM_POWERPC_FSL_GUTS_H__
+#define __ASM_POWERPC_FSL_GUTS_H__
+#ifdef __KERNEL__
/**
* Global Utility Registers.
@@ -295,3 +294,4 @@ struct ccsr_rcpm_v2 {
};
#endif
+#endif
@@ -34,7 +34,6 @@
#include <linux/of_device.h>
#include <linux/phy.h>
#include <linux/memblock.h>
-#include <linux/fsl/guts.h>
#include <linux/atomic.h>
#include <asm/time.h>
@@ -52,6 +51,7 @@
#include <soc/fsl/qe/qe_ic.h>
#include <asm/mpic.h>
#include <asm/swiotlb.h>
+#include <asm/fsl_guts.h>
#include "smp.h"
#include "mpc85xx.h"
@@ -14,8 +14,8 @@
#include <linux/kernel.h>
#include <linux/of.h>
#include <linux/of_address.h>
-#include <linux/fsl/guts.h>
+#include <asm/fsl_guts.h>
#include <asm/io.h>
#include <asm/fsl_pm.h>
@@ -17,7 +17,6 @@
#include <linux/seq_file.h>
#include <linux/interrupt.h>
#include <linux/of_platform.h>
-#include <linux/fsl/guts.h>
#include <asm/time.h>
#include <asm/machdep.h>
@@ -28,6 +27,7 @@
#include <asm/mpic.h>
#include <soc/fsl/qe/qe.h>
#include <soc/fsl/qe/qe_ic.h>
+#include <asm/fsl_guts.h>
#include <sysdev/fsl_soc.h>
#include <sysdev/fsl_pci.h>
@@ -16,7 +16,6 @@
* kind, whether express or implied.
*/
-#include <linux/fsl/guts.h>
#include <linux/pci.h>
#include <linux/of_platform.h>
#include <asm/div64.h>
@@ -26,6 +25,7 @@
#include <sysdev/fsl_soc.h>
#include <sysdev/fsl_pci.h>
#include <asm/udbg.h>
+#include <asm/fsl_guts.h>
#include <asm/fsl_lbc.h>
#include "smp.h"
@@ -12,7 +12,6 @@
* kind, whether express or implied.
*/
-#include <linux/fsl/guts.h>
#include <linux/pci.h>
#include <linux/of_platform.h>
#include <asm/div64.h>
@@ -22,6 +21,7 @@
#include <sysdev/fsl_soc.h>
#include <sysdev/fsl_pci.h>
#include <asm/udbg.h>
+#include <asm/fsl_guts.h>
#include "smp.h"
#include "mpc85xx.h"
@@ -18,7 +18,6 @@
#include <linux/kexec.h>
#include <linux/highmem.h>
#include <linux/cpu.h>
-#include <linux/fsl/guts.h>
#include <asm/machdep.h>
#include <asm/pgtable.h>
@@ -26,6 +25,7 @@
#include <asm/mpic.h>
#include <asm/cacheflush.h>
#include <asm/dbell.h>
+#include <asm/fsl_guts.h>
#include <asm/code-patching.h>
#include <asm/cputhreads.h>
#include <asm/fsl_pm.h>
@@ -15,7 +15,6 @@
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/errno.h>
-#include <linux/fsl/guts.h>
#include <linux/pci.h>
#include <linux/of_platform.h>
@@ -24,6 +23,7 @@
#include <asm/mpic.h>
#include <soc/fsl/qe/qe.h>
#include <soc/fsl/qe/qe_ic.h>
+#include <asm/fsl_guts.h>
#include <sysdev/fsl_soc.h>
#include <sysdev/fsl_pci.h>
@@ -24,7 +24,6 @@
#include <linux/delay.h>
#include <linux/seq_file.h>
#include <linux/of.h>
-#include <linux/fsl/guts.h>
#include <asm/time.h>
#include <asm/machdep.h>
@@ -39,6 +38,7 @@
#include <sysdev/fsl_pci.h>
#include <sysdev/fsl_soc.h>
#include <sysdev/simple_gpio.h>
+#include <asm/fsl_guts.h>
#include "mpc86xx.h"
@@ -19,7 +19,7 @@
#include <linux/export.h>
#include <asm/io.h>
-#include <linux/fsl/guts.h>
+#include <asm/fsl_guts.h>
#include <asm/cputhreads.h>
#include <asm/fsl_pm.h>
#include <asm/smp.h>
@@ -12,7 +12,6 @@
#include <linux/clk.h>
#include <linux/clk-provider.h>
-#include <linux/fsl/guts.h>
#include <linux/io.h>
#include <linux/kernel.h>
#include <linux/module.h>
@@ -21,6 +20,10 @@
#include <linux/of.h>
#include <linux/slab.h>
+#ifdef CONFIG_PPC
+#include <asm/fsl_guts.h>
+#endif
+
#define PLL_DIV1 0
#define PLL_DIV2 1
#define PLL_DIV3 2
@@ -341,6 +344,8 @@ static const struct clockgen_muxinfo t4240_hwa5 = {
},
};
+#ifdef CONFIG_PPC
+
#define RCWSR7_FM1_CLK_SEL 0x40000000
#define RCWSR7_FM2_CLK_SEL 0x20000000
#define RCWSR7_HWA_ASYNC_DIV 0x04000000
@@ -408,6 +413,7 @@ static void __init p5040_init_periph(struct clockgen *cg)
else
cg->fman[1] = cg->pll[PLATFORM_PLL].div[PLL_DIV2].clk;
}
+#endif
static void __init t1023_init_periph(struct clockgen *cg)
{
@@ -499,6 +505,7 @@ static const struct clockgen_chipinfo chipinfo[] = {
.pll_mask = 0x37,
.flags = CG_VER3 | CG_LITTLE_ENDIAN,
},
+#ifdef CONFIG_PPC
{
.compat = "fsl,p2041-clockgen",
.guts_compat = "fsl,qoriq-device-config-1.0",
@@ -559,6 +566,7 @@ static const struct clockgen_chipinfo chipinfo[] = {
},
.pll_mask = 0x0f,
},
+#endif
{
.compat = "fsl,t1023-clockgen",
.guts_compat = "fsl,t1023-device-config",
@@ -20,11 +20,11 @@
#include "fsl_pamu.h"
-#include <linux/fsl/guts.h>
#include <linux/interrupt.h>
#include <linux/genalloc.h>
#include <asm/mpc85xx.h>
+#include <asm/fsl_guts.h>
/* define indexes for each operation mapping scenario */
#define OMI_QMAN 0x00
@@ -35,7 +35,6 @@
#include "fman.h"
#include "fman_muram.h"
-#include <linux/fsl/guts.h>
#include <linux/slab.h>
#include <linux/delay.h>
#include <linux/module.h>
@@ -46,6 +45,10 @@
#include <linux/interrupt.h>
#include <linux/libfdt_env.h>
+#ifdef CONFIG_PPC
+#include <asm/fsl_guts.h>
+#endif
+
/* General defines */
#define FMAN_LIODN_TBL 64 /* size of LIODN table */
#define MAX_NUM_OF_MACS 10
@@ -1889,7 +1892,9 @@ static int fman_reset(struct fman *fman)
err = -EBUSY;
goto _return;
- } else {
+ }
+#ifdef CONFIG_PPC
+ else {
struct device_node *guts_node;
struct ccsr_guts __iomem *guts_regs;
u32 devdisr2, reg;
@@ -1952,6 +1957,7 @@ guts_node:
dev_dbg(fman->dev, "%s: Didn't perform FManV3 reset due to Errata A007273!\n",
__func__);
}
+#endif
_return:
return err;
}
@@ -12,11 +12,11 @@
#include <linux/module.h>
#include <linux/interrupt.h>
-#include <linux/fsl/guts.h>
#include <linux/of_address.h>
#include <linux/of_device.h>
#include <linux/slab.h>
#include <sound/soc.h>
+#include <asm/fsl_guts.h>
#include "fsl_dma.h"
#include "fsl_ssi.h"
@@ -11,12 +11,12 @@
*/
#include <linux/module.h>
-#include <linux/fsl/guts.h>
#include <linux/interrupt.h>
#include <linux/of_address.h>
#include <linux/of_device.h>
#include <linux/slab.h>
#include <sound/soc.h>
+#include <asm/fsl_guts.h>
#include "fsl_dma.h"
#include "fsl_ssi.h"
@@ -18,12 +18,12 @@
*/
#include <linux/module.h>
-#include <linux/fsl/guts.h>
#include <linux/interrupt.h>
#include <linux/of_address.h>
#include <linux/of_device.h>
#include <linux/slab.h>
#include <sound/soc.h>
+#include <asm/fsl_guts.h>
#include "fsl_dma.h"
#include "fsl_ssi.h"
All users of this driver are PowerPC specific and the header file has no business in the global include/linux/ hierarchy, so move it back before anyone starts using it on ARM. This reverts commit 948486544713492f00ac8a9572909101ea892cb0. Signed-off-by: Arnd Bergmann <arnd@arndb.de> --- This part of the series is not required for the eSDHC quirk, but it restores the asm/fsl_guts.h header so it doesn't accidentally get abused for this in the future. I found two drivers outside of arch/powerpc that already accessed the registers directly, but the functions look fairly contained, and can be easily hidden in an #ifdef CONFIG_PPC -- To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html