Patchwork [2/2] powerpc: Abstract common define of signal multiplex control for qe

login
register
mail settings
Submitter Zhicheng Fan
Date Jan. 20, 2012, 5 a.m.
Message ID <1327035611-22794-2-git-send-email-B32736@freescale.com>
Download mbox | patch
Permalink /patch/136947/
State Superseded
Delegated to: Kumar Gala
Headers show

Comments

Zhicheng Fan - Jan. 20, 2012, 5 a.m.
From: Fanzc <b32736@freeescale.com>

The mpc85xx_rdb and mpc85xx_mds have commom define of signal multiplex for qe ,so
they need to go in common header, the patch abstract them to fsl_guts.h

Signed-off-by: Fanzc <b32736@freeescale.com>
---
 arch/powerpc/include/asm/fsl_guts.h       |   19 +++++++++++++++++++
 arch/powerpc/platforms/85xx/mpc85xx_mds.c |    7 ++-----
 2 files changed, 21 insertions(+), 5 deletions(-)
Tabi Timur-B04825 - Jan. 25, 2012, 8:55 p.m.
On Thu, Jan 19, 2012 at 11:00 PM, Zhicheng Fan <B32736@freescale.com> wrote:

> Signed-off-by: Fanzc <b32736@freeescale.com>

Please fix this.  There are only two e's in freescale.  In addition,
please use your full name.
Zhicheng Fan - Jan. 30, 2012, 5:40 a.m.
On 01/26/2012 04:55 AM, Tabi Timur-B04825 wrote:
> On Thu, Jan 19, 2012 at 11:00 PM, Zhicheng Fan<B32736@freescale.com>  wrote:
>
>> Signed-off-by: Fanzc<b32736@freeescale.com>
> Please fix this.  There are only two e's in freescale.  In addition,
> please use your full name.
>
Hi Timur,

       You mean that need to remove the define to other file or create 
new file?

Zhicheng Fan
Tabi Timur-B04825 - Jan. 30, 2012, 12:32 p.m.
fanzc wrote:
>>
>>> Signed-off-by: Fanzc<b32736@freeescale.com>
>> Please fix this.  There are only two e's in freescale.  In addition,
>> please use your full name.
>>
> Hi Timur,
>
>        You mean that need to remove the define to other file or create new
> file?

No, I mean you're signed-off-by should be this:

Signed-off-by: Zhicheng Fan <b32736@freescale.com>
Zhicheng Fan - Jan. 31, 2012, 2:02 a.m.
On 01/30/2012 08:32 PM, Tabi Timur-B04825 wrote:
> fanzc wrote:
>>>> Signed-off-by: Fanzc<b32736@freeescale.com>
>>> Please fix this.  There are only two e's in freescale.  In addition,
>>> please use your full name.
>>>
>> Hi Timur,
>>
>>         You mean that need to remove the define to other file or create new
>> file?
> No, I mean you're signed-off-by should be this:
>
> Signed-off-by: Zhicheng Fan<b32736@freescale.com>
>
I got it ,thanks

Patch

diff --git a/arch/powerpc/include/asm/fsl_guts.h b/arch/powerpc/include/asm/fsl_guts.h
index bebd124..efacfe3 100644
--- a/arch/powerpc/include/asm/fsl_guts.h
+++ b/arch/powerpc/include/asm/fsl_guts.h
@@ -114,6 +114,25 @@  struct ccsr_guts_86xx {
 	__be32	srds2cr1;	/* 0x.0f44 - SerDes2 Control Register 0 */
 } __attribute__ ((packed));
 
+#ifdef CONFIG_PPC_85xx
+
+/* Alternate function signal multiplex control */
+#define MPC85xx_PMUXCR_OFFSET           0x60
+#define MPC85xx_PMUXCR_QE0              0x00008000
+#define MPC85xx_PMUXCR_QE2              0x00002000
+#define MPC85xx_PMUXCR_QE3              0x00001000
+#define MPC85xx_PMUXCR_QE4              0x00000800
+#define MPC85xx_PMUXCR_QE5              0x00000400
+#define MPC85xx_PMUXCR_QE6              0x00000200
+#define MPC85xx_PMUXCR_QE7              0x00000100
+#define MPC85xx_PMUXCR_QE8              0x00000080
+#define MPC85xx_PMUXCR_QE9              0x00000040
+#define MPC85xx_PMUXCR_QE10             0x00000020
+#define MPC85xx_PMUXCR_QE11             0x00000010
+#define MPC85xx_PMUXCR_QE12             0x00000008
+
+#endif
+
 #ifdef CONFIG_PPC_86xx
 
 #define CCSR_GUTS_DMACR_DEV_SSI	0	/* DMA controller/channel set to SSI */
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_mds.c b/arch/powerpc/platforms/85xx/mpc85xx_mds.c
index 1d15a0c..1bd339a 100644
--- a/arch/powerpc/platforms/85xx/mpc85xx_mds.c
+++ b/arch/powerpc/platforms/85xx/mpc85xx_mds.c
@@ -51,6 +51,7 @@ 
 #include <asm/qe_ic.h>
 #include <asm/mpic.h>
 #include <asm/swiotlb.h>
+#include <asm/fsl_guts.h>
 #include "smp.h"
 
 #include "mpc85xx.h"
@@ -268,11 +269,7 @@  static void __init mpc85xx_mds_qe_init(void)
 	mpc85xx_mds_reset_ucc_phys();
 
 	if (machine_is(p1021_mds)) {
-#define MPC85xx_PMUXCR_OFFSET           0x60
-#define MPC85xx_PMUXCR_QE0              0x00008000
-#define MPC85xx_PMUXCR_QE3              0x00001000
-#define MPC85xx_PMUXCR_QE9              0x00000040
-#define MPC85xx_PMUXCR_QE12             0x00000008
+
 		static __be32 __iomem *pmuxcr;
 
 		np = of_find_node_by_name(NULL, "global-utilities");