From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mout.kundenserver.de ([212.227.126.131]:61199 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1161029AbcE3NTF (ORCPT ); Mon, 30 May 2016 09:19:05 -0400 From: Arnd Bergmann To: linuxppc-dev@lists.ozlabs.org Cc: Ulf Hansson , Yangbo Lu , Mark Rutland , Xiaobo Xie , "linux-i2c@vger.kernel.org" , "linux-clk@vger.kernel.org" , Qiang Zhao , Russell King , Bhupesh Sharma , Joerg Roedel , Claudiu Manoil , "devicetree@vger.kernel.org" , Scott Wood , Rob Herring , Santosh Shilimkar , "linux-arm-kernel@lists.infradead.org" , "netdev@vger.kernel.org" , "linux-mmc@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Yang-Leo Li , "iommu@lists.linux-foundation.org" , Kumar Gala Subject: [PATCH 4/4] Revert "powerpc/fsl: Move fsl_guts.h out of arch/powerpc" Date: Mon, 30 May 2016 15:18:43 +0200 Message-ID: <5513501.AmZs7h1vI2@wuerfel> In-Reply-To: References: <1462417950-46796-1-git-send-email-yangbo.lu@nxp.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Sender: linux-clk-owner@vger.kernel.org List-ID: 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 --- 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 diff --git a/include/linux/fsl/guts.h b/arch/powerpc/include/asm/fsl_guts.h similarity index 99% rename from include/linux/fsl/guts.h rename to arch/powerpc/include/asm/fsl_guts.h index 649e9171a9b3..a67413c52701 100644 --- a/include/linux/fsl/guts.h +++ b/arch/powerpc/include/asm/fsl_guts.h @@ -12,10 +12,9 @@ * option) any later version. */ -#ifndef __FSL_GUTS_H__ -#define __FSL_GUTS_H__ - -#include +#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 diff --git a/arch/powerpc/platforms/85xx/mpc85xx_mds.c b/arch/powerpc/platforms/85xx/mpc85xx_mds.c index f61cbe235581..00f052e9f2a2 100644 --- a/arch/powerpc/platforms/85xx/mpc85xx_mds.c +++ b/arch/powerpc/platforms/85xx/mpc85xx_mds.c @@ -34,7 +34,6 @@ #include #include #include -#include #include #include @@ -52,6 +51,7 @@ #include #include #include +#include #include "smp.h" #include "mpc85xx.h" diff --git a/arch/powerpc/platforms/85xx/mpc85xx_pm_ops.c b/arch/powerpc/platforms/85xx/mpc85xx_pm_ops.c index f05325f0cc03..a812c0511252 100644 --- a/arch/powerpc/platforms/85xx/mpc85xx_pm_ops.c +++ b/arch/powerpc/platforms/85xx/mpc85xx_pm_ops.c @@ -14,8 +14,8 @@ #include #include #include -#include +#include #include #include diff --git a/arch/powerpc/platforms/85xx/mpc85xx_rdb.c b/arch/powerpc/platforms/85xx/mpc85xx_rdb.c index 3f4dad133338..453ddda00fce 100644 --- a/arch/powerpc/platforms/85xx/mpc85xx_rdb.c +++ b/arch/powerpc/platforms/85xx/mpc85xx_rdb.c @@ -17,7 +17,6 @@ #include #include #include -#include #include #include @@ -28,6 +27,7 @@ #include #include #include +#include #include #include diff --git a/arch/powerpc/platforms/85xx/p1022_ds.c b/arch/powerpc/platforms/85xx/p1022_ds.c index 371df822e88e..6ac986d3f8a3 100644 --- a/arch/powerpc/platforms/85xx/p1022_ds.c +++ b/arch/powerpc/platforms/85xx/p1022_ds.c @@ -16,7 +16,6 @@ * kind, whether express or implied. */ -#include #include #include #include @@ -26,6 +25,7 @@ #include #include #include +#include #include #include "smp.h" diff --git a/arch/powerpc/platforms/85xx/p1022_rdk.c b/arch/powerpc/platforms/85xx/p1022_rdk.c index 5087becaa8bc..680232d6ba48 100644 --- a/arch/powerpc/platforms/85xx/p1022_rdk.c +++ b/arch/powerpc/platforms/85xx/p1022_rdk.c @@ -12,7 +12,6 @@ * kind, whether express or implied. */ -#include #include #include #include @@ -22,6 +21,7 @@ #include #include #include +#include #include "smp.h" #include "mpc85xx.h" diff --git a/arch/powerpc/platforms/85xx/smp.c b/arch/powerpc/platforms/85xx/smp.c index fe9f19e5e935..6bd3a292e790 100644 --- a/arch/powerpc/platforms/85xx/smp.c +++ b/arch/powerpc/platforms/85xx/smp.c @@ -18,7 +18,6 @@ #include #include #include -#include #include #include @@ -26,6 +25,7 @@ #include #include #include +#include #include #include #include diff --git a/arch/powerpc/platforms/85xx/twr_p102x.c b/arch/powerpc/platforms/85xx/twr_p102x.c index 71bc255b4324..2cac45f72d24 100644 --- a/arch/powerpc/platforms/85xx/twr_p102x.c +++ b/arch/powerpc/platforms/85xx/twr_p102x.c @@ -15,7 +15,6 @@ #include #include #include -#include #include #include @@ -24,6 +23,7 @@ #include #include #include +#include #include #include diff --git a/arch/powerpc/platforms/86xx/mpc8610_hpcd.c b/arch/powerpc/platforms/86xx/mpc8610_hpcd.c index 957473e5c8e5..761c81476957 100644 --- a/arch/powerpc/platforms/86xx/mpc8610_hpcd.c +++ b/arch/powerpc/platforms/86xx/mpc8610_hpcd.c @@ -24,7 +24,6 @@ #include #include #include -#include #include #include @@ -39,6 +38,7 @@ #include #include #include +#include #include "mpc86xx.h" diff --git a/arch/powerpc/sysdev/fsl_rcpm.c b/arch/powerpc/sysdev/fsl_rcpm.c index 9259a94f70e1..8af22187cb25 100644 --- a/arch/powerpc/sysdev/fsl_rcpm.c +++ b/arch/powerpc/sysdev/fsl_rcpm.c @@ -19,7 +19,7 @@ #include #include -#include +#include #include #include #include diff --git a/drivers/clk/clk-qoriq.c b/drivers/clk/clk-qoriq.c index 58566a17944a..f311bd399672 100644 --- a/drivers/clk/clk-qoriq.c +++ b/drivers/clk/clk-qoriq.c @@ -12,7 +12,6 @@ #include #include -#include #include #include #include @@ -21,6 +20,10 @@ #include #include +#ifdef CONFIG_PPC +#include +#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", diff --git a/drivers/iommu/fsl_pamu.c b/drivers/iommu/fsl_pamu.c index a34355fca37a..2570f2a25dc4 100644 --- a/drivers/iommu/fsl_pamu.c +++ b/drivers/iommu/fsl_pamu.c @@ -20,11 +20,11 @@ #include "fsl_pamu.h" -#include #include #include #include +#include /* define indexes for each operation mapping scenario */ #define OMI_QMAN 0x00 diff --git a/drivers/net/ethernet/freescale/fman/fman.c b/drivers/net/ethernet/freescale/fman/fman.c index 1de2e1e51c2b..dabee93fcadd 100644 --- a/drivers/net/ethernet/freescale/fman/fman.c +++ b/drivers/net/ethernet/freescale/fman/fman.c @@ -35,7 +35,6 @@ #include "fman.h" #include "fman_muram.h" -#include #include #include #include @@ -46,6 +45,10 @@ #include #include +#ifdef CONFIG_PPC +#include +#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; } diff --git a/sound/soc/fsl/mpc8610_hpcd.c b/sound/soc/fsl/mpc8610_hpcd.c index ddf49f30b23f..73b2b89d4a3e 100644 --- a/sound/soc/fsl/mpc8610_hpcd.c +++ b/sound/soc/fsl/mpc8610_hpcd.c @@ -12,11 +12,11 @@ #include #include -#include #include #include #include #include +#include #include "fsl_dma.h" #include "fsl_ssi.h" diff --git a/sound/soc/fsl/p1022_ds.c b/sound/soc/fsl/p1022_ds.c index a1f780ecadf5..a24e04919f71 100644 --- a/sound/soc/fsl/p1022_ds.c +++ b/sound/soc/fsl/p1022_ds.c @@ -11,12 +11,12 @@ */ #include -#include #include #include #include #include #include +#include #include "fsl_dma.h" #include "fsl_ssi.h" diff --git a/sound/soc/fsl/p1022_rdk.c b/sound/soc/fsl/p1022_rdk.c index d4d88a8cb9c0..d8448887bfda 100644 --- a/sound/soc/fsl/p1022_rdk.c +++ b/sound/soc/fsl/p1022_rdk.c @@ -18,12 +18,12 @@ */ #include -#include #include #include #include #include #include +#include #include "fsl_dma.h" #include "fsl_ssi.h"